[MonoDevelop] MD won't start with current SVN build

"Andrés G. Aragoneses" knocte at gmail.com
Thu Nov 13 22:04:16 EST 2008


efortin wrote:
> 
> 
> Michael Hutchinson wrote:
>> On Wed, Nov 12, 2008 at 11:53 AM, ahuegel <andreas.huegel at topalis.com>
>> wrote:
>>> got MD from SVN. When starting I get this message. After that MD will
>>> vanish:
>>>
>>>
>>> System.TypeInitializationException: An exception was thrown by the type
>>> initializer for MonoDevelop.Projects.Dom.Parser.ProjectDomService --->
>>> System.NullReferenceException: Object reference not set to an instance of
>>> an
>>> object
>>>  at Monodoc.RootTree.LoadTree (System.String basedir) [0x0025c] in
>>> /tmp/mono2-build.21095/monobuild/monodoc-117204/engine/provider.cs:851
>>>  at Monodoc.RootTree.LoadTree () [0x0005c] in
>>> /tmp/mono2-build.21095/monobuild/monodoc-117204/engine/provider.cs:761
>>>  at MonoDevelop.Projects.Dom.Parser.ProjectDomService..cctor () [0x00000]
>>> in
>>> /tmp/mono2-build.964/monobuild/md-svn/main/src/core/MonoDevelop.Projects/MonoDevelop.Projects.CodeGeneration/BaseRefactorer.cs:1
>>>  --- End of inner exception stack trace ---
>>>  at MonoDevelop.Ide.Gui.Pads.ClassPad.ProjectNodeBuilder.Initialize ()
>>> [0x00017] in
>>> /tmp/mono2-build.964/monobuild/md-svn/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ClassPad/ProjectNodeBuilder.cs:57
>>>  at MonoDevelop.Ide.Gui.Components.NodeBuilder.SetContext
>>> (ITreeBuilderContext context) [0x00007] in
>>> /tmp/mono2-build.964/monobuild/md-svn/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/NodeBuilder.cs:47
>> FWIW, it appears that the crash is in MonoDoc.
>>
>>
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>>
>>
> 
> I have exactly the same problem. I compiled Mono 2.0.1 (no package on Ubuntu
> 8.10). Compiled Monodoc. And compiled MonoDevelop. After compiling possible
> packages imaginable that wasn't on my machine, I got to the same error
> described. Started digging into Monodoc sources and got this. 
> 
> 
> The place where the NullReferenceException comes from is the following line
> in provider.cs, in LoadTree() method of RootTree class:
> 
> ...
> NullRef	--->		foreach (Node n in hs.Tree.Nodes){
> 					parent.AddNode (n);
> 				}
> ...
> 
> It can be hs that is null (HelpSource). I verified, it can't. It can be
> hs.Tree. I verified, it can't. Then only Nodes property can return null. If
> you look at the LoadNodes() method of the Node class...
> 
> ...
> 	public void LoadNode ()
> 	{
> 		if (position < 0)
> 			position = -position;
> 
> 		tree.InputStream.Position = position;
> 		BinaryReader reader = tree.InputReader;
> 		int count = DecodeInt (reader);
> 		element = reader.ReadString ();
> 		caption = reader.ReadString ();
> --->		if (count == 0)
> 			return;
> 		
> 		nodes = new ArrayList (count);
> 		for (int i = 0; i < count; i++){
> 			int child_address = DecodeInt (reader);
> 							      
> 			Node t = new Node (this, -child_address);
> 			nodes.Add (t);
> 		}
> 	}
> ...
> 
> You see there's the if(count == 0) line. So if count == 0, meaning there's
> no nodes attached to that node (I guess it's a valid situation, no childs),
> then Nodes will be null. I commented out this if, compiled Monodoc again, et
> voilà! it works. Now if there's no node, Nodes = new ArrayList(0).
> 

Can you file a bug to monodoc, provide this info and your patch please?
Thanks!

	Andrés

-- 



More information about the Monodevelop-list mailing list