-
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
Crashed: Realm Notification Listener (BACKGROUND) #8498
Comments
➤ PM Bot commented: Jira ticket: RCOCOA-2298 |
Could it have any effect that we create |
It looks like something is going wrong just trying to create a read transaction in the database. I'm not super familiar with the backgrounding aspects of iOS, but will bring it to the attention of the team on our weekly review meeting. (for context, I've assigned myself temporarily until we've discussed it and will hand it off to someone who's more knowledgeable) |
This may be a file protection-related crash. If NSFileProtectionComplete is set on the Realm file or any of our helper files then access to the file is revoked while the device is locked, and attempting to use the files will crash. |
The attribute of the file itself is NSFileProtectionCompleteUntilFirstUserAuthentication How to remove file protection for Realm files? I use this code in
|
Doesn't this line indicate that this happens when the user closes the application? As far as I understand this line is not called when the application crashes, is it?
|
See @tgoyne's comment on the other issue as it's also applicable here: realm/realm-core#7420 (comment) |
|
I'll close this issue as it's the same root cause as realm/realm-core#7420 and we can keep the discussion in a single place. |
How frequently does the bug occur?
Sometimes
Description
Firebase title: realm::Transaction::Transaction(std::__1::shared_ptrrealm::DB, realm::SlabAlloc*, realm::DB::ReadLockInfo&, realm::DB::TransactStage)
EXC_BAD_ACCESS (KERN_INVALID_ADDRESS)
This bug happens in production and it's a big problem for us, but we can't figure out what's wrong. The bug occurs 100% in BACKGROUND.
There are suspicions that
NotificationToken
should be invalidated when you go to BACKGROUND. We don't do this, only when the class isdeinit
only in this case we invalidate the token.Stacktrace & log output
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
10.47.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 12-17
Build environment
Xcode version: 14.2-15.2
Dependency manager and version: Cocoapods 1.15.2
The text was updated successfully, but these errors were encountered: