-
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
Intermittent crash while running Realm in a background thread after upgrading to 5.0.3 #6577
Comments
Yes, I have the same issue, tried #6576 but with the same crash. Need to be able to fix as soon as possible due to its not possible to revert to 4.x? |
+++ Any update on this one? |
Have you solved the problem yet? |
No updates on my end @occe @nalexn @WWDGitHup, we’re still waiting for someone from the Realm team to take a look and see what could be going wrong. We were lucky enough to catch this one early in our testing in one of our internal builds, so we were able to revert back to 4.4.0 before shipping to the public. |
There isn't really any starting point for looking into this. All that I can say from the stack trace is that it's somehow getting to the end of the autoreleasepool while still in a write transaction, and then something's going wrong when rolling back the write transaction. The only way for this to happen with the given code should be if something inside the write transaction threw an exception (note: not a swift error). The simplicity of the write being performed doesn't leave a lot of possibilities for what could be going wrong; a memory allocation failure that we don't handle gracefully is the only thing that comes to mind. |
I am having a similar crash when running the app in the background. I just upgraded to the latest v5.3.2. It will work for a few seconds and then a crash in Realm. The code is doing a fairly simple Also, if it matters, I have a |
For anyone experiencing this issue, could you create a sample app that reproduces this and send it to us? Thanks! |
Please, several user with:
|
@marinofaggiana This looks like a separate issue, please open a new issue and fill out the template accordingly. Thanks! |
Can everyone please update to the latest version of Realm (5.3.4) Thanks |
Actually you might want to try upgrading to Realm (5.3.5) since that fixes a common thread related crash. |
Closing this issue as v5.3.5 contains a relevant fix related to this issue. |
I am still seeing this exact same crash in v5.3.5. |
@goa sorry to hear this and thank you for getting back to us. Realm Core team is prioritizing working on v5.x crashes right now. |
@goa Could you open a new issue and fill out the issue template so that we may help you in the best way possible? Thanks. |
Likely the same issue as #6408 |
@goa Could you please upgrade and try reproducing with realm-cocoa 5.4.0 (which included a fix for this problem realm/realm-core#3904) |
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. |
Goals
Run Realm write code that runs in a background queue without crashing, as was possible in Realm 4.4.0. After upgrading to Realm 5.0.3, the sample code below crashes intermittently, but frequently enough to become a problem.
In our project, we have a Realm extension that implements several helper methods, one of which closely resembles the code sample found in this Realm documentation:
https://realm.io/docs/cookbook/swift/object-to-background/
I’m not sure if it’s related, but after coming across #6555, #6559, #6574, I have attempted implementing the fix from #6576, but the same crash still occurs.
EXC_BAD_ACCESS KERN_INVALID_ADDRESS
Expected Results
No crash, as in Realm 4.4.0.
Actual Results
Steps to Reproduce
See code sample below, but this is basically an intermittent but fairly frequent crash. In our code, we instantiate a
Job
object multiple times, as needed, to perform different tasks that we need completed.For the purposes of the code sample below, assume code similar to the following is run multiple times:
Code Sample
Version of Realm and Tooling
Realm framework version: 5.0.3
Realm Object Server version: N/A
Xcode version: 11.5 (11E608c)
iOS version: 13.5 (17F75)
Dependency manager + version: CocoaPods 1.9.3
The text was updated successfully, but these errors were encountered: