Assigned
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Which Android build are you using? (e.g. OPP1.170223.012)
Which device did you use to reproduce this issue?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:https://developer.android.com/studio/debug/bug-report#bugreportdevice
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
Which Android build are you using? (e.g. OPP1.170223.012)
Which device did you use to reproduce this issue?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
[Deleted User] <[Deleted User]> #3
Hello,
The bug happens on 2 devices in production and I couldn't reproduce yet on my test device... the issue randomly happens 2 or 3 times a day (my customer's player is playing tracks all the day).
The 2 devices are both "Galaxy Tab A8 Samsung Model SM-X200" with Android 12. I don't have the exact build id.
If I can reproduce on my device I'll send you a bug report for sure.
Since then, may you help me to understand this error with extra code -19?
Have a nice day,
François
The bug happens on 2 devices in production and I couldn't reproduce yet on my test device... the issue randomly happens 2 or 3 times a day (my customer's player is playing tracks all the day).
The 2 devices are both "Galaxy Tab A8 Samsung Model SM-X200" with Android 12. I don't have the exact build id.
If I can reproduce on my device I'll send you a bug report for sure.
Since then, may you help me to understand this error with extra code -19?
Have a nice day,
François
[Deleted User] <[Deleted User]> #4
I have 2 infos to add:
- I got the build id: 12(SP1A.210812.016.X200XXU1BVI6)
- the kernel version: 4.14.199-24941049-abX200XXU1BVI6
- and a stacktrace:
java.lang.Exception: [MediaPlayerService] error: MEDIA_INFO_UNSUPPORTED_AUDIO 0
at com.martini.MediaPlayerService.onInfo(MediaPlayerService.java:4)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:4210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Is it enough to identify what does the error mean?
- I got the build id: 12(SP1A.210812.016.X200XXU1BVI6)
- the kernel version: 4.14.199-24941049-abX200XXU1BVI6
- and a stacktrace:
java.lang.Exception: [MediaPlayerService] error: MEDIA_INFO_UNSUPPORTED_AUDIO 0
at com.martini.MediaPlayerService.onInfo(MediaPlayerService.java:4)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:4210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Is it enough to identify what does the error mean?
[Deleted User] <[Deleted User]> #5
Hello,
I have finally reproduced the error!
So here is the bugreport:https://drive.google.com/file/d/1ZDV4qDjSzrYLC01zbzNAQtiOe7y_zomJ/view?usp=sharing
If you want to find the error in the logs then look for "MediaPlayer: Error (1,-19)"
Cheers
François
I have finally reproduced the error!
So here is the bugreport:
If you want to find the error in the logs then look for "MediaPlayer: Error (1,-19)"
Cheers
François
vi...@google.com <vi...@google.com> #7
We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
[Deleted User] <[Deleted User]> #8
Ok thank you very much. If it can helps, we found that the issue is caused by a memory leak, like we explain in the stackoverflow issue:
"
When I play tracks in my app, I need to create one player, do a fade in and when the track is going to end, I start a new playing while I am fading out the volume of the current one. When the fade out is over I always release the player. I have to do that to get a crossfade between the tracks. I should never get more that 2 players (and audio tracks) instances concurrently. But it looks like, sometimes, the audio tracks persists in memory.
I can see it with the command adb shell dumpsys media.audio_flinger | ag 'are active' that can print for instance: 5 Tracks of which 5 are active while I can only have two tracks playing at the same time.
"
So as I said I see the number of AudioTrack growing in memory. Usually it happens when the players are not released. But here I am releasing every players. Also the issue do not happens on Android 11 whatever the device.
Also I cannot reproduce the audiotrack memory leak with the Android 12 emulator but only with my Samsung devices running Android 12.
Thank you,
François
"
When I play tracks in my app, I need to create one player, do a fade in and when the track is going to end, I start a new playing while I am fading out the volume of the current one. When the fade out is over I always release the player. I have to do that to get a crossfade between the tracks. I should never get more that 2 players (and audio tracks) instances concurrently. But it looks like, sometimes, the audio tracks persists in memory.
I can see it with the command adb shell dumpsys media.audio_flinger | ag 'are active' that can print for instance: 5 Tracks of which 5 are active while I can only have two tracks playing at the same time.
"
So as I said I see the number of AudioTrack growing in memory. Usually it happens when the players are not released. But here I am releasing every players. Also the issue do not happens on Android 11 whatever the device.
Also I cannot reproduce the audiotrack memory leak with the Android 12 emulator but only with my Samsung devices running Android 12.
Thank you,
François
vi...@google.com <vi...@google.com> #9
Thanks for the above information, we have passed it with our engineering team.
Our engineering team is still working on this issue. We will provide more updates as they become available.
Description
- The error occurs randomly, sometimes the same file can be played without error but sometimes I get this error:
MEDIA_ERROR_UNKNOWN with the "extra" code -19 through the listener setOnErrorListener. It is followed by an "info" MEDIA_INFO_UNSUPPORTED_AUDIO with the extra code 0.
- The files that we are playing are stored locally and are AAC encoded .mp4.
- I have the error on 2 Galaxy Tabs devices since the user did the update from Android v11 to v12.
- I found in that the error code -19 could be the ERROR_NATIVESETUP_INVALIDSTREAMTYPE constant defined in the AudioTrack class but I could not find any documentation about that (
- I found the same error code in the core c implementation: AUDIOTRACK_ERROR_SETUP_INVALIDSTREAMTYPE
- However I didn't find any mention of this error in the documentation. What should I do with it?
3.