Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-86

Removing an item is causing a StackOverflowException

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

      <Unable to render embedded object: File (--- Thanks for helping us help you) not found. -->

      Before I'm starting with the issue, first of all, I want to say: thank you! Realm has brought me into the world of reactive programming and I got used to it very fast, even if I came from the SQLite thinking.

      Goals

      In my app, users can create an item which creation is fully done on an external server. To provide a clear indicator while the user is offline, I'm creating a placeholder which provides enough information for the user.
      When the final item is available, the placeholder is going to be removed and the new item is added.

      Expected Results

      // Remove the placeholder and add the newParentItem
      db = Realm.GetInstance();
      db.Write(() =>
      {
          db.Remove(placeholderParentItem);
          db.Add(newParentItem);
      });
      

      When executing the above code I expect that the placeholderParentItem is removed from the database while the newParentItem is added.

      Actual Results

      The line db.Remove(placeholderParentItem); caused an StackOverflowException.

      Steps to Reproduce

      Load the code sample, compile it and press the button twice. Pressing it once executes the desired behavior, pressing it twice causes an StackOverflowException.

      Code Sample

      You can find a sample project here, the relevant code is here.

      <!--- 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. -->
      <!--- Alternatively, you can share information confidentially via email at help@realm.io. -->
      <Unable to render embedded object: File (--- Full projects that we can compile and run ourselves are ideal) not found. -->

      Version of Realm and Tooling

      • Realm Object Server Version: ?
      • Flavor:
        • [x] Developer
        • [ ] Professional
        • [ ] Enterprise
      • Server OS & Version: n.a.
      • Client SDK Version: 1.6.0 (Xamarin, used on UWP)
      • Client OS & Version: Windows 10, version 1703

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

              Created:
              Updated: