Skip to content
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 in ScopedLeaksDb (IllegalStateException: Already closed) #2411

Closed
valeriyo opened this issue Aug 17, 2022 · 4 comments
Closed

Crash in ScopedLeaksDb (IllegalStateException: Already closed) #2411

valeriyo opened this issue Aug 17, 2022 · 4 comments

Comments

@valeriyo
Copy link

Description

    java.lang.IllegalStateException: Already closed
        at leakcanary.internal.activity.db.ScopedLeaksDb$DbOpener.checkClosed(ScopedLeaksDb.kt:69)
        at leakcanary.internal.activity.db.ScopedLeaksDb$DbOpener.getWritableDatabase(ScopedLeaksDb.kt:51)
        at leakcanary.internal.activity.db.Db$execute$1.invoke(Db.kt:35)
        at leakcanary.internal.activity.db.Db$execute$1.invoke(Db.kt:9)
        at leakcanary.internal.activity.db.Io$execute$2.invoke(Io.kt:44)
        at leakcanary.internal.activity.db.Io$execute$2.run(Io.kt:10)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
        at java.lang.Thread.run(Thread.java:1012)

Steps to Reproduce

  1. In Developer options, set "Background process limit" to zero.
  2. Launch a Leakcanary activity of your app, background it (so that it's killed)
  3. Launch the Leakcanary activity - it will crash.

Version Information

  • LeakCanary version: 2.9.1
  • Android OS version: 12
  • Gradle version: 7.4.2
@vzhilong
Copy link

same bug here.

@Drjacky
Copy link

Drjacky commented Aug 19, 2022

Same

leakcanary.internal.activity.db.ScopedLeaksDb$DbOpener.checkClosed (ScopedLeaksDb.kt:69)
      leakcanary.internal.activity.db.ScopedLeaksDb$DbOpener.close (ScopedLeaksDb.kt:57)
      leakcanary.internal.activity.db.Db$closeDatabase$1.invoke (Db.kt:47)
      leakcanary.internal.activity.db.Db$closeDatabase$1.invoke (Db.kt:9)
      leakcanary.internal.activity.db.IoKt$sam$java_lang_Runnable$0.run (Unknown Source:2)

@pyricau
Copy link
Member

pyricau commented Aug 22, 2022

Thanks for the report. Sorry, this is already fixed but.. needs a new release. Will try to release soon.

Duplicate of #2371

@pyricau pyricau closed this as completed Aug 22, 2022
@Llaria
Copy link

Llaria commented Sep 2, 2022

Thank U for ur job,can't wait.

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

No branches or pull requests

5 participants