-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
uncaught exception in notifier thread: N5realm10LogicErrorE: Bad version number #4369
Comments
They claim to have fixed it in realm/realm-object-store#355 but if this happens in Realm 3.0.0 (and also Realm-Cocoa 2.4.2+?) then I guess it's not entirely fixed yet...? |
Sorry for making a mess with the tags. Thanks for reporting this, @vadimbryl. I'll have someone look over what you've provided and follow-up with you. |
Hey @vadimbryl ! Thanks for sending this. If you can provide any more information about how to reproduce it, that would be awesome. |
@vadimbryl We did a bigger refactoring in 3.0.0 to support the fine grained collection notifications. Which is why this error cannot happen in 2.3.1. But any clue on how to reproduce this would be much appreciated. If you can trigger this somewhat consistently with your own project, are you able to share that project? It can be done privately through help@realm.io. |
This could be an error in object store. Somehow. |
There is no doubt it is in the Object Store, but finding it without being able to reproduce it will be very hard. |
@cmelchior I sent more information to help@realm.io |
I can reproduce your issue. Checking now. |
realm/realm-swift#4768 realm/realm-java#4369 When m_notifiers is empty, m_notifier_sg will be advanced to the latest. But the skip_version might be behind. In this case, bad_version will be throw when calling advance_to_final().
Should be fixed by realm/realm-object-store#424 waiting for review & release. |
* Fix bad_version when m_notifiers is empty realm/realm-swift#4768 realm/realm-java#4369 When m_notifiers is empty, m_notifier_sg will be advanced to the latest. But the skip_version might be behind. In this case, bad_version will be throw when calling advance_to_final(). * Add a test which reproduces the problem
Hi, Is the fix released yet? I'm using 3.3.2 and I'm experiencing this issue now Logcat
|
@muthuraj57 can you reproduce this issue? if you can, would you please send your apk to help@realm.io and let us know the steps to reproduce the issue? thanks. |
@beeender I'm getting this crash consistently in a specific activity on my project. I'll try to extract that module alone in a new project and reproduce it. |
Having the same issue, was on 3.0.0, upgraded to 3.4.0, problem persists.
Typical crashlog:
|
@krummler Is it possible for you to reproduce this issue with a sample project? If it is difficult to reproduce it with a sample project, is it OK to share your apk with us and let us know how to reproduce it? you can send you apk to help@realm.io. |
@beeender After some more searching I managed to figure out my problem. It seemed on some circumstances my app triggered a task to remove local files (including the Realm file). This will result this previously mentioned crash if you:
I would expect realm to misbehave, but the particular error seems very confusing. You can find a sample project here: https://github.com/krummler/realmcrashexample |
@krummler Glad to know the problem has been identified !!! I checked your project and thought about to make a better error message. But It seems to be difficult. The major thing is checking the file existence/valid on some hot code path may slow down things a lot ... |
@beeender you are very welcome! 😄 I didn't know the query runs asynchronously, that clears things up a bit. |
I get this crash in 4.1.0
And directory is placed on external storage - getExternalFilesDir(null) UPDATE: I found a fix when writing this message =)
Now I switched to RealmResults and use them to get non-manager objects to write it to json file. Reproduced on 7.1.1 and 6.0. And I get different logs on these devices:
Trace from 7.1.1
|
That's a time bomb (unclosed Realm instance) |
@pavel-ismailov I created a new issue #5459 to track this. Looks like a regression somewhere. Can you share your project which can reproduce the issue? a minimal project will be perfect. you can send it to help@realm.io if you want to share it privately. Let's discuss under #5459 |
Steps & Code to Reproduce
Unfortunately, don't have any specific steps or code sample to reproduce. It is just randomly crash and it sometimes crashes in different places, but we cannot get it in Realm v2.3.1.
I found similar issue in realm-cocoa @ realm/realm-swift#4422.
Version of Realm and tooling
Realm version(s): 3.0.0
Realm sync feature enabled: no
Android Studio version: 2.3
Which Android version and device: Android 7.1.1 on Nexus 5X, Android 4.3 on Samsung S3 GT-I9300, Emulator Android
Logcat
03-29 18:15:00.773 27003-27038 E/REALM: uncaught exception in notifier thread: N5realm10LogicErrorE: Bad version number
--------- beginning of crash
03-29 18:15:00.776 27003-27038 A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 27038 (-//-)
[ 03-29 18:15:00.785 367: 367 W/] debuggerd: handling request: pid=27003 uid=10376 gid=10376 tid=27038
03-29 18:15:01.005 27758-27758 A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-29 18:15:01.005 27758-27758 A/DEBUG: Build fingerprint: 'google/bullhead/bullhead:7.1.1/N4F26I/3532671:user/release-keys'
03-29 18:15:01.005 27758-27758 A/DEBUG: Revision: 'rev_1.0'
03-29 18:15:01.005 27758-27758 A/DEBUG: ABI: 'arm'
03-29 18:15:01.005 27758-27758 A/DEBUG: pid: 27003, tid: 27038, name: -//- >>> -//- <<<
03-29 18:15:01.005 27758-27758 A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-29 18:15:01.005 27758-27758 A/DEBUG: r0 00000000 r1 0000699e r2 00000006 r3 00000008
03-29 18:15:01.005 27758-27758 A/DEBUG: r4 e3e69978 r5 00000006 r6 e3e69920 r7 0000010c
03-29 18:15:01.005 27758-27758 A/DEBUG: r8 ff9c25c4 r9 decde3cc sl d106275c fp e3e698f4
03-29 18:15:01.005 27758-27758 A/DEBUG: ip 00000011 sp e3e69888 lr ec867557 pc ec869db4 cpsr 200f0010
03-29 18:15:01.015 27758-27758 A/DEBUG: backtrace:
03-29 18:15:01.017 27758-27758 A/DEBUG: #00 pc 00049db4 /system/lib/libc.so (tgkill+12)
03-29 18:15:01.017 27758-27758 A/DEBUG: #1 pc 00047553 /system/lib/libc.so (pthread_kill+34)
03-29 18:15:01.017 27758-27758 A/DEBUG: #2 pc 0001d8a5 /system/lib/libc.so (raise+10)
03-29 18:15:01.017 27758-27758 A/DEBUG: #3 pc 000193f1 /system/lib/libc.so (__libc_android_abort+34)
03-29 18:15:01.017 27758-27758 A/DEBUG: #4 pc 00017034 /system/lib/libc.so (abort+4)
03-29 18:15:01.017 27758-27758 A/DEBUG: #5 pc 0015d938 /data/app/{package}/base.apk (offset 0x1689000)
03-29 18:15:01.017 27758-27758 A/DEBUG: #6 pc 001307ec /data/app/{package}/base.apk (offset 0x1689000)
03-29 18:15:01.017 27758-27758 A/DEBUG: #7 pc 0013088c /data/app/{package}/base.apk (offset 0x1689000)
03-29 18:15:01.017 27758-27758 A/DEBUG: #8 pc 0015c828 /data/app/{package}/base.apk (offset 0x1689000)
03-29 18:15:01.017 27758-27758 A/DEBUG: #9 pc 00047023 /system/lib/libc.so (_ZL15__pthread_startPv+22)
03-29 18:15:01.017 27758-27758 A/DEBUG: #10 pc 00019e3d /system/lib/libc.so (__start_thread+6)
03-29 18:15:03.357 881-27759 W/ActivityManager: Force finishing activity *.MainActivity
The text was updated successfully, but these errors were encountered: