Bug 3562 - Exception in TextEditor.OnMotionNotifyEvent can crash MonoDevelop completely
Summary: Exception in TextEditor.OnMotionNotifyEvent can crash MonoDevelop completely
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-02-21 11:20 UTC by Alan McGovern
Modified: 2015-08-20 03:24 UTC (History)
1 user (show)

Tags: resolver
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 Alan McGovern 2012-02-21 11:20:53 UTC
System.ArgumentNullException: Argument cannot be null.
Parameter name: parsedFile
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver..ctor (ICompilation compilation, ICSharpCode.NRefactory.CSharp.CompilationUnit compilationUnit, ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpParsedFile parsedFile) [0x00065] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs:60 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+CSharpChunkParser..ctor (Mono.TextEditor.Highlighting.SpanParser spanParser, Mono.TextEditor.Document doc, Mono.TextEditor.Highlighting.ColorSheme style, Mono.TextEditor.Highlighting.SyntaxMode mode, Mono.TextEditor.LineSegment line) [0x000b8] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:272 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode.CreateChunkParser (Mono.TextEditor.Highlighting.SpanParser spanParser, Mono.TextEditor.Document doc, Mono.TextEditor.Highlighting.ColorSheme style, Mono.TextEditor.Highlighting.SyntaxMode mode, Mono.TextEditor.LineSegment line) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:128 
  at Mono.TextEditor.Highlighting.SyntaxMode.GetChunks (Mono.TextEditor.Document doc, Mono.TextEditor.Highlighting.ColorSheme style, Mono.TextEditor.LineSegment line, Int32 offset, Int32 length) [0x0000b] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs:77 
  at Mono.TextEditor.TextViewMargin.GetCachedChunks (Mono.TextEditor.Highlighting.SyntaxMode mode, Mono.TextEditor.Document doc, Mono.TextEditor.Highlighting.ColorSheme style, Mono.TextEditor.LineSegment line, Int32 offset, Int32 length) [0x0003c] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:863 
  at Mono.TextEditor.TextViewMargin+<CreateLinePartLayout>c__AnonStorey49.<>m__72 (Mono.TextEditor.LayoutWrapper wrapper) [0x000b8] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:1052 
  at Mono.TextEditor.TextViewMargin.GetCachedLayout (Mono.TextEditor.LineSegment line, Int32 offset, Int32 length, Int32 selectionStart, Int32 selectionEnd, System.Action`1 createNew) [0x00078] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:800 
  at Mono.TextEditor.TextViewMargin.CreateLinePartLayout (Mono.TextEditor.Highlighting.SyntaxMode mode, Mono.TextEditor.LineSegment line, Int32 logicalRulerColumn, Int32 offset, Int32 length, Int32 selectionStart, Int32 selectionEnd) [0x00042] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:1044 
  at Mono.TextEditor.TextViewMargin+VisualLocationTranslator.PointToLocation (Double xp, Double yp) [0x003c0] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:2373 
  at Mono.TextEditor.TextViewMargin.PointToLocation (Double xp, Double yp) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs:2384 
  at Mono.TextEditor.TextEditor.PointToLocation (Double xp, Double yp) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:2632 
  at Mono.TextEditor.TextEditor.ShowTooltip (ModifierType modifierState) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:2427 
  at Mono.TextEditor.TextEditor.FireMotionEvent (Double x, Double y, ModifierType state) [0x00021] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:1267 
  at Mono.TextEditor.TextEditor.OnMotionNotifyEvent (Gdk.EventMotion e) [0x000e2] in /Users/builder/data/lanes/monodevelop-mac-designer-resolver/af8787e9/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:1225 
  at Gtk.Widget.motionnotifyevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0
Comment 1 Alan McGovern 2012-02-21 11:21:44 UTC
This issue only triggers in new resolver. I put a try/catch in TextEditor.OnMotionNotifyEvent to prevent the exception from unwinding through native code, but the actual cause of the exception should really be fixed.
Comment 2 Mikayla Hutchinson [MSFT] 2012-02-21 14:14:26 UTC
Shouldn't GTK# be catching these and passing them to the unhandled exception handler?
Comment 3 Mike Krüger 2012-02-22 03:51:55 UTC
Fixed.