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

"Null check operator used on a null value" in file watcher #43695

Open
nex3 opened this issue Oct 6, 2020 · 0 comments
Open

"Null check operator used on a null value" in file watcher #43695

nex3 opened this issue Oct 6, 2020 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. customer-dart-sass library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@nex3
Copy link
Member

nex3 commented Oct 6, 2020

This is from a user report (sass/dart-sass#1103), so please follow up with @Daijobou if you need more info to reproduce.

It looks like under some filesystem circumstances, possibly related to hibernation, dart:io's file watcher (possibly only on Windows?) can spontaneously produce a "Null check operator used on a null value" error with the following stack trace:

Null check operator used on a null value
#0      _FileSystemWatcher._cancel (dart:io-patch/file_patch.dart:177)
#1      _runGuarded (dart:async/stream_controller.dart:847)
#2      _BroadcastStreamController._callOnCancel (dart:async/broadcast_stream_controller.dart:358)
#3      _BroadcastStreamController._recordCancel (dart:async/broadcast_stream_controller.dart:229)
#4      _ControllerSubscription._onCancel (dart:async/stream_controller.dart:883)
#5      _BufferingStreamSubscription._cancel (dart:async/stream_impl.dart:228)
#6      _BufferingStreamSubscription.cancel (dart:async/stream_impl.dart:210)
#7      _WindowsDirectoryWatcher._startWatch.<anonymous closure> (package:watcher/src/directory_watcher/windows.dart:389)
#8      _rootRunBinary (dart:async/zone.dart:1222)
#9      _RootZone.runBinary (dart:async/zone.dart:1456)
#10     runZonedGuarded.<anonymous closure> (dart:async/zone.dart:1601)
#11     _CustomZone.handleUncaughtError (dart:async/zone.dart:1076)
#12     _nullErrorHandler (dart:async/stream_impl.dart:592)
#13     _rootRunBinary (dart:async/zone.dart:1214)
#14     _CustomZone.runBinary (dart:async/zone.dart:1107)
#15     _CustomZone.runBinaryGuarded (dart:async/zone.dart:1013)
#16     _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:376)
#17     _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:394)
#18     _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:294)#19     _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:132)
#20     _addErrorWithReplacement (dart:async/stream_pipe.dart:180)
#21     _ExpandStream._handleData (dart:async/stream_pipe.dart:246)
#22     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:157)
#23     _rootRunUnary (dart:async/zone.dart:1206)
#24     _CustomZone.runUnary (dart:async/zone.dart:1100)
#25     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005)
#26     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357)#27     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285)
#28     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808)
#29     _StreamController._add (dart:async/stream_controller.dart:682)
#30     _StreamController.add (dart:async/stream_controller.dart:624)
#31     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1563)
#32     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1045)
#33     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#34     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#35     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118)#36     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169)

This user was running Dart 2.9.3.

@nex3 nex3 added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) customer-dart-sass labels Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. customer-dart-sass library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant