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

调动 V2TXLivePlayer 的 destroy() 方法会导致 app闪退 #8

Open
weishirongzhen opened this issue Mar 25, 2022 · 2 comments
Open

Comments

@weishirongzhen
Copy link

E/AndroidRuntime( 8987): java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
E/AndroidRuntime( 8987): at com.tencent.live.plugin.V2TXLivePlayerPlugin$V2TXLivePlayerObserverImpl.invokeListener(V2TXLivePlayerPlugin.java:520)
E/AndroidRuntime( 8987): at com.tencent.live.plugin.V2TXLivePlayerPlugin$V2TXLivePlayerObserverImpl.onStatisticsUpdate(V2TXLivePlayerPlugin.java:466)
E/AndroidRuntime( 8987): at com.tencent.live2.leb.b$17.run(TXLEBPlayerImpl.java:536)
E/AndroidRuntime( 8987): at android.os.Handler.handleCallback(Handler.java:900)
E/AndroidRuntime( 8987): at android.os.Handler.dispatchMessage(Handler.java:103)
E/AndroidRuntime( 8987): at android.os.Looper.loop(Looper.java:219)
E/AndroidRuntime( 8987): at android.app.ActivityThread.main(ActivityThread.java:8668)
E/AndroidRuntime( 8987): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8987): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
E/AndroidRuntime( 8987): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)

@EricPHPH
Copy link

EricPHPH commented Apr 8, 2022

遇到了相同的问题,不过不是每次都发生,只是偶尔出现。应该是原生那边destroy后将channel置为null了,onStatisticsUpdate方法这个时候异步调用了。导致空指针异常。建议在invokeListener中添加对mChannel的空判断。

@githubliuqi
Copy link

后续会修复完善。

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

3 participants