Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1653

Index of insertion in backlinks is invalid

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

      This is a Core issue based on the info I have from https://github.com/realm/realm-dotnet/issues/3333.

      It appears that the .NET SDK is receiving a change notification for a Results instance holding a backlinks view where the inserted index set contains the index 1, but the size of the collection is 1, which means the index is invalid.

      For some context, the backlinks collection is constructed like:

      TableView backlink_view = object.obj().get_backlink_view(table, column);
      return new Results(object.realm(), std::move(backlink_view));
      

      And we're subscribing for notifications like:

      results->add_notification_callback(callback, std::make_optional(KeyPathArray()));
      

      Upon receipt of the notification, we attempt to get the items which have been newly inserted, so we get an exception attempting to read an index larger or equal to the size of the `Results.

            Assignee:
            nicola.cabiddu@mongodb.com Nicola Cabiddu
            Reporter:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: