https://bugzilla.novell.com/show_bug.cgi?id=476354


           Summary: .NET exe / binary doesn't work with Mono
                    (System.TypeInitializationException)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: Other
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=273185)
 --> (https://bugzilla.novell.com/attachment.cgi?id=273185)
Testcase (sources + binaries)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1b3pre) Gecko/20090215 Shiretoko/3.1b3pre (.NET CLR 3.5.30729)

See testcase.

When trying to run the exe with Mono, I get this:

Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for System.Windows.Forms.XplatUI --->
System.ArgumentNullException: Could not open display (X-Server required. Check
you DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle)
[0x00000]
  at System.Windows.Forms.XplatUIX11..ctor () [0x00000]
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000]
  at System.Windows.Forms.XplatUI..cctor () [0x00000]
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Application.EnableVisualStyles () [0x00000]
  at WindowsApplication.Program.Main (System.String[] args) [0x00000] 

But it works fine if you recompile the program with Mono.
It also works fine with Mono on Windows.

PS: another weird thing... In that program, I simply draw an image on a Panel.
I use the DrawImageUnscaled function. With Mono, the image isn't scaled, as
you'd expect. With .NET, the image is enlarged.

Reproducible: Always

-- 
Configure bugmail: https://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to