[Mono-bugs] [Bug 77008][Wis] New - MCS throws NullReferenceException in DeclSpace.LookupType

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Dec 15 14:06:56 EST 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by brian at fluggo.com.


--- shadow/77008	2005-12-15 14:06:56.000000000 -0500
+++ shadow/77008.tmp.25091	2005-12-15 14:06:56.000000000 -0500
@@ -0,0 +1,90 @@
+Bug#: 77008
+Product: Mono: Compilers
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: brian at fluggo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: MCS throws NullReferenceException in DeclSpace.LookupType
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+MCS throws an unhandled NullReferenceException in DeclSpace.LookupType
+after a fresh build from sources from Mono's website on SUSE 10.0. This
+only happens on one project, whose source code I am not allowed to share.
+However, I can assure you that this project built before I fixed a bug in
+the Mono class libraries and attempted to rebuild the whole &*()@# thing.
+Steps to reproduce the problem:
+1. Use Linux.
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00122> Mono.CSharp.DeclSpace:LookupType (System.String name, Location
+loc, Boolean ignore_cs0104)
+in <0x00040> Mono.CSharp.SimpleName:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x0002d> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00015> Mono.CSharp.Attribute:ResolveAsTypeTerminal
+(Mono.CSharp.Expression expr, Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00056> Mono.CSharp.Attribute:ResolvePossibleAttributeType
+(Mono.CSharp.EmitContext ec, System.String name, Boolean silent,
+System.Boolean is_attr)
+in <0x00033> Mono.CSharp.Attribute:ResolveAttributeType
+(Mono.CSharp.EmitContext ec)
+in <0x0001d> Mono.CSharp.Attribute:ResolveType (Mono.CSharp.EmitContext ec)
+in <0x0006c> Mono.CSharp.Attributes:Search (System.Type t,
+Mono.CSharp.EmitContext ec)
+in <0x0007d> Mono.CSharp.MemberCore:GetObsoleteAttribute ()
+in <0x0001e> Mono.CSharp.EnumMember:CheckObsoleteness (Location loc)
+in <0x001a0> Mono.CSharp.FieldExpr:ResolveMemberAccess
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression left, Location loc,
+Mono.CSharp.SimpleName original)
+in <0x00311> Mono.CSharp.MemberAccess:DoResolve (Mono.CSharp.EmitContext
+ec, Mono.CSharp.Expression right_side)
+in <0x0000f> Mono.CSharp.MemberAccess:DoResolve (Mono.CSharp.EmitContext ec)
+in <0x000e3> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags)
+in <0x00012> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x0010f> Mono.CSharp.Argument:Resolve (Mono.CSharp.EmitContext ec,
+Location loc)
+in <0x00275> Mono.CSharp.Attribute:ResolveArguments
+(Mono.CSharp.EmitContext ec)in <0x0015b> Mono.CSharp.Attribute:Resolve
+(Mono.CSharp.EmitContext ec)
+in <0x00064> Mono.CSharp.Attribute:Emit (Mono.CSharp.EmitContext ec,
+Mono.CSharp.Attributable ias, System.Collections.Specialized.ListDictionary
+in <0x0009c> Mono.CSharp.Attributes:Emit (Mono.CSharp.EmitContext ec,
+Mono.CSharp.Attributable ias)
+in <0x00036> Mono.CSharp.Enum:Emit ()
+in <0x000c1> Mono.CSharp.RootContext:EmitCode ()
+in <0x00aaf> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00041> Mono.CSharp.Driver:Main (System.String[] args)
+Expected Results:
+A human-readable error message.
+How often does this happen? 
+Every time, now.
+Additional Information:
+Reinstalling from the SUSE install discs does not help.
+I shouldn't have to tell you that a NullReferenceException should NEVER
+occur in production code. NEVER. It is a sign of sloppy coding-- it means
+that a routine is not checking its arguments or that the programmer did not
+expect a null return from a method or property. If a debugger existed for
+Mono, I'd be glad to track down the error myself.

More information about the mono-bugs mailing list