[Mono-bugs] [Bug 71632][Maj] New - attribute on partial class causes mcs crash

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 23 Jan 2005 08:24:12 -0500 (EST)

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 alp@atoker.com.


--- shadow/71632	2005-01-23 08:24:12.000000000 -0500
+++ shadow/71632.tmp.32108	2005-01-23 08:24:12.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 71632
+Product: Mono: Compilers
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: alp@atoker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: attribute on partial class causes mcs crash
+Any attribute applied to any partial class or any class derived from a
+partial class results in a compiler crash:
+namespace Gtk {
+  using System;
+  using System.Collections;
+  using System.Runtime.InteropServices;
+  [Obsolete]
+  public partial class ItemFactory : Gtk.Object {
+alp@nova:~/Projects/ngtk/ngtk$ mono /home/alp/mlocal/lib/mono/1.0/mcs.exe
+/nowarn:0612 /unsafe /keyfile:../ngtk.snk -out:bin/ngtk.dll -target:library
+-r:System.Drawing.dll -r:System.Windows.Forms.dll -r:bin/nglib.dll
+-r:bin/natk.dll -r:bin/npango.dll -r:bin/ngdk.dll  src/AssemblyInfo.cs
+gtk/*.cs ./src/gtk-src/*.cs
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x001ab> Mono.CSharp.DeclSpace:LookupType
+(string,bool,Mono.CSharp.Location)in <0x00092>
+Mono.CSharp.Attribute:CheckAttributeType (Mono.CSharp.EmitContext)
+in <0x000b4> Mono.CSharp.Attribute:Resolve (Mono.CSharp.EmitContext)
+in <0x0001b> Mono.CSharp.Attribute:GetObsoleteAttribute
+in <0x000b0> Mono.CSharp.MemberCore:GetObsoleteAttribute
+(Mono.CSharp.DeclSpace)in <0x002c1> Mono.CSharp.Constructor:Emit ()
+in <0x0038a> Mono.CSharp.TypeContainer:EmitType ()
+in <0x003cc> Mono.CSharp.RootContext:EmitCode ()
+in <0x00be6> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+The problem appears to be that NamespaceEntry is null in decl.cs (1073) causing
+  e = NamespaceEntry.LookupNamespaceOrType (this, name, loc);
+to fail. It should be a reference to the namespace containing the attribute
+target in this case.
+Will attach a test case to this bug ASAP.