realm-swift: Random crashes with encrypted realm.
How frequently does the bug occur?
All the time
Description
Application constantly crashes in random transactions.
Stacktrace & log output
uncaught exception in notifier thread: N5realm5_impl17TransactLogParser14BadTransactLogE: Bad transaction log
2022-01-24 18:16:38.391094+0300 Walken[15692:3232033] uncaught exception in notifier thread: N5realm5_impl17TransactLogParser14BadTransactLogE: Bad transaction log
libc++abi: terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log
Can you reproduce the bug?
Yes, always
Reproduction Steps
Version
10.21.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
Yes, using encryption
Platform OS and version(s)
iOS 15
Build environment
Xcode version: 13.2.1 Dependency manager and version: CocoaPods 1.11.2
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (1 by maintainers)
@TheHmmka Got this error when upgrading from realm 10.20.0 to 10.21.1 on iOS 15 both simulator and real device.
Have you try going back to use 10.20.2? It does not crash for me.
Now encryption works as expected.
➤ Finn Andersen commented:
Fixed by realm-core 11.14
What we know so far:
v10.21.1, Realm-core was upgraded from11.6.1to `11.8.0.My conclusion:
v10.21.0still contained Realm-core11.6.1, and should work without issues if the above is trueWhat to try:
v10.21.0should fix the issue until https://github.com/realm/realm-core/issues/5174 is fixedPS. I did not expect such relatively major changes in a patch release of Realm-swift, especially considering that Realm core 11.8.0 contains breaking changes (according to it’s own changelog). Is there any reason not to adhere to semver?
This issue may be related to this https://github.com/realm/realm-core/issues/5174
I’ve started getting these too, possibly concurrently with starting to use Realm Notifications, or starting to use async/await, all of which happened around the same time.
I am not accessing the Realm from different processes in my case.
Nope, this is not my case.
Sorry, I can’t share production code. I’ll try to create demo project and catch this issue.
Hi @TheHmmka I see you can reproduce the issue, maybe you can share a repo or a code snippet so we can reproduce it in our side. The warning on our documentation refers to trying to access a shared realm from different processes, for example a realm stored on a shared group which is used by different apps at the same time?, if this the case that may be the cause of the crash.