Skip to content
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

iOS device crash at JSGlobalContextRelease #2233

Closed
cesargdm opened this issue Jan 22, 2019 · 9 comments
Closed

iOS device crash at JSGlobalContextRelease #2233

cesargdm opened this issue Jan 22, 2019 · 9 comments

Comments

@cesargdm
Copy link

cesargdm commented Jan 22, 2019

Goals

Use realm in device while remote debugging

Actual Results

While not making any read or write, (actually happens moments after writing data and being queried), the app suddenly crashes at physical iOS device at line 41 in file RealmJS.xcodeproj/RealmJS/JSC/jsc_protected.hpp.

~Protected() {
        if (m_context) {
            JSGlobalContextRelease(m_context);
        }
    }

NOTE: Only happens while remote debbuging

Steps to Reproduce

Run on device, debbuging mode.
After crash some data happens to be missing.

Code Sample

// TabNavigation.js

export let realm

class TabNavigationScreen extends PureComponent {
  async connectRealm() {
    try {
      realm = await openRealm()
    } catch (error) {
      console.warn('Realm error', error)
    }
  }
}
// realm/index.js
export const openRealm = () => {
  return Realm.open({
    schema: [
      OfflineServiceSchema,
      OfflineUnitServiceSchema,
      OfflineUnitServiceStatusSchema,
      PlagueCountSchema,
    ],
  })
}

Version of Realm and Tooling

  • Realm JS SDK Version: 2.21.1
  • React Native: 0.57.8
  • Client OS & Version: iOS 12
  • Which debugger for React Native: Chrome
@cesargdm
Copy link
Author

screen shot 2019-01-29 at 5 05 39 pm

@AKACC
Copy link

AKACC commented Jul 23, 2019

@cesargdm any solution?

@cesargdm
Copy link
Author

@AKACC Didn't find any, migrated to WatermelonDB

@Mscynol
Copy link

Mscynol commented Sep 4, 2019

It's a serious problems,
I often meet it and make me feel confused

@ameenmattar
Copy link

ameenmattar commented Oct 9, 2019

Still facing this problem !!!

-realm version: "^2.29.2",
-react-native: "0.60.0",

@webforuse
Copy link

Still facing this problem !!!

-realm version: "^3.3.0",
-react-native: "0.60.4",
изображение

impossible debuging process !!!

@Finneah
Copy link

Finneah commented Nov 12, 2019

realm is still not usable!
I'm not ready to waste my time and constantly restart the app just because it's constantly crashing because of realm!

Either debugging OR realm .. I choose to debug.
A pity. I've been watching this for a year now, desperately waiting for you to fix that. I really wanted to use relam. But my patience is finished.

@mrarronz
Copy link

mrarronz commented Dec 2, 2020

Same issue happened to my app! This crash happens not very often, but really annoying!

@bmunkholm
Copy link
Contributor

Closing this as it will be resolved with the support for Hermes and the Flipper debugger. Please see here to try it out and provide feedback. Thanks for your patience!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests