Bug 6344 - NullReferenceException in SourceEditorView.SetCompletionText
Summary: NullReferenceException in SourceEditorView.SetCompletionText
Status: VERIFIED DUPLICATE of bug 13284
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: XML Editor ()
Version: 3.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2012-07-31 15:51 UTC by simon_triplet@yahoo.fr
Modified: 2014-01-20 06:58 UTC (History)
4 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:
VERIFIED DUPLICATE of bug 13284

Description simon_triplet@yahoo.fr 2012-07-31 15:51:47 UTC
Description of Problem:
When I write xml element without content, I message box with a NullReferenceException and a stack trace is display.

Steps to reproduce the problem:
1. Create new xml file.
2. Add xml element. exemple <element1>.
3. Select </element1> in the listbox displayed.
4. A MsgBox is diplayed with stack trace :


System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText(CodeCompletionContext ctx, String partial_word, String complete_word, Int32 wordOffset)
   à MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText(CodeCompletionContext ctx, String partial_word, String complete_word)
   à MonoDevelop.Ide.CodeCompletion.CompletionData.InsertCompletionText(CompletionListWindow window, KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.CodeCompletion.CompletionListWindow.CompleteWord(KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.CodeCompletion.CompletionListWindow.PreProcessKeyEvent(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.CodeCompletion.CompletionWindowManager.PreProcessKeyEvent(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.XmlEditor.XmlTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   à MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress(Key key, UInt32 ch, ModifierType state)


Expected Results:


How often does this happen?
 systematic


Additional Information:
Comment 1 Sam Haddad 2013-01-28 22:44:59 UTC
I am currently unable to reproduce this issue on the following platform

Operating System: Windows 8 
Mono Develop Version 3.1.0
Comment 2 Igor Karatayev 2013-08-27 09:13:40 UTC
I can confirm this for Xamarin Studio 4.0.12

Stacktrace follows:

System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoDevelop.XmlEditor.Completion.XmlTagCompletionData.InsertCompletionText(CompletionListWindow window, KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.CompleteWord(KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.PreProcessKeyEvent(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.CodeCompletion.CompletionWindowManager.PreProcessKeyEvent(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.XmlEditor.XmlTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier)
   at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress(Key key, UInt32 ch, ModifierType state)
Comment 3 Mikayla Hutchinson [MSFT] 2013-08-27 13:11:21 UTC

*** This bug has been marked as a duplicate of bug 13284 ***
Comment 4 Nischal 2014-01-20 06:58:00 UTC
We have checked this issue and now no error is shown on selecting completion text.
Screencast: http://screencast.com/t/3QaRyeWY

Environment info:
Xamarin Studio
Version 4.2.3 (build 127)
Git revision: 781819ed590c05a48201be53eb9602b56a4c1fde

Xam.Android 4.13.0-4(windows master)