When a Realm Object is not added to subscription trying to add it to realm throws confusing error

I created a realm mongo db app. I first created a UserInfo class and added it to initialSubscriptions when creating flexibleSyncConfiguration.
Then I added another class Account and forgot to add it to initialSubscriptions and keep getting error freed pointer was not the last allocation which threw me on wrong witch hunt and after wasting two days I found that I missed it’s subscription.
So is this expected behavior or the error should have a bit relevant to the problem

@mansoor_ali1 Welcome to the forums.

Sorry to hear about the trouble. The description of the issue is a bit vague - do you have some example code we could see that replicates the issue?

I crafted and app and followed what you described - the only issue I ran into was that Account didn’t sync (as they where not in the subscriptions) so perhaps I am doing something different.

The error sounds more like it would have to do with LinkingObjects - do you use those?

1 Like