[Mono-bugs] [Bug 38291][Min] Changed - Strange Reflection crash.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 27 Feb 2003 08:39:19 -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 martin@ximian.com.

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

--- shadow/38291	Tue Feb 25 05:50:12 2003
+++ shadow/38291.tmp.29874	Thu Feb 27 08:39:19 2003
@@ -171,6 +171,40 @@
 [...]
 
 I put martin on the cc line because he seems to be the author of the
 cast checking code for Array.Copy() and he was also involved in the
 MemberLookup in mcs, so he might have some clues about both bugs.
 
+
+------- Additional Comments From martin@ximian.com  2003-02-27 08:39 -------
+By inserting a Console.WriteLine, I get the following on Windows, so this explains the InvalidCastException
+====
+martin@ATLANTIS //townsville/martin/monocvs/work
+$ /home/martin/mcs.exe A.cs
+MEMBER: System.String Item [Int32] System.Reflection.RuntimePropertyInfo
+MEMBER: System.String Item [System.String] System.Reflection.RuntimePropertyInfo
+Exception caught by the compiler while compiling:
+   Block that caused the problem begin at: A.cs: (3)
+                     Block being compiled: [A.cs: (3),A.cs: (6)]
+
+Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
+   at Mono.CSharp.MethodGroupExpr.get_IsInstance()
+   at Mono.CSharp.MemberAccess.ResolveMemberAccess(EmitContext ec, Expression member_lookup, Expression left, Location loc, 
+Expression left_original)
+   at Mono.CSharp.MemberAccess.DoResolve(EmitContext ec, Expression right_side, ResolveFlags flags)
+   at Mono.CSharp.MemberAccess.DoResolve(EmitContext ec)
+   at Mono.CSharp.Expression.Resolve(EmitContext ec, ResolveFlags flags)
+   at Mono.CSharp.ElementAccess.CommonResolve(EmitContext ec)
+   at Mono.CSharp.ElementAccess.DoResolveLValue(EmitContext ec, Expression right_side)
+   at Mono.CSharp.Expression.ResolveLValue(EmitContext ec, Expression right_side)
+   at Mono.CSharp.Assign.DoResolve(EmitContext ec)
+   at Mono.CSharp.Expression.Resolve(EmitContext ec, ResolveFlags flags)
+   at Mono.CSharp.StatementExpression.Resolve(EmitContext ec)
+   at Mono.CSharp.Block.Resolve(EmitContext ec)
+   at Mono.CSharp.EmitContext.EmitTopBlock(Block block, InternalParameters ip, Location loc)
+   at Mono.CSharp.MethodData.Emit(TypeContainer parent, Block block, Object kind)
+   at Mono.CSharp.TypeContainer.Emit()
+   at Mono.CSharp.RootContext.EmitCode()
+   at Mono.CSharp.Driver.MainDriver(String[] args)
+   at Mono.CSharp.Driver.Main(String[] args)
+
+