Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference #75

Open
huxaiphaer opened this issue Jan 22, 2021 · 6 comments

Comments

@huxaiphaer
Copy link

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:

@KhuramKhalid
Copy link
Member

Does it cause the app to crash?

@huxaiphaer
Copy link
Author

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

@KhuramKhalid
Copy link
Member

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.

@pinkeshAubergine
Copy link

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

@KhuramKhalid KhuramKhalid reopened this Jan 23, 2021
@KhuramKhalid
Copy link
Member

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.

@Zamorite
Copy link

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

I hope it helps in the investigation, @KhuramKhalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants