realm/realm-js

iOS device crash at JSGlobalContextRelease

Closed this issue · 9 comments

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
AKACC commented

@cesargdm any solution?

@AKACC Didn't find any, migrated to WatermelonDB

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

Still facing this problem !!!

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

Still facing this problem !!!

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

impossible debuging process !!!

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.

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

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!