[Mono-winforms-list] swf
Peter Dennis Bartok
peter@novonyx.com
Sat, 30 Oct 2004 04:30:59 -0600
Well, looks like you're on a Mac. I seem to remember that there was an issue
with having mono default to .dylib for shared libs, but I could be wrong and
confusing this with something else. Either way, I just removed the .so
ending from the DllImports in CVS, that shouldn't have been there. That
should help the automatic mapping mechanism. Also, if that doesn't work you
can try to manually map the dl through the config file.
Peter
-----Original Message-----
From: "gennady wexler" <adyler@winisp.net>
To: "Peter Dennis Bartok" <peter@novonyx.com>; "Paul"
<paul@all-the-johnsons.co.uk>; "mono-winforms"
<mono-winforms-list@lists.ximian.com>
Date: Friday, 29 October, 2004 22:58
Subject: Re: [Mono-winforms-list] swf
>you are sure the problem is with whether X is running or not? we cant seem
>to find this dll at all. I get exact same call stack from under X term
>session. any idea where this dll lives and why it is not there?
>
>the only things I have in my X11 lib folder are these. are we missing
>mapping? where does the mapping suppose to be defined for this to work?
>
>lrwxr-xr-x 1 root wheel 15 21 Aug 00:34 libSM.dylib ->
>libSM.6.0.dylib
>-rw-r--r-- 1 root wheel 995424 2 Mar 2004 libX11.6.2.dylib
>lrwxr-xr-x 1 root wheel 16 21 Aug 00:34 libX11.6.dylib ->
>libX11.6.2.dylib
>-rw-r--r-- 1 root wheel 1572168 2 Mar 2004 libX11.a
>lrwxr-xr-x 1 root wheel 16 21 Aug 00:34 libX11.dylib ->
>libX11.6.2.dylib
>-rw-r--r-- 1 root admin 9972 2 Mar 2004 libXRes.1.0.dylib
>lrwxr-xr-x 1 root wheel 17 21 Aug 00:34 libXRes.1.dylib ->
>libXRes.1.0.dylib
>-rw-r--r-- 1 root wheel 5072 2 Mar 2004 libXRes.a
>lrwxr-xr-x 1 root wheel 17 21 Aug 00:34 libXRes.dylib ->
>libXRes.1.0.dylib
>-rw-r--r-- 1 root wheel 33132 2 Mar 2004 libXTrap.6.4.dylib
>lrwxr-xr-x 1 root wheel 18 21 Aug 00:34 libXTrap.6.dylib ->
>libXTrap.6.4.dylib
>-rw-r--r-- 1 root wheel 39804 2 Mar 2004 libXTrap.a
>lrwxr-xr-x 1 root wheel 18 21 Aug 00:34 libXTrap.dylib ->
>libXTrap.6.4.dylib
>-rw-r--r-- 1 root wheel 13844 2 Mar 2004 libXau.a
>
>
>apple:~/mono/cvs/mcs/class/System.Windows.Forms/Samples adyler$
>mono --debug
>Form1.exe
>
>Unhandled Exception: System.TypeInitializationException: An exception was
>thrown by the type initializer for System.Windows.Forms.XplatUI --->
>System.DllNotFoundException: libX11.so
>in <0x000d8> (wrapper managed-to-native)
>System.Windows.Forms.XplatUIX11:XOpenDisplay (intptr)
>in [0x00032] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>XplatUIX11.cs:138) System.Windows.Forms.XplatUIX11:.ctor ()
>in [0x0001b] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>XplatUIX11.cs:172) System.Windows.Forms.XplatUIX11:GetInstance ()
>in [0x0001e] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>XplatUI.cs:183) System.Windows.Forms.XplatUI:.cctor ()
>--- End of inner exception stack trace ---
>
>in (unmanaged) System.Windows.Forms.XplatUI:get_DefaultClassName ()
>in [0x00043] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Control.cs:1776) System.Windows.Forms.Control:get_CreateParams ()
>in [0x00043] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Control.cs:1776) System.Windows.Forms.Control:get_CreateParams ()
>in [0x00001] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Form.cs:184) FormParentWindow:get_CreateParams ()
>in [0x00087] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Control.cs:757) System.Windows.Forms.Control:.ctor ()
>in [0x00001] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Form.cs:158) FormParentWindow:.ctor (System.Windows.Forms.Form)
>in <0x00094> (wrapper remoting-invoke-with-check) FormParentWindow:.ctor
>(System.Windows.Forms.Form)
>in [0x00013] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Form.cs:498) System.Windows.Forms.Form:get_CreateParams ()
>in [0x00087] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Control.cs:757) System.Windows.Forms.Control:.ctor ()
>in [0x00001] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>ScrollableControl.cs:217) System.Windows.Forms.ScrollableControl:.ctor ()
>in [0x00001] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>ContainerControl.cs:46) System.Windows.Forms.ContainerControl:.ctor ()
>in [0x00001] (at
>/Users/adyler/mono/cvs/mcs/class/Managed.Windows.Forms/System.Windows.Forms/
>Form.cs:302) System.Windows.Forms.Form:.ctor ()
>in <0x00020> WindowsApplication1.Form1:.ctor ()
>in <0x0007c> (wrapper remoting-invoke-with-check)
>WindowsApplication1.Form1:.ctor ()
>in <0x0002c> WindowsApplication1.Form1:Main ()
>
>apple:~/mono/cvs/mcs/class/System.Windows.Forms/Samples adyler$
>
>
>On 10/27/04 11:20 PM, "Peter Dennis Bartok" <peter@novonyx.com> wrote:
>
>>> But surely, this isn't a mono problem? If the X server isn't running
>>> (say a machine is set to runlevel 3), then the libraries won't be loaded
>>> either. An X session won't be started so the best that can happen is an
>>> exception is thrown. As I've said though, the error report would vary
>>> between platforms...
>> Well, it's not a Mono problem per se, no, if you want to display via X
>> you
>> need an X-Server. But, the libs will load just fine even if no X-Server
>> is
>> run on the machine where they are being loaded. After all, just loading
>> they
>> won't know if there's an X-Server running or not, and X-servers can be
>> remote.
>> We're just not handling the fact that we can't open the display, and that
>> is
>> ultimately a Mono/MWF problem. All we need to do is deal with
>> XOpenDisplay
>> returning null, instead of just assuming it didn't. At that point we can
>> choose to throw an exception or even just display an error message and
>> exit
>> the app. Simple fix. In fact, so simple, I just fixed it in the head CVS
>> version :-)
>>
>> Cheers,
>> Peter
>>
>> _______________________________________________
>> Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>
>_______________________________________________
>Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>