dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.24k stars 1.58k forks source link

Watcher exception #22139

Closed danrubel closed 3 years ago

danrubel commented 9 years ago

Just saw this in my log with Analysis Server turned on...

NoSuchMethodError: method not found: 'path' Receiver: null Arguments: []

­0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)

­1 _FileSystemWatcher._listenOnSocket.<anonymous closure>.getPath (dart:io-patch/file_patch.dart:164)

­2 _FileSystemWatcher._listenOnSocket.<anonymous closure> (dart:io-patch/file_patch.dart:197)

­3 _rootRunUnary (dart:async/zone.dart:906)

­4 _CustomZone.runUnary (dart:async/zone.dart:804)

­5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:712)

­6 _StreamController.add (dart:async/stream_controller.dart:412)

­7 _RawSocket._RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1300)

­8 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:695)

­9 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

stereotype441 commented 9 years ago

I believe this is a VM bug, since the only code on the stack trace is coming from "dart:io-patch" URI's. It seems that an anonymous closure inside _FileSystemWatcher._listenOnSocket (a function inside the VM patch files) is trying to use a "path" getter on a null object.


Set owner to @iposva-google. Removed Area-Analyzer label. Added Area-VM label.

iposva-google commented 9 years ago

Removed the owner. Removed Area-VM label. Added Area-Library, Library-IO labels.

brianquinlan commented 3 years ago

You couldn't happen to have some code that demonstrates this issue, would you?

brianquinlan commented 3 years ago

Also, what platform were you using if you recall?

danrubel commented 3 years ago

Probably on a Mac, but as this was over 6 years ago, my memory of this is vague at best.

brianquinlan commented 3 years ago

Thanks @danrubel

I created a test program that creates many FS changes while closing the StreamSubscription at random points but can't reproduce this bug.

There have been some possible fixes made in the last 6 years e.g. https://github.com/dart-lang/sdk/commit/04879fa4cdc2fc173b99472bae186feecc7e08e0

So my intent is to close this unless we have a repro case.

brianquinlan commented 3 years ago

Can not reproduce.