[Mono-bugs] [Bug 79078][Nor] New - mcs: Crash (NullReferenceException) instead of error message
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Aug 15 14:54:44 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 kwolfli at yahoo.de.
http://bugzilla.ximian.com/show_bug.cgi?id=79078
--- shadow/79078 2006-08-15 14:54:44.000000000 -0400
+++ shadow/79078.tmp.1559 2006-08-15 14:54:44.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 79078
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: kwolfli at yahoo.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs: Crash (NullReferenceException) instead of error message
+
+When trying to compile a C# file with the following contents, mcs crashes
+with a NullReferenceException:
+
+using System;
+namespace Test
+{
+ using NonexistentNamespace;
+ public class Foo : NonexistentBar {}
+}
+
+
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+ at Mono.CSharp.SimpleName.ResolveAsTypeStep (IResolveContext ec, Boolean
+silent) [0x00000]
+ at Mono.CSharp.NamespaceEntry+UsingEntry.Resolve () [0x00000]
+ at Mono.CSharp.NamespaceEntry.GetUsingTable () [0x00000]
+ at Mono.CSharp.NamespaceEntry.Lookup (Mono.CSharp.DeclSpace ds,
+System.String name, Location loc, Boolean ignore_cs0104) [0x00000]
+ at Mono.CSharp.NamespaceEntry.LookupNamespaceOrType
+(Mono.CSharp.DeclSpace ds, System.String name, Location loc, Boolean
+ignore_cs0104) [0x00000]
+ at Mono.CSharp.DeclSpace.LookupType (System.String name, Location loc,
+Boolean ignore_cs0104) [0x00000]
+ at Mono.CSharp.SimpleName.ResolveAsTypeStep (IResolveContext ec, Boolean
+silent) [0x00000]
+ at Mono.CSharp.Expression.ResolveAsBaseTerminal (IResolveContext ec,
+Boolean silent) [0x00000]
+ at Mono.CSharp.TypeContainer.GetNormalBases (Mono.CSharp.TypeExpr
+base_class) [0x00000]
+ at Mono.CSharp.TypeContainer.GetClassBases (Mono.CSharp.TypeExpr
+base_class) [0x00000]
+ at Mono.CSharp.Class.GetClassBases (Mono.CSharp.TypeExpr base_class)
+[0x00000]
+ at Mono.CSharp.TypeContainer.DefineTypeBuilder () [0x00000]
+ at Mono.CSharp.TypeContainer.DefineType () [0x00000]
+ at Mono.CSharp.Class.DefineType () [0x00000]
+ at Mono.CSharp.RootContext.ResolveTree () [0x00000]
+ at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
+ at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
+
+
+Expected Results:
+Compilation should abort with an error message explaining that
+NonexistentNamespace and NonexistentBar couldn't be found.
+
+
+Additional Information:
+I am using mcs 1.1.16.1.
More information about the mono-bugs
mailing list