You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/10 14:05:58 UTC
[jira] [Commented] (CB-12157) audio.startPlaying(null) causes
NullPointerException
[ https://issues.apache.org/jira/browse/CB-12157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15737921#comment-15737921 ]
ASF GitHub Bot commented on CB-12157:
-------------------------------------
Github user youhammi commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/122
Please I have this issue but with different error stack like below:
`Exception java.lang.RuntimeException: Unable to destroy activity {com.sayoo.challenge/com.sayoo.challenge.MainActivity}: java.util.ConcurrentModificationException
android.app.ActivityThread.performDestroyActivity (ActivityThread.java:4199)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:4217)
android.app.ActivityThread.access$1500 (ActivityThread.java:177)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1502)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:145)
android.app.ActivityThread.main (ActivityThread.java:5942)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1400)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1195)
arrow_drop_down
Caused by java.util.ConcurrentModificationException:
java.util.HashMap$HashIterator.nextEntry (HashMap.java:787)
java.util.HashMap$ValueIterator.next (HashMap.java:819)
org.apache.cordova.media.AudioHandler.onDestroy (AudioHandler.java:198)
org.apache.cordova.PluginManager.onDestroy (PluginManager.java:298)
org.apache.cordova.CordovaWebViewImpl.handleDestroy (CordovaWebViewImpl.java:480)
org.apache.cordova.CordovaActivity.onDestroy (CordovaActivity.java:305)
android.app.Activity.performDestroy (Activity.java:6519)
android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1154)
android.app.ActivityThread.performDestroyActivity (ActivityThread.java:4177)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:4217)
android.app.ActivityThread.access$1500 (ActivityThread.java:177)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1502)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:145)
android.app.ActivityThread.main (ActivityThread.java:5942)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1400)`
Please your help o figure out the problem, and also when the previous merge could be on official version
> audio.startPlaying(null) causes NullPointerException
> ----------------------------------------------------
>
> Key: CB-12157
> URL: https://issues.apache.org/jira/browse/CB-12157
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Affects Versions: Master
> Environment: android
> Reporter: Frank Koenigstein
> Labels: Android
> Fix For: Master
>
>
> When AudioHandler.resumeAllGainedFocus is called it calls each AudioPlayer with startPlaying(null). That causes a NullPointerException:
> {code}
> 11-16 16:13:11.071 E/AndroidRuntime(30650): FATAL EXCEPTION: JavaBridge
> 11-16 16:13:11.071 E/AndroidRuntime(30650): java.lang.NullPointerException
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at org.apache.cordova.media.AudioPlayer.readyPlayer(AudioPlayer.java:583)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at org.apache.cordova.media.AudioPlayer.startPlaying(AudioPlayer.java:299)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at org.apache.cordova.media.AudioHandler.resumeAllGainedFocus(AudioHandler.java:414)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at org.apache.cordova.media.AudioHandler$1.onAudioFocusChange(AudioHandler.java:431)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at android.media.AudioManager$FocusEventHandlerDelegate$1.handleMessage(AudioManager.java:2044)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at android.os.Handler.dispatchMessage(Handler.java:102)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at android.os.Looper.loop(Looper.java:136)
> 11-16 16:13:11.071 E/AndroidRuntime(30650): at android.os.HandlerThread.run(HandlerThread.java:61)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org