Mono compiler generates internal exception when using mono 2.2

Description

Mono 2.2 created a regression which causes compiling to fail on some applications (Specifically GridImageUpload)

1. NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
2.
3. jradford@actinium:~/trunk> mono -V
4. Mono JIT compiler version 2.2 (tarball Fri Jan 9 17:41:19 UTC 2009)
5. Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
6. TLS: __thread
7. GC: Included Boehm (with typed GC)
8. SIGSEGV: altstack
9. Notifications: epoll
10. Architecture: amd64
11. Disabled: none
12.
13. Mono C# compiler version 2.2.0.0
14.
15.
16. [nant] /home/jradford/trunk/Programs/GridImageUpload/GridImageUpload.exe.build build
17. Buildfile: file:///home/jradford/trunk/Programs/GridImageUpload/GridImageUpload.exe.build
18. Target framework: Mono 2.0 Profile
19. Target(s) specified: build
20.
21.
22. build:
23.
24. [echo] Build Directory is /home/jradford/trunk/bin
25. [csc] Compiling 6 files to '/home/jradford/trunk/bin/GridImageUpload.exe'.
26. [csc]
27. [csc] Unhandled Exception: Mono.CSharp.InternalErrorException: /home/jradford/trunk/Programs/GridImageUpload/frmGridImageUpload.cs(254,9): <cmdUpload_Click>c_AnonStorey2 ---> System.InvalidOperationException: Method '<cmdUpload_Click>cAnonStorey2.<>m_5' does not have a method body.
28. [csc] at System.Reflection.Emit.MethodBuilder.fixup () [0x00000]
29. [csc] at System.Reflection.Emit.TypeBuilder.CreateType () [0x00000]
30. [csc] at Mono.CSharp.TypeContainer.CloseType () [0x00000]
31. [csc] — End of inner exception stack trace —
32. [csc] at Mono.CSharp.TypeContainer.CloseType () [0x00000]
33. [csc] at Mono.CSharp.TypeContainer.CloseType () [0x00000]
34. [csc] at Mono.CSharp.RootContext.CloseTypes () [0x00000]
35. [csc] at Mono.CSharp.Driver.Compile () [0x00000]
36. [csc] at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
37.
38. BUILD FAILED - 0 non-fatal error(s), 11 warning(s)
39.
40. /home/jradford/trunk/Programs/GridImageUpload/GridImageUpload.exe.build(14,6):
41. External Program Failed: /usr/lib/mono/2.0/gmcs.exe (return code was 1)
42.
43. Total time: 0.7 seconds.
44.

Steps to Reproduce

The workaround is to either disable gridimageupload in the project - OR - use a version of mono prior to 2.2 (Mono C# compiler version 2.0.1.0
is what our build server runs)

Activity

Show:
Jim Radford
March 31, 2009, 6:20 AM

This regression was fixed in mono 2.4, It is advised to not use mono 2.2, but instead 2.01 or 2.4 are tested to be working options

Assignee

Jim Radford

Reporter

Jim Radford

Severity

None

Environment

Mono / Linux32
Mono / Linux64
Mono / OSX
Mono / Windows

Fixed in Revision

None

Components

Priority

Minor
Configure