flutter_playout
flutter_playout copied to clipboard
java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference
Am running on some devices , and am getting this exception :
E/PlayerLayout( 4516): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference E/PlayerLayout( 4516): at tv.mta.flutter_playout.video.PlayerLayout$2.run(PlayerLayout.java:480) E/PlayerLayout( 4516): at android.os.Handler.handleCallback(Handler.java:938) E/PlayerLayout( 4516): at android.os.Handler.dispatchMessage(Handler.java:99) E/PlayerLayout( 4516): at android.os.Looper.loop(Looper.java:223) E/PlayerLayout( 4516): at android.app.ActivityThread.main(ActivityThread.java:7656) E/PlayerLayout( 4516): at java.lang.reflect.Method.invoke(Native Method) E/PlayerLayout( 4516): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/PlayerLayout( 4516): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) D/PlayerLayout( 4516): onTime: [time=49] E/PlayerLayout( 4516): onTime:
Does it cause the app to crash?
No, it doesn't, it only shows a black screen @KhuramKhalid
This happens in the onTime
method when the event sink isn't ready before the stream has started but as you see in the error above as well, on the second last line, the onTime
method starts working as soon as event sink is available.
We can suppress the logging of this error but for now just ignore it.
@KhuramKhalid Why this issue has been closed? Do we have any potential fix for this or any workaround in order to mitigate this black screen issue?
I don't think this error causes black screen since this is caught, printed to logs and ignored. Also since this method is called after the stream has started playing so whatever caused black screen; already happened.
However, you're right this needs further investigation so will keep this open until we've found a fix.
If possible, please provide a stream url that produces this issue and I will try finding a solution.
Here's an example. https://cdn3.wowza.com/1/T0hFeU5yelVCK0xl/c3NYVkpw/hls/live/playlist.m3u8
I hope it helps in the investigation, @KhuramKhalid.