[Mono-bugs] [Bug 78690][Nor] New - assembly name annotation leads to NullReferenceException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jun 22 08:35:01 EDT 2006

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 bruno at clisp.org.


--- shadow/78690	2006-06-22 08:35:01.000000000 -0400
+++ shadow/78690.tmp.4096	2006-06-22 08:35:01.000000000 -0400
@@ -0,0 +1,94 @@
+Bug#: 78690
+Product: Mono: Compilers
+Version: 1.1
+OS Details: SuSE Linux 10.1 x86_64
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: bruno at clisp.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: assembly name annotation leads to NullReferenceException
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+The mcs compiler crashes with a NullReferenceException on an input file
+that contains an assembly name annotation.
+Steps to reproduce the problem:
+1. Create this input file:
+========================= foo.cs =======================
+[assembly: System.Reflection.AssemblyCulture(de)]
+public class Hello {
+  public static void Main (System.String[] args) {
+    System.Console.WriteLine("Hello");
+  }
+2. $ mcs foo.cs
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in <0x0006b> Mono.CSharp.TypeManager:MemberLookup_FindMembers (System.Type 
+t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean 
+in <0x002c5> Mono.CSharp.TypeManager:RealMemberLookup (System.Type 
+invocation_type, System.Type qualifier_type, System.Type queried_type, 
+MemberTypes mt, BindingFlags original_bf, System.String name, IList 
+in <0x00047> Mono.CSharp.TypeManager:MemberLookup (System.Type 
+invocation_type, System.Type qualifier_type, System.Type queried_type, 
+MemberTypes mt, BindingFlags original_bf, System.String name, IList 
+in <0x002f6> Mono.CSharp.Expression:MemberLookupFailed 
+(Mono.CSharp.EmitContext ec, System.Type qualifier_type, System.Type 
+queried_type, System.String name, System.String class_name, Boolean 
+complain_if_none_found, Location loc)
+in <0x00483> Mono.CSharp.SimpleName:DoSimpleNameResolve 
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean 
+in <0x0004f> Mono.CSharp.SimpleName:SimpleNameResolve 
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean 
+in <0x00028> Mono.CSharp.SimpleName:DoResolve (Mono.CSharp.EmitContext ec, 
+Boolean intermediate)
+in <0x0011c> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec, 
+ResolveFlags flags)
+in <0x00028> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x001bf> Mono.CSharp.Argument:Resolve (Mono.CSharp.EmitContext ec, 
+Location loc)
+in <0x00340> Mono.CSharp.Attribute:ResolveArguments 
+(Mono.CSharp.EmitContext ec)
+in <0x0002a> Mono.CSharp.GlobalAttribute:ResolveArguments 
+(Mono.CSharp.EmitContext ec)
+in <0x001eb> Mono.CSharp.Attribute:Resolve (Mono.CSharp.EmitContext ec)
+in <0x000aa> Mono.CSharp.Attribute:Emit (Mono.CSharp.EmitContext ec, 
+Mono.CSharp.Attributable ias, 
+System.Collections.Specialized.ListDictionary emitted_attr)
+in <0x000b9> Mono.CSharp.Attributes:Emit (Mono.CSharp.EmitContext ec, 
+Mono.CSharp.Attributable ias)
+in <0x0008d> Mono.CSharp.CommonAssemblyModulClass:Emit 
+(Mono.CSharp.TypeContainer tc)
+in <0x0003a> Mono.CSharp.AssemblyClass:Emit (Mono.CSharp.TypeContainer tc)
+in <0x0088e> Mono.CSharp.RootContext:EmitCode ()
+in <0x00ef1> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00064> Mono.CSharp.Driver:Main (System.String[] args)
+Expected Results:
+No stack trace.
+How often does this happen? 
+Additional Information:

More information about the mono-bugs mailing list