[Mono-bugs] [Bug 25433] New - mcs chokes on NullRefException when assigning event handlers

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
29 May 2002 02:35:15 -0000


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 mkestner@speakeasy.net.

http://bugzilla.ximian.com/show_bug.cgi?id=25433

--- shadow/25433	Tue May 28 22:35:15 2002
+++ shadow/25433.tmp.1495	Tue May 28 22:35:15 2002
@@ -0,0 +1,46 @@
+Bug#: 25433
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mkestner@speakeasy.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs chokes on NullRefException when assigning event handlers
+
+test proggie I'm about to attach produces the following crash:
+
+[mike@localhost mike]$ mono /mono/bin/mcs.exe --target library test.cs
+
+(process:18025): ** WARNING **: unhandled exception
+System.NullReferenceException: "A null value was found where an object
+instance was required"
+in <0x00029> Mono.CSharp.TypeContainer:GetFieldFromEvent
+(Mono.CSharp.EventExpr)in <0x009ee>
+Mono.CSharp.SimpleName:SimpleNameResolve
+(Mono.CSharp.EmitContext,Mono.CSharp.Expression,bool)
+in <0x00019> Mono.CSharp.SimpleName:DoResolveLValue
+(Mono.CSharp.EmitContext,Mono.CSharp.Expression)
+in <0x0002a> Mono.CSharp.Expression:ResolveLValue
+(Mono.CSharp.EmitContext,Mono.CSharp.Expression)
+in <0x0001a> Mono.CSharp.CompoundAssign:DoResolve (Mono.CSharp.EmitContext)
+in <0x0002e> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext)
+in <0x00014> Mono.CSharp.StatementExpression:Resolve (Mono.CSharp.EmitContext)
+in <0x00092> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext)
+in <0x0008b> Mono.CSharp.EmitContext:EmitTopBlock
+(Mono.CSharp.Block,Mono.CSharp.Location)
+in <0x00287> Mono.CSharp.Constructor:Emit (Mono.CSharp.TypeContainer)
+in <0x000cb> Mono.CSharp.TypeContainer:Emit ()
+in <0x004a7> Mono.CSharp.RootContext:EmitCode ()
+in <0x01b1f> Mono.CSharp.Driver:MainDriver (string[])
+in <0x00009> Mono.CSharp.Driver:Main (string[])
+
+RESULT: -1