-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
BadVersionException #2021
Comments
Hello, @Kistamushken If the the specific version of the async query is not equal to the read lock's version, you can encounter |
@dalinaum Yeah, I do have removeChangeListener() in the onStop() method, I also tried removeChangeListener(listener) but it didn't really helped. Btw, can It be relative to the SIGSEV I get from time to time, I mean this thing with RealmChangeListener? |
seems related to #2027 |
We have discovered a bug in how we handle queries across threads. This is currently being fixed by: realm/realm-core#1405 |
We have just released 0.87.4 with a potential fix for this. We still haven't been able to reproduce the exact error you are reporting here, but upon investigation found something that appeared to be the root cause. So if you can test with 0.87.4 that would be much appreciated. |
Seems fixed according to #2027 |
I have similar error on version 0.87.4:
Occurs randomly on app launch when it performs background network operations with writing results to Realm. On foreground activity I have listeners to Realm updates. |
I'm using Realm v0.87.4 and have a similar crash.
|
Hey, im having this issue too. Im using realm: 0.87.5. And this is the stacktrace that fabric got to me. |
I'm using Realm v0.87.5, this exception still happening with same stack trace. |
Any tip to not break the app if this issue happen? like a try catch or something... |
I see... Thanks =). |
Hi Realm team. Exception log from fabric is a little different from v0.87.5.
|
We were able to reproduce this issue on our devices. There were breaking changes in 0.90, so we need to do some work in order to upgrade. I will let you know when we will retest it. |
@dbacinski Did you have a chance to upgrade and rerun your tests? |
@dbacinski We haven't heard from you in 9 days so I'm closing this issue. Please let us know if it needs to be reopened! |
Hi @cmelchior @kneth @emanuelez
|
Hi @cmelchior @kneth @emanuelez
|
Please, I beg you to do this. |
@ppamorim in the meantime, I think a possible solution would be to use |
@Zhuinden I will be fired :D |
Okay that's not fun, what is your deadline? |
But seriously, if you replace all async query method with sync query methods, then this can be fixed temporarily. |
Today, I can't do this change... But I can use a snapshot of the fixed version, what do you think? |
The object store results integration is not merged yet. |
@Zhuinden Solved? |
Happening on 2.2.2. The problem happened because I use the method of
|
Agreed, Realm 2.x notifications with async queries had oddities, Realm 3.1.4 or Realm 3.3.x+ are much better choice |
This issue still happens to my app on user devices
UDHelper has following code:
previously it was just check |
This generally shouldn't happen, but what happens if you put |
hi. i'm have same issue at isEmpty() and size()
|
@alexneo2003 Is it something you can reproduce? |
@cmelchior i'm running Espresso test on my corporate app. in the code, the application checks if the results are not empty then process it with the next step
|
Hey, guys. I keep getting this exception. I am using 0.87.1 version of Realm(and I use Realm as a singleton).
My situation looks like this: there is navigation button which starts a fragment, which makes an async query for objects in onStart() method. This exception rises when user spams this navigation button or just makes fast transactions between fragments.
java.lang.Error: io.realm.internal.async.BadVersionException: std::exception in io_realm_internal_TableQuery.cpp line 1262 E/AndroidRuntime: at io.realm.RealmQuery$3.call(RealmQuery.java:1491) E/AndroidRuntime: at io.realm.RealmQuery$3.call(RealmQuery.java:1467) E/AndroidRuntime: at io.realm.internal.async.BgPriorityCallable.call(BgPriorityCallable.java:36) E/AndroidRuntime: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:137) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856) E/AndroidRuntime: Caused by: io.realm.internal.async.BadVersionException: std::exception in io_realm_internal_TableQuery.cpp line 1262 E/AndroidRuntime: at io.realm.internal.TableQuery.nativeFindAllSortedWithHandover(Native Method) E/AndroidRuntime: at io.realm.internal.TableQuery.findAllSortedWithHandover(TableQuery.java:490) E/AndroidRuntime: at io.realm.RealmQuery$3.call(RealmQuery.java:1480) E/AndroidRuntime: at io.realm.RealmQuery$3.call(RealmQuery.java:1467) E/AndroidRuntime: at io.realm.internal.async.BgPriorityCallable.call(BgPriorityCallable.java:36) E/AndroidRuntime: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:137) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)
By the way, sometimes my during fast transactions between fragments my app crashes with SIGSEV or just completely freezes without throwing ANR, dunno if it's connected to the BadVersion, but just in case.
The text was updated successfully, but these errors were encountered: