mail-archives/mono-bugs/2009-February/086136.html

171 строка
5.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 476354] New: .NET exe / binary doesn't work with Mono (System.TypeInitializationException)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20476354%5D%20New%3A%20.NET%20exe%20/%20binary%20doesn%27t%20work%20with%0A%20Mono%20%28System.TypeInitializationException%29&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="086134.html">
<LINK REL="Next" HREF="086231.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 476354] New: .NET exe / binary doesn't work with Mono (System.TypeInitializationException)</H1>
<B>bugzilla_noreply at novell.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20476354%5D%20New%3A%20.NET%20exe%20/%20binary%20doesn%27t%20work%20with%0A%20Mono%20%28System.TypeInitializationException%29&In-Reply-To="
TITLE="[Mono-bugs] [Bug 476354] New: .NET exe / binary doesn't work with Mono (System.TypeInitializationException)">bugzilla_noreply at novell.com
</A><BR>
<I>Tue Feb 17 02:36:54 EST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="086134.html">[Mono-bugs] [Bug 354090] Socket.Select throws exception for read-only ILists
</A></li>
<LI>Next message: <A HREF="086231.html">[Mono-bugs] [Bug 476354] .NET exe / binary doesn't work with Mono (System.TypeInitializationException)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#86136">[ date ]</a>
<a href="thread.html#86136">[ thread ]</a>
<a href="subject.html#86136">[ subject ]</a>
<a href="author.html#86136">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE><A HREF="https://bugzilla.novell.com/show_bug.cgi?id=476354">https://bugzilla.novell.com/show_bug.cgi?id=476354</A>
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: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">stifu at free.fr</A>
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
Found By: ---
Created an attachment (id=273185)
--&gt; (<A HREF="https://bugzilla.novell.com/attachment.cgi?id=273185">https://bugzilla.novell.com/attachment.cgi?id=273185</A>)
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 ---&gt;
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: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="086134.html">[Mono-bugs] [Bug 354090] Socket.Select throws exception for read-only ILists
</A></li>
<LI>Next message: <A HREF="086231.html">[Mono-bugs] [Bug 476354] .NET exe / binary doesn't work with Mono (System.TypeInitializationException)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#86136">[ date ]</a>
<a href="thread.html#86136">[ thread ]</a>
<a href="subject.html#86136">[ subject ]</a>
<a href="author.html#86136">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>