Bug 13522 - Editor null-ref exception when closing specific c# file
Summary: Editor null-ref exception when closing specific c# file
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: PC Linux
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-07-26 13:25 UTC by alex
Modified: 2013-07-26 14:43 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description alex 2013-07-26 13:25:26 UTC
Imho, MonoDevelop *must not* shut down when such an error occurs -- as soon as I close this file:

https://github.com/aBothe/Mono-D/blob/master/MonoDevelop.DBinding/Projects/AbstractDProject.cs


System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.TextEditor.DiffTracker.HandleLineRemoved (System.Object sender, Mono.TextEditor.LineEventArgs e) [0x00000] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/DiffTracker.cs:72 
  at (wrapper delegate-invoke) System.EventHandler`1<Mono.TextEditor.LineEventArgs>:invoke_void__this___object_TEventArgs (object,Mono.TextEditor.LineEventArgs)
  at Mono.TextEditor.LineSplitter.OnLineRemoved (Mono.TextEditor.LineEventArgs e) [0x0000d] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs:465 
  at Mono.TextEditor.LineSplitter.RemoveLine (Mono.TextEditor.TreeNode line) [0x0001f] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs:514 
  at Mono.TextEditor.LineSplitter.TextRemove (Int32 offset, Int32 length) [0x00099] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs:128 
  at Mono.TextEditor.LineSplitter.TextReplaced (System.Object sender, Mono.TextEditor.DocumentChangeEventArgs args) [0x0000c] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs:98 
  at Mono.TextEditor.TextDocument.Replace (Int32 offset, Int32 count, System.String value, AnchorMovementType anchorMovementType) [0x0011c] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:251 
  at Mono.TextEditor.TextDocument.Replace (Int32 offset, Int32 count, System.String value) [0x00000] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:219 
  at Mono.TextEditor.TextDocument.Remove (Int32 offset, Int32 count) [0x00000] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:209 
  at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.StripHeaderAndBlankLines (System.String text, System.CodeDom.Compiler.CodeDomProvider provider) [0x000a9] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs:612 
  at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.FormatGeneratedFile (System.String file, System.String content, MonoDevelop.Projects.Project project, System.CodeDom.Compiler.CodeDomProvider provider) [0x00000] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs:572 
  at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.GenerateSteticCodeStructure (MonoDevelop.Projects.DotNetProject project, Stetic.ProjectItemInfo item, Stetic.Component component, Stetic.ComponentNameEventArgs args, Boolean saveToFile, Boolean overwrite) [0x0021a] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs:366 
  at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.GenerateSteticCodeStructure (MonoDevelop.Projects.DotNetProject project, Stetic.Component component, Stetic.ComponentNameEventArgs args, Boolean saveToFile, Boolean overwrite) [0x00000] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderService.cs:298 
  at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderView.OnPageShown (Int32 npage) [0x0003c] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderView.cs:250 
  at MonoDevelop.GtkCore.GuiBuilder.CombinedDesignView.OnActiveViewContentChanged (System.Object o, MonoDevelop.Ide.Gui.ActiveViewContentEventArgs e) [0x00011] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/CombinedDesignView.cs:134 
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_ActiveViewContentEventArgs (object,MonoDevelop.Ide.Gui.ActiveViewContentEventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_ActiveViewContentEventArgs (object,MonoDevelop.Ide.Gui.ActiveViewContentEventArgs)
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.OnActiveViewContentChanged (MonoDevelop.Ide.Gui.ActiveViewContentEventArgs e) [0x00014] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:711 
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.SetCurrentView (Int32 newIndex) [0x00155] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:647 
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow+<InsertButton>c__AnonStorey43.<>m__45 (System.Object sender, System.EventArgs e) [0x0005e] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:544 
  at MonoDevelop.Components.Tab.OnActivated (System.EventArgs e) [0x00011] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs:357 
  at MonoDevelop.Components.Tab.Activate () [0x00007] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs:265 
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.OnActivated () [0x00027] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:232 
  at MonoDevelop.Ide.Gui.DefaultWorkbench.OnActiveWindowChanged (System.Object sender, System.EventArgs e) [0x000bc] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:755 
  at MonoDevelop.Ide.Gui.DockNotebook.set_CurrentTab (IDockNotebookTab value) [0x000c3] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs:143 
  at MonoDevelop.Ide.Gui.DockNotebook.set_CurrentTabIndex (Int32 value) [0x0002d] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs:154 
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.SelectWindow () [0x00012] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:237 
  at MonoDevelop.Ide.Gui.DefaultWorkbench.SelectLastActiveWindow (IWorkbenchWindow cur) [0x00076] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:1154 
  at MonoDevelop.Ide.Gui.DefaultWorkbench.CloseWindowEvent (System.Object sender, MonoDevelop.Ide.Gui.WorkbenchWindowEventArgs e) [0x0003a] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:1167 
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_WorkbenchWindowEventArgs (object,MonoDevelop.Ide.Gui.WorkbenchWindowEventArgs)
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.OnClosed (MonoDevelop.Ide.Gui.WorkbenchWindowEventArgs e) [0x00015] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:704 
  at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.CloseWindow (Boolean force, Boolean animate) [0x00051] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:382 
  at MonoDevelop.Ide.Gui.DefaultWorkbench.CloseClicked (System.Object o, MonoDevelop.Ide.Gui.TabEventArgs e) [0x00013] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:1175 
  at MonoDevelop.Ide.Gui.DockNotebook.OnCloseTab (MonoDevelop.Ide.Gui.DockNotebookTab tab) [0x00021] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs:257 
  at MonoDevelop.Ide.Gui.TabStrip.OnButtonReleaseEvent (Gdk.EventButton evnt) [0x0005c] in /run/media/lx/Home.alt/lx/Dokumente/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs:750 
  at Gtk.Widget.buttonreleaseevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0
Comment 1 Mike Krüger 2013-07-26 14:43:22 UTC
fixed