Bug 6760 - Exception during code completion in XML Editor when editing .xsl files
Summary: Exception during code completion in XML Editor when editing .xsl files
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-08-30 06:48 UTC by Albertinix
Modified: 2014-01-20 06:58 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Error dialog (61.21 KB, image/png)
2012-08-30 06:48 UTC, Albertinix
Details


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 Albertinix 2012-08-30 06:48:45 UTC
Created attachment 2435 [details]
Error dialog

When editing an .xsl file, whenever code completion is involved (like trying to complete a </div> after a previous <div> was opened), the following error occurs AFTER the word is completed in the editor (see attachment).

Steps to reproduce:

- type the following code in a new file and save it as '<anyname>.xsl'

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/event">
		<div>
			<h1>
				<xsl:value-of select="title"/>
			</h1>
	
			<span class="date">
				<xsl:value-of select="date"/>
			</span>
		</div>
		
	</xsl:template>
</xsl:stylesheet>

- close the file and reopen it again using File->Open (before doing this, the syntax code coloring and highlighter will not be available, although the code completion works, without crashing :) )

- type a '<' character in the line after the </div> line, which will trigger the code completion; choose any value from the code completion list.





Here's the full stacktrace:

System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText(CodeCompletionContext ctx, String partial_word, String complete_word, Int32 wordOffset)
   at MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText(CodeCompletionContext ctx, String partial_word, String complete_word)
   at MonoDevelop.Ide.CodeCompletion.CompletionData.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.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress(Key key, UInt32 ch, ModifierType state)
Comment 1 Mikayla Hutchinson [MSFT] 2013-08-11 17:29:01 UTC

*** This bug has been marked as a duplicate of bug 13284 ***
Comment 2 Nischal 2014-01-20 06:58:44 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)