-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] EXC_BREAKPOINT crash after installLibrary on iOS 12.* devices #141
Comments
Have you tried to reproduce the bug in debug mode on 12.x version of iOS in the Simulator or Device? Does it happen in debug on iOS 12.X or does it only happen in production? |
I was unable to reproduce it in debug or in release mode in simulator. After further investigation, it looks like we can limit iOS version to only |
Well after some investigation, I think the error is caused because accessing the runtime from the wrong thread. However I don't understand why it is happening only on a specific version of iOS and not other versions. Because the error is happening inside the dispatch block, maybe we can remove it and see if that would help.
Fork the master branch and try removing the following code if (!cxxBridge.runtime) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.001 * NSEC_PER_SEC),
dispatch_get_main_queue(), ^{
/**
When refreshing the app while debugging, the setBridge
method is called too soon. The runtime is not ready yet
quite often. We need to install library as soon as runtime
becomes available.
*/
[self installLibrary];
});
return;
}
replace it with following: if (!cxxBridge.runtime) {
return;
} Then use it instead of the released version on npm. If you have any people who can test, that would be great otherwise the only option is to either download ios 12.5 on an iphone and downgrade or release to production again to see if the error goes away/some new error comes up |
Also I think the error will only come in release builds. Not in debug mode so make sure if you are testing on other ios 12.x versions, it's not in debug. |
Thanks, will try to apply a patch with these changes and do couple of tests to see if this would help. I will get back here with an update as soon as I have anything. |
Closing due to inactivity. |
Hi, I got the same error today on 15.1.0 and 15.0.2.
|
Also happens on iOS 15.2.0 in production build. Here is the stacktrace:
|
This started happening for me after upgrading react-native to 0.66 @haikov did the patch work? |
@abejfehr How many occurrences are you seeing? |
@ammarahm-ed there are thousands of occurrences in this case, it's not a rare error |
Released v0.6.11 |
Even with version 0.6.11, iOS 12 devices were still crashing 😞 Fortunately it wasn't due to MMKV at all 🎉 It looks like this issue was the cause of those crashes. Updating to version 0.6.11 of this library is key for that Thank you so much for the fix @ammarahm-ed! |
I am glad you were able to figure this out! |
Describe the bug
Hey!
We see quite a lot of
EXC_BREAKPOINT
crashes in Production, mostly coming from old iOS devices (the problem is almost unique to iPhone 6, 6 Plus and 7, according to the bug-reporting tool). And it only happens oniOS 12.*
. Works totally fine on any other type of device / OS.Stacktrace below:
To Reproduce
Steps to reproduce the behavior:
Platform Information:
12.*
0.64.*
0.5.6
Additional context
We're also using reanimated2, which is another JSI-library and doesn't have the same problem. Which makes me think that something might be wrong during
installLibrary
process.The text was updated successfully, but these errors were encountered: