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

[VideoPlayer]Null check operator used on a null value #261

Closed
xiaowei-guan opened this issue Nov 2, 2021 · 3 comments · Fixed by #262
Closed

[VideoPlayer]Null check operator used on a null value #261

xiaowei-guan opened this issue Nov 2, 2021 · 3 comments · Fixed by #262
Assignees
Labels
bug Something isn't working

Comments

@xiaowei-guan
Copy link
Contributor

E/ConsoleMessage(19508): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
E/ConsoleMessage(19508): #0 VideoPlayerController.initialize.errorListener (package:video_player/video_player.dart:381:51)
E/ConsoleMessage(19508): #1 _rootRunUnary (dart:async/zone.dart:1436:47)
E/ConsoleMessage(19508): #2 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/ConsoleMessage(19508): #3 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
E/ConsoleMessage(19508): #4 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:362:15)
E/ConsoleMessage(19508): #5 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:7)
E/ConsoleMessage(19508): #6 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
E/ConsoleMessage(19508): #7 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:128:11)
E/ConsoleMessage(19508): #8 _ForwardingStream._handleError (dart:async/stream_pipe.dart:95:10)
E/ConsoleMessage(19508): #9 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
E/ConsoleMessage(19508): #10 _rootRunBinary (dart:async/zone.dart:1452:47)
E/ConsoleMessage(19508): #11 _CustomZone.runBinary (dart:async/zone.dart:1342:19)
E/ConsoleMessage(19508): #12 _
E/ConsoleMessage(19508): CustomZone.runBinaryGuarded (dart:async/zone.dart:1252:7)
E/ConsoleMessage(19508): #13 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360:15)
E/ConsoleMessage(19508): #14 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:7)
E/ConsoleMessage(19508): #15 _DelayedError.perform (dart:async/stream_impl.dart:602:14)
E/ConsoleMessage(19508): #16 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/ConsoleMessage(19508): #17 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
E/ConsoleMessage(19508): #18 _rootRun (dart:async/zone.dart:1420:47)
E/ConsoleMessage(19508): #19 _CustomZone.run (dart:async/zone.dart:1328:19)
E/ConsoleMessage(19508): #20 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/ConsoleMessage(19508): #21 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
E/ConsoleMessage(19508): #22 _rootRun (dart:async/zone.dart:1428:13)
E/ConsoleMessage(19508): #23 _CustomZone.run (dart:async/zone.dart:1328:19)
E/ConsoleMessage(19508): #24 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/ConsoleMessage(19508): #25 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
E/ConsoleMessage(19508): #26 _microtaskLoop (dart:async/schedule_mic
E/ConsoleMessage(19508): rotask.dart:40:21)
E/ConsoleMessage(19508): #27 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

@xiaowei-guan xiaowei-guan self-assigned this Nov 2, 2021
@xiaowei-guan xiaowei-guan changed the title [VideoPlayerPlugin]Null check operator used on a null value [VideoPlayer]Null check operator used on a null value Nov 2, 2021
@swift-kim
Copy link
Member

I had the same error when testing the camera_tizen plugin and here's an easy fix:

diff --git a/packages/video_player/tizen/src/video_player.cc b/packages/video_player/tizen/src/video_player.cc
index 4a34801..8a5ad0c 100644
--- a/packages/video_player/tizen/src/video_player.cc
+++ b/packages/video_player/tizen/src/video_player.cc
@@ -528,7 +528,8 @@ void VideoPlayer::onInterrupted(player_interrupted_code_e code, void *data) {

   if (player->event_sink_) {
     LOG_INFO("[VideoPlayer.onInterrupted] send error event");
-    player->event_sink_->Error("Video player is interrupted", "");
+    player->event_sink_->Error("Video player is interrupted",
+                               "Video player is interrupted");
   }
 }

(You may change the error tag and error message as you want.)

@swift-kim
Copy link
Member

I'll take care of this issue if you haven't done yet.

@xiaowei-guan
Copy link
Contributor Author

I'll take care of this issue if you haven't done yet.

Ok

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

Successfully merging a pull request may close this issue.

2 participants