Index of insertion in backlinks is invalid

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 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
            Reporter:
            Nikola Irinchev
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: