Bug 5967 - Adding Comment /// to Prop causes error
Summary: Adding Comment /// to Prop causes error
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
: 6484 ()
Depends on:
Blocks:
 
Reported: 2012-07-03 14:28 UTC by Ian
Modified: 2012-08-30 10:50 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:
RESOLVED FIXED

Description Ian 2012-07-03 14:28:57 UTC
Not too sure how to rerpo this, but when I added /// to the top of a property I got this error:

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.DocFood.DocGenerator.Init (IEntity member) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DocFood.DocGenerator.GenerateDoc (IEntity member) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DocFood.DocumentBufferHandler.GenerateDocumentation (Mono.TextEditor.TextEditorData data, IEntity member, System.String indent, System.String prefix) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DocFood.DocumentBufferHandler.GenerateDocumentation (Mono.TextEditor.TextEditorData data, IEntity member, System.String indent) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DocFood.DocFoodTextEditorExtension.GenerateDocumentation (IEntity member, System.String indent) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DocFood.DocFoodTextEditorExtension.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.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 


My code looked like this, notice only 2 // are there at this stage:

		//  <- adding the third / pops the error above
		SearchScope SearchScope
		{
			get
			{
				UISearchBar sb = TableView.TableHeaderView as UISearchBar;
				return (SearchScope)sb.SelectedScopeButtonIndex;
			}
		}

Here's my config:

MonoDevelop 3.0.3.2
Installation UUID: 438ac2b5-07c9-45e7-a8ce-eac5ad86371d
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Mono for Android: 4.2.3.68199851
Android SDK: /Users/vink/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
	Version: 1.6	ApiLevel: 4
	Version: 2.1	ApiLevel: 7
	Version: 2.2	ApiLevel: 8
	Version: 2.3	ApiLevel: 10
	Version: 3.1	ApiLevel: 12
	Version: 4.0	ApiLevel: 14
	Version: 4.0.3	ApiLevel: 15
Java SDK: /usr/bin

Apple Developer Tools:
	 Xcode 4.3.3 (1178)
	 Build 4E3002
Monotouch: 5.2.12
Build information:
	Release ID: 30003002
	Git revision: 7bf6ac0ca43c1b12703176ad9933c3484c05c84c-dirty
	Build date: 2012-06-16 04:36:10+0000
	Xamarin addins: 62ad7268d38c2ece7e00dc32960bd3bdab8fec38
Operating System:
	Mac OS X 10.7.4
	Darwin mac.local 11.4.0 Darwin Kernel Version 11.4.0
	    Mon Apr  9 19:32:15 PDT 2012
	    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
Comment 1 Mike Krüger 2012-07-05 06:59:03 UTC
fixed.

Thanks for the precise error description  - that makes it 1000 times easier to fix errors :)
Comment 2 Mike Krüger 2012-08-10 03:55:59 UTC
*** Bug 6484 has been marked as a duplicate of this bug. ***
Comment 3 Yvan Rodrigues 2012-08-30 10:49:28 UTC
It looks like this has been resolved, but I just wanted to add that:
(a) This does not occur with auto-implemented properties.
(b) This does not occur on properties that have both get and set defined.
(c) This only occurs when ONLY get or set is defined.
(d) This occurs with both static and instance properties.
(e) This bug is present in 3.0.3.5.
Comment 4 Yvan Rodrigues 2012-08-30 10:50:14 UTC
In case it's useful to anyone, here is a stack trace:

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.DocFood.DocGenerator.Init (IEntity member) [0x0040c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs:449 
  at MonoDevelop.DocFood.DocGenerator.GenerateDoc (IEntity member) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs:307 
  at MonoDevelop.DocFood.DocumentBufferHandler.GenerateDocumentation (Mono.TextEditor.TextEditorData data, IEntity member, System.String indent, System.String prefix) [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/Commands.cs:138 
  at MonoDevelop.DocFood.DocumentBufferHandler.GenerateDocumentation (Mono.TextEditor.TextEditorData data, IEntity member, System.String indent) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/Commands.cs:130 
  at MonoDevelop.DocFood.DocFoodTextEditorExtension.GenerateDocumentation (IEntity member, System.String indent) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocFoodTextEditorExtension.cs:51 
  at MonoDevelop.DocFood.DocFoodTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00081] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocFoodTextEditorExtension.cs:78 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.3-branch/3d53e136/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:236