-
Notifications
You must be signed in to change notification settings - Fork 302
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
TimeoutException in version 4.0.2 #1190
Comments
Can you qualify that a bit? Do you have crash statistics? P.S.: I you ever see this on a device in front of you, please grab the logcat (including the events happening ~ 65 seconds before TimeoutException) and post it here. PPS.: "But in the app I never called BoxStore.close()" -> That's fine, no need to. Closing a transaction should never take 60s. |
Hi @greenrobot , After eliminating the possibilities. I think the error may be in the use of Many-to-Many relationship. "P.S.: I you ever see this on a device in front of you, please grab the logcat (including the events happening ~ 65 seconds before TimeoutException) and post it here." I checked the logs earlier but found nothing related to this issue. |
Oh, can you reproduce it? That's good news... If it's possible to you to create a minimal reproduction example code that we can execute would help us a lot to get this analyzed and fixed (assuming it is a bug and it looks like one at first glance). |
@greenrobot , I have tried updates and queries with Many-to-Many relationships and they all work perfectly. So I really don't know when the error occurs, which makes it hard to reproduce the problem. |
@greenrobot, please see my attached application log |
Had a look, but the log does not go back ~ 65 seconds (before the TimeoutException), so I did not spot anything interesting... Maybe you have to increase the logcat buffer so it's not cut off? |
@greenrobot , I got a new log longer than 65 seconds, you can see the attached file |
Nothing much too see there... In fact no ObjectBox logs at all... Can you please enable LOG_TRANSACTIONS_READ and LOG_TRANSACTIONS_WRITE debug flags (via BoxStoreBuilder.debugFlags())? Also, any idea where this log entry comes from?
|
hi @greenrobot , Please see two log attach all and filter with Box
|
@greenrobot , On my Pixel device, I get a hint: Full log attach here: |
Re the the |
In both So for whatever reason, if a Transaction is destroyed by the FinalizerDaemon thread it blocks?
@neophammdc Regarding introducing ToMany: was this with the same release that updated to ObjectBox 4.0.2? In any case, depending on the likelihood of the crash this might just be a coincidence. A potential workaround if your code does Box operations on a background thread: as the log output suggests, try to add a call to |
I tried calling BoxStore.closeThreadResources() before closing the thread. Now I don't have this issue anymore, I think this should be noted in the official documentation. Thank you so much |
I use the library on android, since upgrading to version 4.0.2 I sometimes encounter app crashes. I have no way to reproduce the problem but this never happened in older versions.
I found the problem here #610 (#610)
But in the app I never called BoxStore.close()
The text was updated successfully, but these errors were encountered: