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

App crash on when pop a screen with youtube_player_flutter #8

Closed
davidgalarza opened this issue Apr 26, 2019 · 2 comments
Closed

App crash on when pop a screen with youtube_player_flutter #8

davidgalarza opened this issue Apr 26, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@davidgalarza
Copy link

First of all thanks for the plugin.

I'm having problems when I pop a screen that has the player view, here is a code example that has the issue:

Here is the error log when I pop the Screen: https://github.com/davidgalarza/youtube

D/AudioTrack(30978): stop() called with 938884 frames delivered
D/AndroidRuntime(30978): Shutting down VM
D/ (30978): PlayerBase::stop() from IPlayer
E/AndroidRuntime(30978): FATAL EXCEPTION: main
E/AndroidRuntime(30978): Process: com.example.youtube, PID: 30978
E/AndroidRuntime(30978): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayAdjustments android.view.Display.getDisplayAdjustments()' on a null object reference
E/AndroidRuntime(30978): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1746)
E/AndroidRuntime(30978): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
E/AndroidRuntime(30978): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
E/AndroidRuntime(30978): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
E/AndroidRuntime(30978): at android.view.Choreographer.doCallbacks(Choreographer.java:790)
E/AndroidRuntime(30978): at android.view.Choreographer.doFrame(Choreographer.java:721)
E/AndroidRuntime(30978): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
E/AndroidRuntime(30978): at android.os.Handler.handleCallback(Handler.java:808)
E/AndroidRuntime(30978): at android.os.Handler.dispatchMessage(Handler.java:101)
E/AndroidRuntime(30978): at android.os.Looper.loop(Looper.java:166)
E/AndroidRuntime(30978): at android.app.ActivityThread.main(ActivityThread.java:7529)
E/AndroidRuntime(30978): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30978): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/AndroidRuntime(30978): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
I/zygote64(30978): Do full code cache collection, code=248KB, data=170KB
I/zygote64(30978): After code cache collection, code=225KB, data=142KB
I/Process (30978): Sending signal. PID: 30978 SIG: 9
Lost connection to device.
Exited (sigterm)

My flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.13.5 17F77, locale es-EC)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.2)
[✓] VS Code (version 1.33.1)
[✓] Connected device (1 available)

My device is a Huawei P20 Lite

@sarbagyastha
Copy link
Owner

sarbagyastha commented Apr 26, 2019

It's flutter's issue with AndroidView. I think you know way better about the issue. 😉
BTW, The project you shared is working completely fine in my Redmi Note 7.

@sarbagyastha sarbagyastha added the bug Something isn't working label May 15, 2019
@vinodlee vinodlee mentioned this issue Aug 25, 2019
@mayurdhurpate
Copy link

I'm still getting these errors for some devices on Crashylytics while playing Youtube videos. I think, there is nothing which can be done on the plugin side, and we've to wait for flutter/flutter#26345 to be resolved?

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayAdjustments android.view.Display.getDisplayAdjustments()' on a null object reference
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1853)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1592)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7659)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1047)
       at android.view.Choreographer.doCallbacks(Choreographer.java:843)
       at android.view.Choreographer.doFrame(Choreographer.java:771)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1033)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:201)
       at android.app.ActivityThread.main(ActivityThread.java:6820)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:922)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants