-
Notifications
You must be signed in to change notification settings - Fork 298
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
Crash: Query.nativeFindFirst(Native method) #494
Comments
Thanks for reporting. Do you have some details on which devices (brand and model) this happens? |
Also, would it be possible for you to extract the offending code into a demo project? That would help us immensely. |
It happened on Samsung Note 3 (OS 5). It seemed no problem on OS 6 and above. |
The code is quite complicated......... There are 3 classes below. RelationSetup class
|
Asset class (the entity)
|
RelationSetupStatus
|
I removed multi threads, runInReadTx, runInTxAsync and synchronized, and it seemed worked. Maybe there was a dead lock. But it was not happening in OS 6 and above. |
Just a question: is it allowed to use the same query object in multiple read transactions ? |
Does that also apply to the older device where it initially crashed?
As long you synchronize all the calls to |
Yes. I changed the codes about the multi-threading and it is now working. I think the error came from the threading instead of ObjectBox. Sorry for spending your time. |
Even so, it should not crash like this. We'll keep an eye on it. Also if you have additional info, please share. |
I think the crash is due to the thread timeout, probably it was waiting for another thread to finish (I have a lot of threads running at the same time). |
#5 pc 0003a381 /data/app/com.next.space.cflow-gmt3IJl8WdffrgTa2TYXpg==/base.apk!/lib/armeabi-v7a/libobjectbox-jni.so (Java_io_objectbox_query_Query_nativeFindFirst+28) |
@NBXXF This issue is rather outdated. Can you please create a new one and fill out the bug report template with as much information as possible? |
I got a crash from the method query.build().findFirst(). It does not happen in emulator and modern device, but always (from what I observed) happened in older device.
Any clue?
Issue Basics
The text was updated successfully, but these errors were encountered: