objectbox-java: CRASH: SIGSEGV: libobjectbox-jni.so
Bug Description:
- Unexpected ANDROID native app crash
Basic info
- ObjectBox version: 3.1.3 (crash happened on previous version as well, we just tried to update ObjectBox as an attempt to fix it)
- Reproducibility: our team are not able to reproduce it on our end, we only see lots of crash reports on Firebase in production.
- Device: different devices Samsung - Galaxy S20+ 5G, Galaxy Note20 Ultra 5G, Galaxy S21 Ultra 5G LGE - Stylo 6 Xiaomi - Redmi K20 HUAWEI - HUAWEI P30 lite
- OS: Android 10, Android 11, Android 9, Android 12
To Reproduce Looks like crash happens occasionally without any specific steps, especially when users open app by push with the following trace:
Logs, stack traces
Crashed: Thread : SIGSEGV 0x000000000000012d
#00 pc 0x52c78 libobjectbox-jni.so
#01 pc 0x52c6c libobjectbox-jni.so
#02 pc 0x768639787c
#03 pc 0x7688c8126a
#04 pc 0x7688cfee8e
#05 pc 0x7688cfee8e
#06 pc 0x592bdc libart.so
#07 pc 0x768895430a
Additional context
- What we have already tried to do:
- We fully recreated objectbox schema
- We removed and created objectbox db file
But the crash still occurs with similar trace. Do you have any ideas for farther investigation since it’s really hard to figure out what has happend on user’s devices with such stack trace, so any advice will be really helpful.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
It was no single exception like that in crashlytics so far. However we got little bit more detailed exception for old crash:
So defenetely it was not about plain finds but about DataSubscribers. We are right now looking to such case:
We addded 3 more close() in our own code where it was missed. Also in upcoming release we will add additional closing for DataSubscriber. But overall yes - main change is removing close() from finalize.
We will check it with next release and will come back with updates. Thank you!
I did a little of gradle dependencies dark magic and was able to replace io.objectbox.objectbox-java with one builded from sources from this github + our little changes. What we did:
I’m still not fully understand what happened - we reviewd all our changes couple times after which we had crashes spike - and have not find any significant changes in objectbox usage(it was few - but after we reverted them nothing changes) So for us it’s still a peace of dark magic. We will prepare pull-request with changes which we made to objectbox-java to avoid crashes - and you can review and consider what to do with this.