Bug 1299 - Unable to edit code in aspx files because of error message from monodevelop
Summary: Unable to edit code in aspx files because of error message from monodevelop
Status: CLOSED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8
Hardware: PC Linux
: Highest blocker
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-10-06 08:10 UTC by Nikita Tsukanov
Modified: 2012-01-04 10:17 UTC (History)
3 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:
CLOSED FIXED

Description Nikita Tsukanov 2011-10-06 08:10:58 UTC
It shows this message:
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.CSharp.Completion.AspLanguageBuilder.BuildLocalDocument (MonoDevelop.AspNet.Gui.DocumentInfo info, Mono.TextEditor.TextEditorData data, System.String expressionText, System.String textAfterCaret, Boolean isExpression) [0x00000] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/addins/CSharpBinding/AspNet/AspLanguageBuilder.cs:78 
  at MonoDevelop.AspNet.Gui.AspNetEditorExtension.InitializeCodeCompletion (Char ch) [0x00110] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs:220 
  at MonoDevelop.AspNet.Gui.AspNetEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0003f] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs:278 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00000] in /home/keks/local/src/monodevpkg/monodevelop-2.8/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:257 


How to reproduce:

1) Create ASP.NET project
2) Open Views/Home/Index.aspx
3) Paste somewhere these lines:

		<%if(true){%>

		<%}else{
			var total=1;
		%>
			<%=12345%>
		<%}%>


4) Move cursor to "var total" and press space.
Comment 1 Mike Krüger 2011-10-07 02:17:53 UTC
Can't repro that bug, but I think I see one in that line.

fixed.
Comment 2 Atin 2011-12-29 00:53:55 UTC
I created ASP>NET project and don't get any error.

Please close this issue.

Environments:
MAC 10.7
Mono Develop 2.8.5 Stable.
Mono Touch 5.0.4 Stable
Mono Framework 2.0.7 Beta