[MonoDevelop] Crash in CSharpBinding

Casey Marshall casey.s.marshall at gmail.com
Mon Jul 28 17:41:52 EDT 2008


In a recent SVN snapshot of MonoDevelop (before the DOM change thing) 
there's a pretty heinous crash in the C# binding. This apparently causes 
MonoDevelop to crash out completely.

I don't have a reproducible test case, but looking at the function the 
crash happens, it looks like it could be caused by `callingClass' being 
null. There's an explicit check if that field is null AFTER the 
statement where internal members are checked. I'll attach a patch, but I 
haven't tried it out yet.

> ERROR [2008-07-28 13:58:35Z]: Unhandled exception in GLib event handler.
> System.NullReferenceException: Object reference not set to an instance of an object
>   at CSharpBinding.Parser.Resolver.IsAccessible (IClass qualifier, IClass c, IDecoration member) [0x00000]
>   at CSharpBinding.Parser.Resolver.MustBeShown (IClass qualifierClass, IClass c, IDecoration member) [0x00000]
>   at CSharpBinding.Parser.Resolver._ListMembers (MonoDevelop.Projects.Parser.LanguageItemCollection members, IClass qualifierClass, IClass curType) [0x00000]
>   at CSharpBinding.Parser.Resolver.ListMembers (MonoDevelop.Projects.Parser.LanguageItemCollection members, IClass qualifierClass, IClass curType) [0x00000]
>   at CSharpBinding.Parser.Resolver.Resolve (System.String expression, Int32 caretLineNumber, Int32 caretColumn, System.String fileName, System.String fileContent) [0x00000]
>   at CSharpBinding.CSharpTextEditorExtension.HandleCodeCompletion (ICodeCompletionContext ctx, Char charTyped) [0x00000]
>   at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.HandleCodeCompletion (ICodeCompletionContext completionContext, Char completionChar, System.Int32& triggerWordLength) [0x00000]
>   at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000]
>   at CSharpBinding.CSharpTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000]
>   at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000]
>   at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000]
>   at MonoDevelop.SourceEditor.Gui.SourceEditorView.OnKeyPressEvent (Gdk.EventKey evnt) [0x00000]
>   at Gtk.Widget.keypressevent_cb (IntPtr widget, IntPtr evnt) [0x00000]
> 
> ** (MonoDevelop:30947): WARNING **: Shutting down finalizer thread timed out.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolver.patch
Type: text/x-diff
Size: 713 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20080728/669d3dd5/attachment.bin 


More information about the Monodevelop-list mailing list