Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index of insertion in backlinks is invalid #6687

Closed
nirinchev opened this issue Jun 1, 2023 · 4 comments
Closed

Index of insertion in backlinks is invalid #6687

nirinchev opened this issue Jun 1, 2023 · 4 comments
Assignees

Comments

@nirinchev
Copy link
Member

This is a Core issue based on the info I have from realm/realm-dotnet#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.

@nirinchev
Copy link
Member Author

This is related to realm/realm-dotnet#3333 - the developer shared the relevant portions of their model in this comment: realm/realm-dotnet#3333 (comment).

@nicola-cab
Copy link
Member

I'll try to reproduce the case and let you know.

@nicola-cab
Copy link
Member

@nirinchev is this still relevant? Especially after #7830 ??

@nirinchev
Copy link
Member Author

I don't know - it's a year-old issue that we didn't have an exact repro case for, so no way to verify if it's still a problem or not. Let's close and see if someone hits it again.

@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants