-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Sequential creation and access of Realm
instance crashes app.
#6689
Comments
@thomasAcademia
? |
@ericjordanmossman yes, we use Realm across multiple threads, but they are used in place and never passed between threads. Our stack traces are currently not symbolicated because of issues with Bitcode and Firebase so the Realm methods used will be "(Missing)" unfortunately:
#10 is a callback from a network thread. |
I am also experiencing this issue , we create a separate thread for writes and while it works most of the the time I am able to crash if there are a lot of background writes happening concurrently. `
`
|
Ya even me too having the same issue I don't know where I did mistake. I can't able to reproduce it but it's crash randomly somewhere in each background task but not in the same task every time. Could you please help me to resolve this issue? thanks in advance |
@grangej @Elamuruga for documentation's sake, what version of Realm are you running? |
I am running 5.3.3, I believe I was able to solve the problem by passing the queue to the realm init, but this is not ideal since I use this in RX and had to find a way to get the current queue everywhere. |
@thomasAcademia Thanks for the response right now I am using the latest version of Realm 5.3.3 upgrade from version 4.4.1. |
I've successfully reproduced a case which would cause spurious incorrect thread exceptions and am working on a fix. |
Goals
Create and access
Realm
instances on a single thread in sequentially-executed code without crashing the app.Expected Results
Creating the
Realm
instance returns a valid object or throws an error. On the next line of code, accessing theRealm
instance via methods likeRealm.objects
should not crash the app and return valid values.Actual Results
Creating the
Realm
instance succeeds but the following lines using theRealm
instance crash the app withSteps for others to Reproduce
We can not reproduce this ourselves but around 1/10 users are affected.
Code Sample
Version of Realm and Tooling
Realm framework version: v5.3.2
Realm Object Server version: N/A
Xcode version: 11.5
iOS/OSX version: iOS only, Minimum version 11.0, occurs on all iOS versions
Dependency manager + version: Carthage v0.35.0
The text was updated successfully, but these errors were encountered: