Closed RustamG closed 4 years ago
Just caught this crash a couple of times again. Not sure if that's the cause. I used Realm Studio to remove the "CancelledCargo" objects. Then added one through my app UI using the code above. Will try to experiment with Realm Studio to figure out the constant steps to reproduce.
So here are the steps. Looks like it really depends on the Realm Studio being opened (I have version 3.11.0).
Hi @RustamG , Thank you for the detailed description. Realm Studio could lead app to crash because of new locking mechanism. Here is the similar crash #6752 Is it happened on Simulator only? Is it happened when you're running the app without Realm Studio connected? Could you please try to update Realm to the latest version?
Thanks for quick response @pavel-ship-it
Is it happened on Simulator only?
I tested it only on Simulator. Haven't observed such crash on the device.
Is it happened when you're running the app without Realm Studio connected?
No
Could you please try to update Realm to the latest version?
I'm on v5.4.7 which is the latest as of now.
Hey @RustamG, thanks for the update.
This issue will be fixed in the new release of Realm Studio. As a workaround you should avoid using same realm in Realm Studio and in the app simultaneously.
I'll close this ticket. If the you still see the same issue in a new version please comment and we can re-open it.
!!! MANDATORY TO FILL OUT !!!
Goals
App doesn't crash
Expected Results
App doesn't crash
Actual Results
App randomly crashes after modification of a List property Stack trace:
Steps for others to Reproduce
The app launched just fine and the data loaded in UI properly, however when I added a newly created object to a List of object with one type (FlightLog), I had crash enumerating the List on the another object type (Flight). I combine the data from multiple objects using Combine so when
FlightLog.cancelledCargo
is modified I also accessFlight.dropZones
to update UI. I started to constantly experience crashes on Friday when invokingFlight.dropZones.enumerated()
. I changed my code a little to try using subscripts and the app started to crash onFlight.dropZones.firstIndex(where:)
instead.After spending a few hours today (on Monday) I couldn't replicate the issue in a separate project despite using the exact same schema, Realm file, environment (iOS simulator) and the same code related to crash. I re-checked the scenario on the actual app and it doesn't crash anymore however the source code didn't change.
Code Sample
Realm configuration:
Objects definition:
Crash place:
Modification that triggered the crash:
However I'm unable to reproduce the crash in a sample project, I can email it so you get better idea having more code around the crash.
It worth noting that the modification happens on the same thread as the data observation. The issue may be related to https://github.com/realm/realm-cocoa/issues/4204.
Version of Realm and Tooling
Realm framework version: I got the crash on 5.2.0 version of Realm. Then I updated to 5.4.7 and had the same crash.
Realm Object Server version: not relevant
Xcode version: 11.7
iOS/OSX version: iOS 13.7 iPad Air 3 Simulator
Dependency manager + version: CocoaPods 1.9.3