cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12157) audio.startPlaying(null) causes NullPointerException
Date Wed, 18 Jan 2017 10:18:26 GMT

    [ https://issues.apache.org/jira/browse/CB-12157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15827784#comment-15827784
] 

ASF GitHub Bot commented on CB-12157:
-------------------------------------

Github user Venkat-TTapp commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/122
  
    Hi,
    Please let me know if this is not the right place to report this bug/issue.
    
    My app crashed 6 times when user return to back to content from Admob video ads. This
happens only with video ads.
    
    Below is the code from firebase:
    ```
    NullPointerException - AudioPlayer.readyPlayer
    
    Exception java.lang.NullPointerException:
    org.apache.cordova.media.AudioPlayer.readyPlayer (AudioPlayer.java:583)
    org.apache.cordova.media.AudioPlayer.startPlaying (AudioPlayer.java:299)
    org.apache.cordova.media.AudioHandler.resumeAllGainedFocus (AudioHandler.java:414)
    org.apache.cordova.media.AudioHandler$1.onAudioFocusChange (AudioHandler.java:431)
    android.media.AudioManager$FocusEventHandlerDelegate$1.handleMessage (AudioManager.java:1984)
    android.os.Handler.dispatchMessage (Handler.java:110)
    android.os.Looper.loop (Looper.java:193)
    android.app.ActivityThread.main (ActivityThread.java:5333)
    java.lang.reflect.Method.invokeNative (Method.java)
    java.lang.reflect.Method.invoke (Method.java:515)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
    com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
    dalvik.system.NativeStart.main (NativeStart.java)
    ```
    
    ****************
    Similar error:
    ```
    NullPointerException - String.compareTo
    
    Exception java.lang.NullPointerException: rhs == null
    
    java.lang.String.compareTo (String.java)
    org.apache.cordova.media.AudioPlayer.readyPlayer (AudioPlayer.java:583)
    org.apache.cordova.media.AudioPlayer.startPlaying (AudioPlayer.java:299)
    org.apache.cordova.media.AudioHandler.resumeAllGainedFocus (AudioHandler.java:414)
    org.apache.cordova.media.AudioHandler$1.onAudioFocusChange (AudioHandler.java:431)
    android.media.AudioManager$FocusEventHandlerDelegate$1.handleMessage (AudioManager.java:2228)
    android.os.Handler.dispatchMessage (Handler.java:111)
    android.os.Looper.loop (Looper.java:207)
    android.app.ActivityThread.main (ActivityThread.java:5776)
    java.lang.reflect.Method.invoke (Method.java)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
    com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)
    ```
    
    
    
    If you need further information please let me know.
    
    Regards,
    Venkat
    
    
    



> 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


Mime
View raw message