Closed rizkyagungramadhan closed 2 years ago
Moved to objectbox-dart repo as this is using Flutter.
The underlying issue is that the transaction was not completed because it failed with a crash: "E/Box ( 9986): Storage error (code -30783)". This error is described as MDB_BAD_RSLOT
"Invalid reuse of reader locktable slot". @greenrobot Do you have an idea?
How does your WorkManager code look like? Does it maybe close the database when it finished all work?
@rizkyagungramadhan Are you using multiple isolates?
Moved to objectbox-dart repo as this is using Flutter.
The underlying issue is that the transaction was not completed because it failed with a crash: "E/Box ( 9986): Storage error (code -30783)". This error is described as
MDB_BAD_RSLOT
"Invalid reuse of reader locktable slot". @greenrobot Do you have an idea?How does your WorkManager code look like? Does it maybe close the database when it finished all work?
No, Im not closing the database either the WorkManager result error or success. Currently I'm handling with openStore() right after WorkManager process is done. At least it is working now. But is it should be fine to accessing database from multiple isolates since Im using same reference to the Store object in all isolates?
I am having the same error when trying to open my flutter project with another flutter engine. The reads of object box (on this other flutter engine) throws this error.
@gcostaapps Thanks, but what do you mean by "open my flutter project with another flutter engine"? Can you share more details about the project?
But is it should be fine to accessing database from multiple isolates since Im using same reference to the Store object in all isolates?
New releases have added a Store.attach
API for this purpose. There are now also Store.runInTransactionAsync
and Store.runAsync
for running database operations using simple callback style.
Closing this then. Feel free to comment or create a new issue if this is not resolved.
Hello thanks a lot for making my life easier with ObjectBox. I faced a problem when I implemented ObjectBox using WorkManager in Flutter.
In the process there are transactions in the form of reads and writes to the database, when the read -> download from Api -> insert process has been completed I get an error "Could not begin read transaction (another read transaction is still active on this thread)" when I retry to read database in the application (the process of inserting into the database all successful).
But when the process in Work Manager is still running, everything works normally for me when I want to access the database directly in the application.
This is my stacktrace :
I am using objectbox: ^1.3.0 Thank you, very happy if anyone can help me with this problem