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

Segfault during collection listener event propagation

      <!---

      Questions: If you have questions about HOW TO use Realm, please ask on
      StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
      We monitor the realm tag.

      Feature Request: Just fill in the first two sections below.

      Bugs: To help you as fast as possible with an issue please describe your issue
      and the steps you have taken to reproduce it in as much detail as possible.

      -->

      Goals

      Create a Realm RN test to reproduce the following seg fault:

      https://gist.github.com/ashwinphatak/11660cd0111d3d72210ffdcfc86c4e81

      <!--- What are you trying to achieve? -->

      Expected Results

      <!--- What did you expect to happen? -->
      Realm API should throw a JS exception on invalid usage.

      Actual Results

      <!--- What happened instead? -->
      <!--- e.g. the stack trace of a crash -->

      App crashes when

      1) During create, a relationship object is left undefined OR
      2) A linked object is deleted

      (1) OR (2) are not sufficient to cause the issue. We also need to setup a listener on the relevant collection. The crash seems to happen while propagating a change event to the listener callback.

      Steps to Reproduce

      So far I've only be able to reproduce this in a private app. One of the goals here is to create a failing test case for Realm RN.

      Code Sample

      <!---
      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!
      -->

      App code in which the crash can be reproduced consistently has been shared on RealmJS Slack channel.

      Version of Realm and Tooling

      • Realm JS SDK Version: 1.13.0
      • Node or React Native: RN
      • Client OS & Version: Ubuntu 16.04 LTS
      • Which debugger for React Native: None

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

              Created:
              Updated:
              Resolved: