[Mono-bugs] [Bug 29456][Nor] New - MCS crashes during compilation

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
26 Aug 2002 17:36: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 t.fransen@mailned.nl.


--- shadow/29456	Mon Aug 26 13:36:15 2002
+++ shadow/29456.tmp.8115	Mon Aug 26 13:36:15 2002
@@ -0,0 +1,108 @@
+Bug#: 29456
+Product: Mono/MCS
+Version: unspecified
+OS: Red Hat 7.3
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: T.Fransen@mailned.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: MCS crashes during compilation
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+MCS crashes during compilation
+I'm working with Mono 0.15 (RH7.3 downloaded from the mono website) and I
+encountered the following problem while compiling some code.
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in (unmanaged) 00 Mono.CSharp.Expression:Constantify (object,System.Type)
+in <0x004cd> 00 Mono.CSharp.MemberAccess:ResolveMemberAccess
+in <0x0075b> 00 Mono.CSharp.MemberAccess:DoResolve
+in <0x0001b> 00 Mono.CSharp.MemberAccess:DoResolve 
+in <0x00149> 00 Mono.CSharp.Expression:Resolve
+in <0x00132> 00 Mono.CSharp.Assign:DoResolve (Mono.CSharp.EmitContext)
+in <0x00149> 00 Mono.CSharp.Expression:Resolve
+in <0x00019> 00 Mono.CSharp.StatementExpression:Resolve
+in <0x00118> 00 Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext)
+in <0x00100> 00 Mono.CSharp.EmitContext:EmitTopBlock
+in <0x005c5> 00 Mono.CSharp.MethodData:Emit
+in <0x0001f> 00 Mono.CSharp.Method:Emit (Mono.CSharp.TypeContainer)
+in <0x0027b> 00 Mono.CSharp.TypeContainer:Emit ()
+in <0x004dd> 00 Mono.CSharp.RootContext:EmitCode ()
+in <0x00732> 00 Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000b> 00 Mono.CSharp.Driver:Main (string[])
+The compiler parses the file but during code generation something goes
+The problem manifests itself when I use a 'const int' that is declared in
+another assembly. If a make a small 'test' assembly with a class that has
+also a 'public const int' then the problem is gone.
+The small program listed below reproduces the problem with the assembly
+provided with the mail posted to the mono-list (attachement).
+using DecoderNameSpace;
+namespace MonoTest
+ 	public class TestClass
+ 	{
+ 		static void Main(string[] args)
+ 		{
+ 			TestClass t = new TestClass();
+ 		}
+ 		public void TestMethod()
+ 		{
+ 			int i = Header.SINGLE_CHANNEL; // <=== MCS Crashes 
+on this line, see  stack dump
+ 		}
+ 	}
+Steps to reproduce the problem:
+1. Compile the above program which references the assembly I supplied
+Actual Results:
+See stackdump above
+Expected Results:
+How often does this happen? 
+Additional Information:
+The the decoder assembly is available in the mail archive, search for the 
+mail I wrote on 25/8/2002 "MCS Bug / known problem?" written by Tom Fransen
+You can also contact me directly so I can provide the sources of the 
+decoder assembly.