-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Reloading Via React Native Debug Menu Causes Crash when Realm is installed #1424
Comments
@ReyhanFabianto but I'm not using Hermes (on ios this will be possible only with the next RN release) |
The same problem happens with me(I use realmjs as well) |
We're in the process of removing realm-js, mainly due to lack of Hermes support and this is another... These lines are causing the crash: JSCRuntime::~JSCRuntime() {
// On shutting down and cleaning up: when JSC is actually torn down,
// it calls JSC::Heap::lastChanceToFinalize internally which
// finalizes anything left over. But at this point,
// JSValueUnprotect() can no longer be called. We use an
// atomic<bool> to avoid unsafe unprotects happening after shutdown
// has started.
ctxInvalid_ = true;
JSGlobalContextRelease(ctx_);
#ifndef NDEBUG
assert(
objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object");
assert(
stringCounter_ == 0 && "JSCRuntime destroyed with a dangling API string");
#endif
} I guess both modules are tinkering somewhat with JSI and are causing this problem. I've added the following lines to
|
@mattijsf great workaround, will try it, thanks! just curious though, to what are you migrating away from realm? |
The workaround is not that great though. It mostly suppresses the fact that there is a memory leak I'm afraid. But in day-to-day development where a full reload happens often it makes life a bit more enjoyable... We migrated to sqlite for the reason it's proven stable and well maintained. Come to think of it... could be a nice next project of software-mansion to wrap their head around! A lean db solution with a proper API (realm comes close to this)... 👍 |
Having same issue, and have Realm in project as well. |
exactly the same issue here, I have realm-js in my project, everything works well until I upgrade Reanimated from v1 to v2.1.0 |
Have the same problem, is there any workaround or planned fix for this? Thanks. |
Any comments from devs? |
same issue with realm , ios |
same issue, realm and ios project. |
We've released a new version of Realm JS with support for the Hermes engine: Realm JS v10.20.0-alpha.2. Please take it for a spin and provide any feedback or issues you might have using the Hermes issue template over at the Realm JS repository. Thanks for your patience! |
@kraenhansen can we expect this to work for ios? Your release notes only mention Android. Is the iOS side something you're working on? Tried out the alpha version. Seems to work on iOS. |
Yep, iOS and Android are both supported. |
The same crash is happening without realm installed in the project.
podfile
|
Seems like the problem with Realm was resolved. I'll close this issue. Please let me know if that's not the case. @arinjay Please open a new issue since it's not directly related to Realm being installed. In addition to things you provided please post full crash info as well and repro example if possible. Thanks! |
Trying to debug issue where debugger crashes on restart: software-mansion/react-native-reanimated#1424 realm/realm-js#3837
This bug is still open :/ I just had the issue with the version 10.21.1, if someone knows how to fix without the workaround of @mattijsf please let me know, and thanks mattjsf |
Same here... I came across the issue while trying to use react-native-draggable-flatlist. I posted an issue there and someone suggested to upgrade realm to the rc version, which currently should be 11.0.0-rc.2. I gave it a try but that didn't help unfortunately :( the app didn't even start after the update... @jakub-gonet can you please reopen this issue? |
@jakub-gonet this is still an issue on 2.12.0 |
Still the issue in RE3 3.0.2 :
|
I'm still getting this issue with version @3.1.0 and react native @0.71.7. Anyone know of a solid fix? |
having the same issue on
I don't even have whenever I
Stack trace
works fine on |
Seeing the same issue when having react-native-firebase/messaging onMessage running and calling RNRestart.restart() The solution from @mattijsf sadly does not work here |
doesn't seem to happen in version 2.3 |
Same here 1464 |
@altaywtf Any update on this issue? I am also stuck with this error on every reload of application. |
Description
Looks like another incarnation of #1285
Was happening on my project when tried to add reanimated 2 (just plainly calling
<Animated.View />
). I've tracked it down to a possible conflict with another dependancy: realmjs.Below are the steps to reproduce it from reanimated 2 playground
Screenshots
Steps To Reproduce
yarn add realm
npx pod-install
Package versions
The text was updated successfully, but these errors were encountered: