Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-275

iOS device crash at JSGlobalContextRelease

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      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.

      Unable to find source-code formatter for language: obj. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      ~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,
          ],
        })
      }
      

      <!---
      Please provide a code sample or test case that highlights the issue.
      If relevant, include your model definitions.
      For larger code samples, links to external gists/repositories are preferred.
      Full projects that we can compile and run ourselves are ideal!
      -->

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: