Bug 3681 - Autocompletion throws NullReferenceException after namespace is renamed
Summary: Autocompletion throws NullReferenceException after namespace is renamed
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.6
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-29 07:14 UTC by Simon Shine
Modified: 2012-03-01 10:02 UTC (History)
2 users (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 Simon Shine 2012-02-29 07:14:21 UTC
Specific version of MonoDevelop: 2.6+dfsg-1 on Ubuntu 11.10.

The error can be replicated easily:
1) I create a new Solution, named Foo1
2) I create an empty class called Foo, give it some public properties
--- important part: ---
3) I rename the project within the solution to Foo2
4) I change the namespace manually to Foo2
5) I type this.<public property> and the error below shows up.

If I save my files and restart MonoDevelop, the error does not occur. Simply changing the namespace will not result in any exceptions being thrown.

My assumption is that spontaneously renaming the project *and* namespace messes up the completion lookup until it is re-initialized.


System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.CSharp.Completion.MemberCompletionData.CheckDescription () [0x00000] in <filename unknown>:0 
  at MonoDevelop.CSharp.Completion.MemberCompletionData.get_Description () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.UpdateDeclarationView () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.OnSelectionChanged () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWindow.OnSelectionChanged (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWidget.set_Page (Int32 value) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWidget.UpdatePage () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWidget.FilterWords () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWidget.set_CompletionString (System.String value) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWindow.ResetSizes () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.ListWindow.ProcessKey (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier, MonoDevelop.Ide.CodeCompletion.KeyActions& ka) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.CodeCompletion.CompletionWindowManager.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier, MonoDevelop.Ide.CodeCompletion.KeyActions& ka) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.CSharp.Completion.CSharpTextEditorCompletion.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00000] in <filename unknown>:0 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00000] in <filename unknown>:0
Comment 1 Alan McGovern 2012-03-01 10:02:10 UTC
This bug does not exist with MonoDevelop 2.8.8.1 so all I can really suggest is to upgrade to a newer version.  We are not supporting 2.6 builds anymore as things have changed significantly between 2.4, 2.6 and 2.8.