Bug 940 - NullReferenceException on mouse right-click over using clause
Summary: NullReferenceException on mouse right-click over using clause
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.6
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-09-20 16:28 UTC by Alexandru Nedelcu
Modified: 2011-09-21 03:53 UTC (History)
1 user (show)

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:

Description Alexandru Nedelcu 2011-09-20 16:28:30 UTC
I'm getting an error when, inside the text editor with a C# file open, I right click on the name of a namespace in a "using" clause.
After I get the exception-specific dialog, if I right-click again, then it doesn't happen anymore.

Environment is Mono 2.10.5 + Monodevelop + Ubuntu 10.10 (kernel 2.6.35-30-generic) + gcc 4.4.5.

Mono and Monodevelop were compiled from distributed tarballs and are installed in an alternative directory in /opt, while the system's Mono was left untouched. To make this work I have the following configuration in .bash_profile ...

  export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
  export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
  export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
  export PATH=$MONO_PREFIX/bin:$PATH

Stacktrace I am given is copy/pasted below ...

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.CSharp.Resolver.TextEditorResolverProvider.GetLanguageItem (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, Mono.TextEditor.TextEditorData data, Int32 offset) [0x0033a] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.GetLanguageItem (Int32 offset) [0x00025] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.SourceEditor.SourceEditorView.GetLanguageItem (Int32 offset) [0x00000] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.GetResolveResult (MonoDevelop.Ide.Gui.Document doc, ITextBuffer editor) [0x0000d] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.GetItem (MonoDevelop.Projects.Dom.Parser.ProjectDom ctx, MonoDevelop.Ide.Gui.Document doc, ITextBuffer editor, MonoDevelop.Projects.Dom.ResolveResult& resolveResult, INode& item) [0x00000] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.Update (MonoDevelop.Components.Commands.CommandArrayInfo ainfo) [0x00084] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate (MonoDevelop.Components.Commands.CommandArrayInfo info) [0x00000] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info) [0x00057] in /home/alex/bin/build/monodevelop- 
  at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo (System.Object commandId, MonoDevelop.Components.Commands.CommandTargetRoute targetRoute) [0x001a9] in /home/alex/bin/build/monodevelop-
Comment 1 Mike Krüger 2011-09-21 03:53:45 UTC
fixed in 2.8.