Skip to content

Application crashes with java.util.concurrent.TimeoutException io.objectbox.BoxStore.close:707 #1201

Description

@avarughese-tripactions

Is there an existing issue?

Build info

  • ObjectBox version: 4.0.3
  • OS: Android 13, 14 and 15
  • Device/ABI/architecture: happening across various OEM's and models. Some samples is Pixel 8 pro, Pixel8, Pixel 6a, Open CPH2551 etc

Steps to reproduce

We cannot reproduce the issue so far. It's happening at random in production with the new version upgrade from 3.7.1 to 4.0.3. The majority cases are happening right at the start/initialization of Object Box. But there are cases where we are seeing this crash quite randomly while the app is running

Expected behavior

The app should not crash

Actual behavior

The app is mostly crashing right at startup and sometimes randomly while in middle of execution.

Code

Code
This is how we do the initialization 

try {
   
    val builder = MyObjectBox.builder()
    boxStore = builder.androidContext(context)
        .name(custom_name)
        .build()
} catch (error: DbException) {

   boxStore?.removeAllObjects()
    if(!retry){
		// try it one more time
    }
}

Logs, stack traces

java.util.concurrent.TimeoutException: io.objectbox.BoxStore.finalize() timed out after 10 seconds
at io.objectbox.BoxStore.close(BoxStore:707)
at io.objectbox.BoxStore.finalize(BoxStore:525)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:370)
at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:350)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:322)
at java.lang.Daemons$Daemon.run(Daemons.java:131)
at java.lang.Thread.run(Thread.java:1012)

Logs
[Paste your logs here]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions