[Mono-bugs] [Bug 550404] New: Compiling code with generics, gmcs 2.4.2.3 raises System.NullReferenceException: Object reference not set to an instance of an object
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Oct 27 09:49:36 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=550404
Summary: Compiling code with generics, gmcs 2.4.2.3 raises
System.NullReferenceException: Object reference not
set to an instance of an object
Classification: Mono
Product: Mono: Compilers
Version: 2.4.x
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: grant at xielliesoft.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=324327)
--> (http://bugzilla.novell.com/attachment.cgi?id=324327)
C# file to reproduce the problem
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
I have Mono 2.4.2.3 on Mac OS X 10.5 (although I've also seen this on Ubuntu
Jaunty). When building the project at
http://research.microsoft.com/en-us/downloads/73099525-fd8d-4966-9b93-574e6023147f/
I run into a gmcs crash similar to Bug 480100. However, I've verified that the
test file in that bug compiles successfully, so this is a new bug rather than a
regression.
Reproducible: Always
Steps to Reproduce:
1. Download the attached test.cs.
2. Compile with
gmcs "/out:test.dll" "/r:System.dll" "/r:System.Core.dll"
"/r:System.Xml.Linq.dll" "/r:System.Data.DataSetExtensions.dll"
"/r:System.Data.dll" "/r:System.Xml.dll" /t:library test.cs
Actual Results:
I'll attach the full output, but the first few lines are:
Exception caught by the compiler while emitting:
Block that caused the problem begin at: test.cs(10,5):
System.NullReferenceException: Object reference not set to an instance of an
object
Internal compiler error at test.cs(9,14):: exception caught while emitting
MethodBuilder [PINQueryable`1::ExponentialMechanism]
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at Mono.CSharp.HoistedVariable.GetFieldExpression (Mono.CSharp.EmitContext
ec) [0x00000]
at Mono.CSharp.HoistedVariable+ExpressionTreeProxy.Emit
(Mono.CSharp.EmitContext ec) [0x00000]
Expected Results:
Successful compilation ;)
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list