[Mono-list] NullRefException compiling with mcs

Stuart Ballard sballard@netreach.com
Tue, 27 Jan 2004 09:42:48 -0500


I'm getting the following exception when trying to compile a (fairly 
large) set of files using mcs. I'm using 0.28 because that's the last 
stable Debian package, and I can't upgrade to the -cvs versions because 
they conflict with the libapache-mod-mono package.

Is this a known bug that's been fixed since? Is there anything I can do 
in my code to avoid it? Or should I expend some effort to track down 
exactly which file causes it to happen? (I probably can't send my source 
code to the list, but I can send it to someone in private email if it 
will help)

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required
in <0x001a4> Mono.CSharp.Interface:DefineType ()
in <0x001ec> Mono.CSharp.DeclSpace:LookupInterfaceOrClass 
(string,string,bool&)in <0x00276> Mono.CSharp.DeclSpace:FindType 
(Mono.CSharp.Location,string)
in <0x00125> Mono.CSharp.MemberAccess:ResolveAsTypeStep 
(Mono.CSharp.EmitContext)
in <0x00017> Mono.CSharp.Expression:ResolveAsTypeTerminal 
(Mono.CSharp.EmitContext)
in <0x0005b> Mono.CSharp.DeclSpace:ResolveTypeExpr 
(Mono.CSharp.Expression,bool,Mono.CSharp.Location)
in <0x00452> Mono.CSharp.TypeContainer:GetClassBases 
(bool,System.Type&,bool&)
in <0x00222> Mono.CSharp.TypeContainer:DefineType ()
in <0x002ea> Mono.CSharp.RootContext:ResolveTree ()
in <0x00774> Mono.CSharp.Driver:MainDriver (string[])
in <0x0001b> Mono.CSharp.Driver:Main (string[])

Thanks,
Stuart.

-- 
Stuart Ballard, Senior Web Developer
NetReach, Inc.
(215) 283-2300, ext. 126
http://www.netreach.com/