[Mono-bugs] [Bug 79088][Maj] New - Null reference exception during compilation

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 16 14:58:10 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 mike.allen at durrusa.com.


--- shadow/79088	2006-08-16 14:58:10.000000000 -0400
+++ shadow/79088.tmp.17410	2006-08-16 14:58:10.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 79088
+Product: Mono: Compilers
+Version: 1.1
+OS Details: Ububtu 6.06
+Status: NEW   
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: mike.allen at durrusa.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Null reference exception during compilation
+Description of Problem:
+Get an unhandled System.NullReferenceException when compiling this simple
+namespace Test {
+    public class A <TA, TB> where TA: A <TA, TB> where TB: B <TA, TB> {
+    }
+    public class B <TA, TB> where TA: A <TA, TB> where TB: B <TA, TB> {
+    }
+Steps to reproduce the problem:
+1. Compile using the command:
+    gmcs -target:library -warn:4 -warnaserror test.cs
+2. Er...
+3. That's it!
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00376> Mono.CSharp.ConstraintChecker:CheckConstraints
+(Mono.CSharp.EmitContext ec, Int32 index)
+in <0x00018> Mono.CSharp.ConstraintChecker:CheckConstraints
+(Mono.CSharp.EmitContext ec)
+in <0x00035> Mono.CSharp.ConstraintChecker:CheckConstraints
+(Mono.CSharp.EmitContext ec, System.Type gt, System.Type[] gen_params,
+System.Type[] atypes, Location loc)
+in <0x0001a> Mono.CSharp.ConstructedType:CheckConstraints
+(Mono.CSharp.EmitContext ec)
+in <0x0016c> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec)
+in <0x0001c> Mono.CSharp.TypeExpr:ResolveType (Mono.CSharp.EmitContext ec)
+in <0x004af> Mono.CSharp.Constraints:ResolveTypes (Mono.CSharp.EmitContext ec)
+in <0x0001d> Mono.CSharp.TypeParameter:ResolveType (Mono.CSharp.EmitContext ec)
+in <0x0003f> Mono.CSharp.TypeParameter:DefineType (Mono.CSharp.EmitContext
+ec, System.Reflection.Emit.MethodBuilder builder,
+System.Reflection.MethodInfo implementing, Boolean is_override)
+in <0x00013> Mono.CSharp.TypeParameter:DefineType (Mono.CSharp.EmitContext ec)
+in <0x002cc> Mono.CSharp.TypeContainer:ResolveType ()
+in <0x000d3> Mono.CSharp.RootContext:PopulateTypes ()
+in <0x009b1> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00051> Mono.CSharp.Driver:Main (System.String[] args)
+Expected Results:
+Clean compile with no errors.
+How often does this happen? 
+Every time.
+Additional Information:
+Compiles clean using Microsoft C# compiler with same options.

More information about the mono-bugs mailing list