-
Notifications
You must be signed in to change notification settings - Fork 41
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 close when pop screen with flutter_youtube_view #5
Comments
Hello @davidgalarza , Can you post your sample code? |
It does not always close but it happens at least 1 out of 3 times. import 'package:flutter/material.dart'; class PullRequest extends StatefulWidget { @OverRide class _PullRequestState extends State _PullRequestState(this.pullInfo); @OverRide @OverRide // YOUTUBE LOGIC @OverRide @OverRide @OverRide @OverRide @OverRide void _onYoutubeCreated(FlutterYoutubeViewController controller) { void _handleTimeChange(double seconds) { Widget _buildBodyHead() { Widget _buildBody() {
} @OverRide |
@davidgalarza Thank you |
@hoanglm4 Thanks but I continue having the same problem. I try downloading and running the example app and the error persist the playback works fine but when I pop the screen it closes the app, here is the full log:
I try with another smartphone with the example app too and I get other error when starting the video playback there is lag and after a few seconds the app hangs and the video keeps sounding, the only alternative is to turn off the phone here is the log:
|
Hello @davidgalarza , |
Any update? |
Hello @davidgalarza , Thank you so much. But I cannot re-produce in my phone (Samsung SM-J700H and samsung SM-J730G). Sorry for the slow response. |
Hi, thanks for your help. I installed the native apk and I can confirm that it works correctly, the example I sends you (https://github.com/davidgalarza/youtube_example_error) does not work. I do not know why this should be, I think it should be a problem with only some devices. I can verify that the problem occurs in a huawei P20 Lite and a huawei P8. |
Hello @davidgalarza I think have problem with AndroidView. I have created sample for AndroidView. Can you help me test it? I have attached apk file in below. APK: app-debug Related issue: flutter/flutter#26345 Thanks |
I do not know if it can be related to flutter/flutter#26345. The apk you sent me is working as expected shows the text "Testing AndroidView" without any problem I can push or pop the page without the app crash. |
I found this issue too flutter/flutter#27190 Which I think is related to the problem I have in the Huawei p8 |
The player works good but when I pop the current screen with the vide I get this error and app close.
D/AudioTrack(16645): stop() called with 198724 frames delivered
D/ (16645): PlayerBase::stop() from IPlayer
V/AudioManager(16645): requestAudioFocus streamType: 3 durationHint: 1
V/AudioManager(16645): registerAudioFocusListener...
V/AudioManager(16645): unregisterAudioFocusListener...
I/AudioManager(16645): abandonAudioFocus
D/AndroidRuntime(16645): Shutting down VM
E/AndroidRuntime(16645): FATAL EXCEPTION: main
E/AndroidRuntime(16645): Process: com.sounter.sounter, PID: 16645
E/AndroidRuntime(16645): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayAdjustments android.view.Display.getDisplayAdjustments()' on a null object reference
E/AndroidRuntime(16645): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1746)
E/AndroidRuntime(16645): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
E/AndroidRuntime(16645): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
E/AndroidRuntime(16645): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
E/AndroidRuntime(16645): at android.view.Choreographer.doCallbacks(Choreographer.java:790)
E/AndroidRuntime(16645): at android.view.Choreographer.doFrame(Choreographer.java:721)
E/AndroidRuntime(16645): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
E/AndroidRuntime(16645): at android.os.Handler.handleCallback(Handler.java:808)
E/AndroidRuntime(16645): at android.os.Handler.dispatchMessage(Handler.java:101)
E/AndroidRuntime(16645): at android.os.Looper.loop(Looper.java:166)
E/AndroidRuntime(16645): at android.app.ActivityThread.main(ActivityThread.java:7529)
E/AndroidRuntime(16645): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16645): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/AndroidRuntime(16645): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
I/Process (16645): Sending signal. PID: 16645 SIG: 9
Lost connection to device.
The text was updated successfully, but these errors were encountered: