Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11086

setVolume fires a Null pointer exception if called too soon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 2.9.1, 3.5.0
    • None
    • cordova-plugin-media

    Description

      On player creation, we can sometime observe:
      E/PluginManager( 5442): Uncaught exception from plugin
      E/PluginManager( 5442): java.lang.NullPointerException
      E/PluginManager( 5442): at org.apache.cordova.media.AudioPlayer.setVolume(AudioPlayer.java:441)
      E/PluginManager( 5442): at org.apache.cordova.media.AudioHandler.setVolume(AudioHandler.java:455)
      E/PluginManager( 5442): at org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:143)
      E/PluginManager( 5442): at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
      E/PluginManager( 5442): at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
      E/PluginManager( 5442): at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
      E/PluginManager( 5442): at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:135)
      E/PluginManager( 5442): at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:124)
      E/PluginManager( 5442): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:886)
      E/PluginManager( 5442): at android.os.Handler.dispatchMessage(Handler.java:99)
      E/PluginManager( 5442): at android.os.Looper.loop(Looper.java:137)
      E/PluginManager( 5442): at android.app.ActivityThread.main(ActivityThread.java:4921)
      E/PluginManager( 5442): at java.lang.reflect.Method.invokeNative(Native Method)
      E/PluginManager( 5442): at java.lang.reflect.Method.invoke(Method.java:511)
      E/PluginManager( 5442): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
      E/PluginManager( 5442): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
      E/PluginManager( 5442): at dalvik.system.NativeStart.main(Native Method)

      Attachments

        Activity

          People

            alsorokin Alexander Sorokin
            fafaman Fabrice Lebas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified