[android-developers] Re: Phone crash on volume key
Hello, I've the same issue using SoundPool: *E/AudioFlinger( 7762): no more track names available* *E/AudioTrack( 7838): AudioFlinger could not create track, status: -12* *E/SoundPool( 7838): Error creating AudioTrack* I play short sounds several times and after a while I loose the sounds, than if I touch the volume key the device (Nexus S with Android 2.3.4) reboots. How do you solve this? If I use SoundPool.release() it is no longer possibile to use the SoundPool again... have you any hint? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Phone crash on volume key
Problem solved! Thanks On Dec 16, 7:34 pm, Dave Sparks davidspa...@android.com wrote: It sounds like your application is not releasing its media player resources. When you're done playing a sound, you need to call the MediaPlayer.release() method. If you're playing a lot of sounds rapidly, the garbage collector won't be able to keep up. Arguably, the runtime shouldn't reboot. I think we have a fix for this in the next release. On Dec 16, 11:35 am,bleucalmebleuca...@gmail.com wrote: Hi, In my application (SDK 1.0.r2), after playing few sounds, I loose the sounds. If I touch the volume keys, the device reboots. I get the same behavior on the emulator. Anybody had the same problem? 12-16 14:15:49.892: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:15:49.892: ERROR/AudioTrack(24): Could not get control block 12-16 14:15:49.892: ERROR/AudioSink(24): Unable to create audio track 12-16 14:15:49.892: ERROR/VorbisPlayer(24): mAudioSink open failed 12-16 14:16:15.661: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:16:15.672: ERROR/AudioTrack(24): Could not get control block 12-16 14:16:15.672: ERROR/AudioSink(24): Unable to create audio track 12-16 14:16:15.672: ERROR/VorbisPlayer(24): mAudioSink open failed 12-16 14:16:50.431: DEBUG/VolumePanel(48): onVolumeChanged(streamType: 2, flags: 17) 12-16 14:16:50.431: DEBUG/VolumePanel(48): onShowVolumeChanged (streamType: 2, flags: 17), index: 6 12-16 14:16:50.431: DEBUG/VolumePanel(48): setRingerIcon(index: 6), ringerMode: 2 12-16 14:16:50.461: INFO/NotificationService(48): enqueueToast pkg=android callback=android.widget.toast...@433f8408 duration=0 12-16 14:16:50.621: DEBUG/VolumePanel(48): onVolumeChanged(streamType: 2, flags: 4) 12-16 14:16:50.931: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:16:50.931: ERROR/AudioTrack(48): Could not get control block 12-16 14:16:50.931: ERROR/ToneGenerator(48): AudioTrack-initCheck failed 12-16 14:16:50.931: ERROR/ToneGenerator(48): ToneGenerator init failed 12-16 14:16:50.931: WARN/dalvikvm(48): threadid=15: thread exiting with uncaught exception (group=0x40010e28) 12-16 14:16:50.931: ERROR/AndroidRuntime(48): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception 12-16 14:16:50.931: ERROR/AndroidRuntime(48): *** EXCEPTION IN SYSTEM PROCESS. System will crash. 12-16 14:16:50.950: ERROR/AndroidRuntime(48): java.lang.RuntimeException: Init failed 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.media.ToneGenerator.native_setup(Native Method) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.media.ToneGenerator.init(ToneGenerator.java:225) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.getOrCreateToneGenerator(VolumePanel.java: 258) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.onPlaySound(VolumePanel.java:223) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.handleMessage(VolumePanel.java:329) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.os.Handler.dispatchMessage(Handler.java:88) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.os.Looper.loop(Looper.java:123) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at com.android.server.ServerThread.run(SystemServer.java:308) 12-16 14:16:51.052: INFO/Process(48): Sending signal. PID: 48 SIG: 9 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Phone crash on volume key
It sounds like your application is not releasing its media player resources. When you're done playing a sound, you need to call the MediaPlayer.release() method. If you're playing a lot of sounds rapidly, the garbage collector won't be able to keep up. Arguably, the runtime shouldn't reboot. I think we have a fix for this in the next release. On Dec 16, 11:35 am, bleucalme bleuca...@gmail.com wrote: Hi, In my application (SDK 1.0.r2), after playing few sounds, I loose the sounds. If I touch the volume keys, the device reboots. I get the same behavior on the emulator. Anybody had the same problem? 12-16 14:15:49.892: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:15:49.892: ERROR/AudioTrack(24): Could not get control block 12-16 14:15:49.892: ERROR/AudioSink(24): Unable to create audio track 12-16 14:15:49.892: ERROR/VorbisPlayer(24): mAudioSink open failed 12-16 14:16:15.661: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:16:15.672: ERROR/AudioTrack(24): Could not get control block 12-16 14:16:15.672: ERROR/AudioSink(24): Unable to create audio track 12-16 14:16:15.672: ERROR/VorbisPlayer(24): mAudioSink open failed 12-16 14:16:50.431: DEBUG/VolumePanel(48): onVolumeChanged(streamType: 2, flags: 17) 12-16 14:16:50.431: DEBUG/VolumePanel(48): onShowVolumeChanged (streamType: 2, flags: 17), index: 6 12-16 14:16:50.431: DEBUG/VolumePanel(48): setRingerIcon(index: 6), ringerMode: 2 12-16 14:16:50.461: INFO/NotificationService(48): enqueueToast pkg=android callback=android.widget.toast...@433f8408 duration=0 12-16 14:16:50.621: DEBUG/VolumePanel(48): onVolumeChanged(streamType: 2, flags: 4) 12-16 14:16:50.931: ERROR/AudioFlinger(24): no more track names availlable 12-16 14:16:50.931: ERROR/AudioTrack(48): Could not get control block 12-16 14:16:50.931: ERROR/ToneGenerator(48): AudioTrack-initCheck failed 12-16 14:16:50.931: ERROR/ToneGenerator(48): ToneGenerator init failed 12-16 14:16:50.931: WARN/dalvikvm(48): threadid=15: thread exiting with uncaught exception (group=0x40010e28) 12-16 14:16:50.931: ERROR/AndroidRuntime(48): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception 12-16 14:16:50.931: ERROR/AndroidRuntime(48): *** EXCEPTION IN SYSTEM PROCESS. System will crash. 12-16 14:16:50.950: ERROR/AndroidRuntime(48): java.lang.RuntimeException: Init failed 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.media.ToneGenerator.native_setup(Native Method) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.media.ToneGenerator.init(ToneGenerator.java:225) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.getOrCreateToneGenerator(VolumePanel.java: 258) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.onPlaySound(VolumePanel.java:223) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.view.VolumePanel.handleMessage(VolumePanel.java:329) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.os.Handler.dispatchMessage(Handler.java:88) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at android.os.Looper.loop(Looper.java:123) 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at com.android.server.ServerThread.run(SystemServer.java:308) 12-16 14:16:51.052: INFO/Process(48): Sending signal. PID: 48 SIG: 9 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---