[Mono-bugs] [Bug 64703][Nor] New - NullReferenceException compiling sealed class with protected members
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 31 Aug 2004 03:17:04 -0400 (EDT)
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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=64703
--- shadow/64703 2004-08-31 03:17:04.000000000 -0400
+++ shadow/64703.tmp.17757 2004-08-31 03:17:04.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 64703
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details: Gentoo 2.6.8 R2 / Windows XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: NullReferenceException compiling sealed class with protected members
+
+When compiling a sealed class with protected members using warning level 4,
+a NullReferenceException is thrown.
+
+To reproduce this issue, compile the following code fragment with warning
+level 4 (eg. mcs /target:library /warn:4 test.cs) :
+
+public sealed class A {
+ protected void Test() {
+ }
+}
+
+When running again CVS HEAD on linux and Mono 1.0.1 on Windows, I get the
+following stack trace :
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x0003a> Mono.CSharp.Method:GetSignatureForError
+(Mono.CSharp.TypeContainer)in <0x000d9> Mono.CSharp.MemberBase:CheckBase ()
+in <0x0001f> Mono.CSharp.MethodCore:CheckBase ()
+in <0x0003d> Mono.CSharp.Method:Define ()
+in <0x00085> MemberCoreArrayList:DefineContainerMembers ()
+in <0x00011> MethodArrayList:DefineContainerMembers ()
+in <0x00534> Mono.CSharp.TypeContainer:DoDefineMembers ()
+in <0x0002a> Mono.CSharp.TypeContainer:DefineMembers
+(Mono.CSharp.TypeContainer)in <0x002a9>
+Mono.CSharp.RootContext:PopulateTypes ()
+in <0x00bbf> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+The strange thing here is that I cannot reproduce it using mono-1.0 branch
+(built from cvs) on linux, but I can reproduce it using mono/mcs 1.0.1 on
+Windows ...
+
+Even more strange is that, using mono/mcs 1.0.1 on Windows, I even get the
+exception using the default warning level (which is 2 for mcs).