[Mono-bugs] [Bug 79317][Maj] New - Crash whilst resolving argument types in generic delegate

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 7 12:23:31 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/79317	2006-09-07 12:23:31.000000000 -0400
+++ shadow/79317.tmp.12459	2006-09-07 12:23:31.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 79317
+Product: Mono: Compilers
+Version: 1.1
+OS Details: Ubuntu 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: Crash whilst resolving argument types in generic delegate
+Description of Problem:
+Get a NullReferenceException when compiling this simple example:
+namespace Test {
+    public delegate void Handler <TA> (TA sender) where TA: A <TA>;
+    public class A <TA> where TA: A <TA> {
+    }
+Steps to reproduce the problem:
+1. Compile the above using the command:
+    gmcs -target:library -warn:4 -warnaserror test.cs
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x000d7> Mono.CSharp.TypeArguments:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00021> Mono.CSharp.ConstructedType:DoResolveType
+(Mono.CSharp.EmitContext ec)
+in <0x0012d> Mono.CSharp.ConstructedType:ResolveConstructedType
+(Mono.CSharp.EmitContext ec)
+in <0x0000e> Mono.CSharp.ConstructedType:DoResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00011> Mono.CSharp.TypeExpr:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00114> Mono.CSharp.SimpleName:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x002e8> Mono.CSharp.Constraints:Resolve (Mono.CSharp.EmitContext ec)
+in <0x0002c> Mono.CSharp.TypeParameter:Resolve (Mono.CSharp.DeclSpace ds)
+in <0x00124> Mono.CSharp.Delegate:DefineType ()
+in <0x0034f> Mono.CSharp.RootContext:ResolveTree ()
+in <0x00974> 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.
+Looks similar to bug # 79094, but I get different error.

More information about the mono-bugs mailing list