Closed dnutcracker closed 8 years ago
I'm really not sure what happened in this specific case. The stack seems to imply that the source was released whilst still enabled? Did you see the crash locally, or was it reported from analytics you have? If the first of those, do you have a more complete log. There was likely a preceding failure during disable, or something? If the second, the same question applies, and also do you have an overview of how often it occurs?
More generally, we should prevent exceptions in Loader.LoadTask.handleMessage from being able to cause process death, and have them result in playback failure instead.
I have the log(although the crash didn't happen locally) but unfortunately it doesn't add anything interesting. (No sign of any specific failure or anything out of the ordinary) From what I observed so far it only happened once. Another weird thing is that we use two tracking tools and only one of them was able to report this crash - The last entry in the log was that the app was paused and the crash happened ~25 minutes afterwards (!) and this probably explains why one of the tools didn't report it. Let me know if I can provide any more useful information.
Any progress ? it happened again: (ExoPlayer 1.5.2)
Stack trace:
java.lang.NullPointerException
at com.google.android.exoplayer.extractor.ExtractorSampleSource.restartFrom(ExtractorSampleSource.java:548)
at com.google.android.exoplayer.extractor.ExtractorSampleSource.onLoadCanceled(ExtractorSampleSource.java:500)
at com.google.android.exoplayer.upstream.Loader$LoadTask.handleMessage(Loader.java:240)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
Device: Samsung SCH-I535 Android : 4.4.2
I have same NPE.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.android.exoplayer.upstream.Loader.isLoading()' on a null object reference
at com.google.android.exoplayer.extractor.ExtractorSampleSource.restartFrom(ExtractorSampleSource.java:548)
at com.google.android.exoplayer.extractor.ExtractorSampleSource.onLoadCanceled(ExtractorSampleSource.java:500)
at com.google.android.exoplayer.upstream.Loader$LoadTask.handleMessage(Loader.java:240)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
it does not depend on the device or android version. About 20 crashes everyday from 3k user sessions(crashlytics). I saw the crash locally. It happens sometimes when i try to call "stop" in ExoPlayer.
Does this still happen on recent releases?
Closing due to lack of updates.
@ojw28 ,I have the detailed log,please check it.
03-14 22:33:31.602 3719 21478 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.android.exoplayer.upstream.Loader.isLoading()' on a null object reference
It is old lib,but I didnt find why it is.Should I update the lib?
03-14 22:33:31.482 3719 3719 I ExoPlayerImpl: Init 1.5.2
03-14 22:33:31.492 3719 3719 D NativeMediaController: setAnchorView
03-14 22:33:31.492 3719 3805 W Adreno-EGLSUB:
Encountered the following exception using latest dev (1.5.1) -
Device: samsung - SM-G900V Android API: 21
Can't say much more - but seems like ExoPlayer code should protect itself against this (probably rare) case.