To reproduce create a new solution and add a project of type c# (might work with anytype). Then add and xml file. Edit xml causing the window to become dirty. Use x in upper corner to close the document and when prompted to save file choose "No".
SD will then crash.
Basically the
\ParserServiceEntry.cs:line 322
fileContent = parser.GetFileContent(fileName);
Crash is here because parser is null;
parser is null because the parserdiscriptor is not defned therefore cannot be created.
SharpDevelop Version : 5.0.0.3832-Beta 1-0a7a97df
.NET Version : 4.0.30319.17929
OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture : English (Australia) (en-AU)
Running under WOW6432, processor architecture: x86-64
Working Set Memory : 160500kb
GC Heap Memory : 31546kb
Exception thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.DoParseAsync(ITextSource fileContent, IProject parentProject, Boolean requestFullParseInformation, CancellationToken cancellationToken) in f:\SharpSource\Source\src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 322
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.<ParseAsync>d__7.MoveNext() in f:\SharpSource\Source\src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 295
---- Recent log messages:
12:09:38.101 [1] WARN - Codon (AddSeparator) specified in the insertbefore of the [Codon: name = MenuItem, id = ManagePackages, addIn=F:\SharpSource\Source\bin\..\AddIns\Misc\PackageManagement\PackageManagement.addin] codon does not exist!
12:09:38.103 [1] WARN - Codon (AddSeparator) specified in the insertbefore of the [Codon: name = MenuItem, id = RestorePackages, addIn=F:\SharpSource\Source\bin\..\AddIns\Misc\PackageManagement\PackageManagement.addin] codon does not exist!
12:09:39.780 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.IClipboard
12:09:46.478 [1] DEBUG - Save C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml
12:09:46.492 [1] INFO - Open file C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml
12:09:46.497 [1] INFO - Loading addin HexEditor
12:09:46.651 [1] INFO - Loading addin Search & Replace
12:09:46.719 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.ILanguageService
12:09:46.760 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.Editor.Bookmarks.IBookmarkManager
12:09:47.040 [1] DEBUG - Trying to restore memento of '[AvalonEditViewContent C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml]' from key '1e13ec5:C:\USERS\K010072\DOCUMENTS\SHARPDEVELOP PROJECTS\BUG\BUG\XML1.XML'
12:09:47.155 [1] INFO - Initialize DirectoryNode C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug
12:09:47.166 [10] DEBUG - Git: OverlayIconManager Thread started
12:09:47.180 [1] DEBUG - ActiveWorkbenchWindowChanged to [AvalonWorkbenchWindow: Xml1.xml]
12:09:47.181 [1] DEBUG - NavigationService
ActiveViewContent: Xml1.xml
Subview: ${res:FormsDesigner.DesignTabPages.SourceTabPage}
12:09:47.182 [1] DEBUG - ActiveViewContentChanged to [AvalonEditViewContent C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml]
12:09:47.267 [10] DEBUG - Git: OverlayIconManager Thread finished
12:09:49.104 [1] DEBUG - ActiveContentChanged to [AvalonEditViewContent C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml]
12:09:53.266 [1] DEBUG - Saving memento of '[AvalonEditViewContent C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml]' to key '1e13ec5:C:\USERS\K010072\DOCUMENTS\SHARPDEVELOP PROJECTS\BUG\BUG\XML1.XML'
12:09:53.282 [1] DEBUG - ActiveViewContentChanged to
12:09:53.283 [1] DEBUG - ActiveContentChanged to
12:09:53.297 [1] DEBUG - XmlTreeView.Dispose
12:09:53.297 [1] DEBUG - OpenedFileClosed: C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug\Xml1.xml
12:09:53.298 [1] DEBUG - ActiveWorkbenchWindowChanged to
12:09:53.299 [13] ERROR -
--> Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.DoParseAsync(ITextSource fileContent, IProject parentProject, Boolean requestFullParseInformation, CancellationToken cancellationToken) in f:\SharpSource\Source\src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 322
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.<ParseAsync>d__7.MoveNext() in f:\SharpSource\Source\src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 295
12:09:53.316 [13] WARN - Stack trace of last exception log:
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at ICSharpCode.SharpDevelop.Logging.SDMessageService.ShowException(Exception ex, String message) in f:\SharpSource\Source\src\Main\SharpDevelop\Logging\SDMessageService.cs:line 29
at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message) in f:\SharpSource\Source\src\Main\Core\Project\Src\Services\MessageService\MessageService.cs:line 59
at ICSharpCode.SharpDevelop.SharpDevelopExtensions.<FireAndForget>b__0(Task t) in f:\SharpSource\Source\src\Main\Base\Project\Util\SharpDevelopExtensions.cs:line 101
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
---- Post-error application state information:
Installed 3rd party AddIns: [ThemeTool 0.0.0.0]
ProjectService.CurrentSolution: [Solution C:\Users\k010072\Documents\SharpDevelop Projects\Bug\Bug.sln with 1 projects]
ProjectService.CurrentProject: [CSharpProject: Bug]
Workbench.ActiveContent: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at ICSharpCode.SharpDevelop.DispatcherMessageLoop.VerifyAccess() in f:\SharpSource\Source\src\Main\SharpDevelop\Services\DispatcherMessageLoop.cs:line 65
at ICSharpCode.SharpDevelop.Workbench.WpfWorkbench.get_ActiveContent() in f:\SharpSource\Source\src\Main\SharpDevelop\Workbench\WpfWorkbench.cs:line 380
at ICSharpCode.SharpDevelop.Workbench.WorkbenchStartup.<InitializeWorkbench>b__0() in f:\SharpSource\Source\src\Main\SharpDevelop\Workbench\WorkbenchStartup.cs:line 83
at ICSharpCode.Core.ApplicationStateInfoService.GetCurrentApplicationStateInfo() in f:\SharpSource\Source\src\Main\Core\Project\Src\Services\ApplicationStateInfoService.cs:line 86