flutter_playout icon indicating copy to clipboard operation
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

Open huxaiphaer opened this issue 4 years ago • 6 comments

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:

huxaiphaer avatar Jan 22 '21 09:01 huxaiphaer

Does it cause the app to crash?

KhuramKhalid avatar Jan 22 '21 19:01 KhuramKhalid

No, it doesn't, it only shows a black screen @KhuramKhalid

huxaiphaer avatar Jan 22 '21 19:01 huxaiphaer

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 avatar Jan 22 '21 20:01 KhuramKhalid

@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?

pinkeshAubergine avatar Jan 23 '21 18:01 pinkeshAubergine

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.

KhuramKhalid avatar Jan 23 '21 19:01 KhuramKhalid

Here's an example. https://cdn3.wowza.com/1/T0hFeU5yelVCK0xl/c3NYVkpw/hls/live/playlist.m3u8

I hope it helps in the investigation, @KhuramKhalid.

Zamorite avatar Apr 15 '21 10:04 Zamorite