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

video_player_avplay crash #701

Closed
AMarozzi opened this issue Jul 11, 2024 · 2 comments · Fixed by #703
Closed

video_player_avplay crash #701

AMarozzi opened this issue Jul 11, 2024 · 2 comments · Fixed by #703

Comments

@AMarozzi
Copy link

Hello,

Sometimes when i try to play an mp4 file the video_player_avplay crash.

Here the log:

[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0 VideoPlayerController.initialize.errorListener (package:video_player_avplay/video_player.dart:480:51)
#1 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#2 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:386:15)
#3 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:402:7)
#4 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:306:7)
#5 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:128:11)
#6 _ForwardingStream._handleError (dart:async/stream_pipe.dart:95:10)
#7 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
#8 _RootZone.runBinaryGuarded (dart:async/zone.dart:1606:10)
#9 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:384:15)
#10 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:402:7)
#11 _DelayedError.perform (dart:async/stream_impl.dart:552:14)
#12 _PendingEvents.handleNext (dart:async/stream_impl.dart:646:11)
#13 _PendingEvents.schedule. (dart:async/stream_impl.dart:617:7)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0 VideoPlayerController.initialize.errorListener (package:video_player_avplay/video_player.dart:480:51)
#1 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#2 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:386:15)
#3 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:402:7)
#4 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:306:7)
#5 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:128:11)
#6 _ForwardingStream._handleError (dart:async/stream_pipe.dart:95:10)
#7 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
#8 _RootZone.runBinaryGuarded (dart:async/zone.dart:1606:10)
#9 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:384:15)
#10 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:402:7)
#11 _DelayedError.perform (dart:async/stream_impl.dart:552:14)
#12 _PendingEvents.handleNext (dart:async/stream_impl.dart:646:11)
#13 _PendingEvents.schedule. (dart:async/stream_impl.dart:617:7)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

@swift-kim
Copy link
Member

@JSUYA @xiaowei-guan Similar issue: #261

Both media_player.cc and plus_player.cc seem to have the issue (null pointer possibly being passed to SendError).

A possible fix (applied in video_player):

player->SendError("Player error",
std::string("Error: ") + get_error_message(error_code));

Another possible workaround is to edit video_player.dart directly.

@xiaowei-guan
Copy link
Contributor

@JSUYA @xiaowei-guan Similar issue: #261

Both media_player.cc and plus_player.cc seem to have the issue (null pointer possibly being passed to SendError).

A possible fix (applied in video_player):

player->SendError("Player error",
std::string("Error: ") + get_error_message(error_code));

Another possible workaround is to edit video_player.dart directly.

Ok, I will fix this issue.

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

Successfully merging a pull request may close this issue.

3 participants