Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
Can you please provide the below requested information to better understand the issue:
Steps to reproduce
What steps do others need to take in order to reproduce the issue themselves?
Please provide source code or apk of a sample application to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
Steps to reproduce
What steps do others need to take in order to reproduce the issue themselves?
Please provide source code or apk of a sample application to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
tr...@gmail.com <tr...@gmail.com> #3
Frequency: 100%
Expected output: no exception from finalizer thread
Current output: java.lang.IllegalStateException (as in description)
Sample application: I will create one and attach later
Expected output: no exception from finalizer thread
Current output: java.lang.IllegalStateException (as in description)
Sample application: I will create one and attach later
tr...@gmail.com <tr...@gmail.com> #4
Minimalistic exaple app with 100% issue frequency.
Steps to reproduce:
1. run the app
2. leave the app (i.e. go to home screen, do not kill the app)
3. wait a few seconds for garbage collector
4. observe the logcat for Uncaught exception thrown by finalizer
Steps to reproduce:
1. run the app
2. leave the app (i.e. go to home screen, do not kill the app)
3. wait a few seconds for garbage collector
4. observe the logcat for Uncaught exception thrown by finalizer
ar...@google.com <ar...@google.com> #5
We have passed this defect on to the development team and will update this issue with more information as it becomes available.
ar...@google.com <ar...@google.com> #6
The development team has fixed the issue that you have reported and it will be available in a future build.
ga...@gmail.com <ga...@gmail.com> #7
Which build has this been fixed in, we are hitting the same issue.
ha...@gmail.com <ha...@gmail.com> #8
Can we know the check in URL to check for the fix ?
sh...@gmail.com <sh...@gmail.com> #9
Hi, Can we know the gerrit URL for patch?
Description
1. create more than one instance of AudioTrack
2. start static looped playback
3. stop() and relese() all AudioTracks
4. finish activity to let the AudioTracks.finalize() run by gc
Observe exception from every but first AudioTracks.finalize():
java.lang.IllegalStateException: Binder has been finalized!
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at com.android.internal.app.IAppOpsService$Stub$Proxy.stopWatchingMode(IAppOpsService.java:435)
at android.media.PlayerBase.baseRelease(PlayerBase.java:136)
at android.media.AudioTrack.finalize(AudioTrack.java:979)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
at java.lang.Thread.run(Thread.java:761)
Problem seems to be related to double calls to some release code (one by manually called AudioTrack.relese() and another caused by AudioTrack.finalize()
I am using Android 7.1.2 (API 25) Nexus 5X.
Compile, build and target version 25.
When I don't call AudioTrack.relese() at all, problem is not reproducible, however, I cannot create many AudioTrack objects then.
The only work-around I found was to extend AudioTrack and swallow exceptions in finalize().