[Solved] Uncaught exception thrown by finalizer java.lang.IllegalStateException: Binder has been finalized

This code

soundPool.release();
soundPool = null;

sometimes produces this error:

Uncaught exception thrown by finalizer
java.lang.IllegalStateException: Binder has been finalized!
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(Binder.java:503)
    at com.android.internal.app.IAppOpsService$Stub$Proxy.stopWatchingMode(IAppOpsService.java:431)
    at android.media.SoundPool.release(SoundPool.java:195)
    at android.media.SoundPool.finalize(SoundPool.java:204)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:217)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:200)
    at java.lang.Thread.run(Thread.java:818)

What can I do?

Enquirer: activity

||

Solution #1:

So I think this might be an Android bug. Looks suspiciously like this issue, which is marked as fixed in a “future version”: https://issuetracker.google.com/issues/37138597

Respondent: griffin2000

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.