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

FD crashes in PathModel.RemoveFile #2744

Open
gene-pavlovsky opened this issue Mar 21, 2019 · 1 comment
Open

FD crashes in PathModel.RemoveFile #2744

gene-pavlovsky opened this issue Mar 21, 2019 · 1 comment

Comments

@gene-pavlovsky
Copy link
Contributor

What I was doing: executing a macro which writes the current document to a temp file (in the project's directory), runs an external process to format it, wait for the process to finish (FD blocks for several seconds, in this case it was >30 s since I was testing with an 80k loc file), then reloads the temp file and deletes it, then assigns the loaded text to the current document's content (this keeps the undo working). FD crashed at some point, probably after the file got deleted, or after Scintilla finished handling changing the document text.

Exception:

Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ASCompletion.Model.PathModel.RemoveFile(String fileName) in C:\project\flashdevelop\External\Plugins\ASCompletion\Model\PathModel.cs:line 587
   at ASCompletion.Model.PathModel.watcher_Deleted(Object sender, FileSystemEventArgs e) in C:\project\flashdevelop\External\Plugins\ASCompletion\Model\PathModel.cs:line 359
   at PluginCore.Bridge.WatcherEx.watcher_Deleted(Object sender, FileSystemEventArgs e) in C:\project\flashdevelop\PluginCore\PluginCore\Bridge\WatcherEx.cs:line 167
   at System.IO.FileSystemWatcher.OnDeleted(FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
@gene-pavlovsky
Copy link
Contributor Author

gene-pavlovsky commented Mar 21, 2019

The macro I was using (rename to HXFormat.cs). Uses haxe-formatter (haxelib install formatter).
HXFormat.txt

For the test file I just got some large code file and duplicated it's contents until it was ~80k loc.

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

No branches or pull requests

1 participant