[Mono-bugs] [Bug 495380] New: Assembly.LoadFrom crashes mono when trying to load a C++/CLI assembly (SlimDX.dll)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 15 18:51:37 EDT 2009


           Summary: Assembly.LoadFrom crashes mono when trying to load a
                    C++/CLI assembly (SlimDX.dll)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: m.moeller at gmx.ch
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development

Created an attachment (id=285997)
 --> (http://bugzilla.novell.com/attachment.cgi?id=285997)
testcase sourcecode (Program.cs) and test assembly (SlimDX.dll)

Description of Problem:

Loading a C++/CLI assembly like SlimDX.dll (can be downloaded from
http://slimdx.org/) with the Assembly.LoadFrom method causes the mono runtime
to become unstable or crash. In Microsoft.NET loading an invalid (native win32
dll, x86 assembly on x64) or not supported Assembly file causes a
BadImageFormatException to be thrown. In mono the loading of C++/CLI assemblies
like SlimDX.dll should throw a BadImageFormatException and not crash mono

Steps to reproduce the problem:
1. Create a folder and compile Program.cs
2. Copy the file SlimDX.dll into the folder
3. Run Program.exe in that folder (on a x64 Windows Vista PC)

Actual Results:


** (Program.exe:1960): WARNING **: Can't find custom attr constructor image:
bba442a9b36\msvcm80.dll mtoken: 0x0a00000a

** (Program.exe:1960): WARNING **: Missing method
s.RuntimeHelpers::PrepareConstrainedRegions() in assembly C:\Program Files
\Mono-2.4\lib\mono\1.0\mscorlib.dll, referenced in assembly

(crash of mono)

Expected Results (Microsoft.NET on x64):

BadImageFormatException: SlimDX.dll

How often does this happen? 


Additional Information:

On Microsoft.NET on x64 a BadImageFormatException is thrown for the file
SlimDX.dll because the dll is for x86.

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