-
Notifications
You must be signed in to change notification settings - Fork 165
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
[Bug]: Crash when using Realm.Remove #2977
Comments
Hey @tomkrikorian, thanks for reporting this. |
Do you have an email address i can send the schema privately ? |
You can email it to help@realm.io and mention realm-dotnet#2977 in the subject line. |
I'm getting a similar crash on Realm SDK version is latest (10.15.1) and I'm seeing the issue in the Unity Windows editor (2021.3.6f1) Here's my crash log if it's any help:
|
Additional info for the same issue: reproduced with Unity Realm SDK Versions 10.11.1, 10.11.2 (both of which worked fine before), and 10.15.1 This occurs both in Editor and iOS build. Although the Editor crash seems like it's hardware specific (although it could be some other underlying cause)
This crash occurs on first call to remove (systematically) or on initial sync (circumstantially, presumably because the same logic can be called internally as part of the original realm setup depending on local/remote diff), This is what the logs look like in the Unity Editor 2022-08-10 12:13:28.170 Info: Connection[1]: Session[1]: client_reset_config = false, Realm exists = true, client reset = false |
To emphasise, this is code which has worked for many month and we have identical versions (Unity, xcode, realm, ios) and this issue has surfaced. Unless I'm missing something, it seems to point to an issue introduced by changes in the realm backend. |
@ironage this looks like a crash when removing backlink - can you take a look and see if anything jumps at you? Also, can you advise what information we need to investigate/repro this? |
This could very well be fixed by realm/realm-core#5574 which was released in core v12.2.0 (the original stack trace above uses realm-core-12.1.0). Is there a Mixed property that sets a TypedLink (aka ObjLink) value involved here? |
The last few comments/stacktraces are using Core 12.4.0 though, so while the original issue may have been fixed in 12.2.0, there must be something else still lurking. |
We've drilled down and identified the cause (reproducible with latest realm SDK). We have an embedded object like this:
Used in a dictionary
And a server side schema like this
Whether the embedded objects is nested in the collection objects or not in the client side, this schema causes Unity editor to crash (reproducible on device). Reproducibility is high, especially when objects are created during application lifetime. |
I can't seem to easily reproduce this. @jonathan-opuscope if you can repro that in a small isolated project, that would be immensely helpful. Otherwise, can I ask you to open a support ticket at https://support.mongodb.com and work with the support engineer to collect the information they need to hand that over to the server team for investigation. |
I've sent a small Unity project to repro at help@realm.io, let me know if I can provide further info |
Hey @jonathan-opuscope, thank you for the repro project. Unfortunately, everything seems to be working fine when I run it against my app. My hunch is that something in the sync history is corrupted for your app and we'll need the server team to investigate and understand what. Another theory is that the data you have inserted has an effect - I inserted several dummy compositions with fairly random properties. It's possible that you have inserted something that breaks Core in a non-obvious way. FWIW, I did get a seemingly unrelated crash of the editor, which I filed a ticket for here: realm/realm-core#5752. |
Ok, thanks a lot. Will let you know if we can provide more info. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
What happened?
Using Realm.Remove makes the app crash.
We are using a PartitionSyncConfiguration for our realm. Sync is enabled without developer mode.
Repro steps
See code snippets but don't really have steps to repro, only using remove makes the app crash.
Version
10.14.0
What SDK flavour are you using?
MongoDB Atlas (i.e. Sync, auth, functions)
What type of application is this?
Unity
Client OS and version
iOS 15.5
Code snippets
Stacktrace of the exception/crash you're getting
Relevant log output
The text was updated successfully, but these errors were encountered: