[Mono-osx] Still trouble with 1.1.17

matt jaffa mjaffa at gmail.com
Fri Sep 1 14:07:15 EDT 2006


So I am having a different problem. Hope the previous post solves Ken's issue.
My app comes up fine, but when I try to type in any text box I get this:

Unhandled Exception: System.DllNotFoundException: gdiplus
  at (wrapper managed-to-native) System.Windows.Forms.XplatUIX11:GetFontMetrics
(intptr,intptr,int&,int&)
  at System.Windows.Forms.XplatUIX11.GetFontMetrics (System.Drawing.Graphics g,
System.Drawing.Font font, System.Int32 ascent, System.Int32 descent) [0x00000]
  at System.Windows.Forms.XplatUI.GetFontMetrics (System.Drawing.Graphics g, Sys
tem.Drawing.Font font, System.Int32 ascent, System.Int32 descent) [0x00000]
  at System.Windows.Forms.Line.RecalculateLine (System.Drawing.Graphics g, Syste
m.Windows.Forms.Document doc) [0x00000]
  at System.Windows.Forms.Document.RecalculateDocument (System.Drawing.Graphics
g, Int32 start, Int32 end, Boolean optimize) [0x00000]
  at System.Windows.Forms.Document.UpdateView (System.Windows.Forms.Line line, I
nt32 pos) [0x00000]
  at System.Windows.Forms.Document.InsertCharAtCaret (Char ch, Boolean move_care
t) [0x00000]
  at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message m) [
0x00000]
  at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message m) [0x00
000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Fo
rms.Message m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wPa
ram, IntPtr lParam) [0x00000]
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG m
sg) [0x00000]
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG msg)
 [0x00000]
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.For
ms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [
0x00000]
  at WindowsApplication1.Program.Main () [0x00000]


Is this a known issue. This is from a test windows application
compiled with .NET VS 2005 and then ran with mono on OSX in a x11
window.

Thanks,
Matt


On 9/1/06, Aaron Flynt <aaron at aaronflynt.com> wrote:
> What do you get when you open Terminal.app, and type "echo $DISPLAY"?
> I think maybe /etc/bashrc doesn't set the display environment
> variable on a default install. I have the following in mine:
>
> #Set the 'DISPLAY' environmental variable for running X11 apps from
> terminal:
> DISPLAY=:0.0
> export DISPLAY
>
> Perhaps the LOADER script in mcs/tools/macpack should be modified to
> set the DISPLAY variable if the X11 backend is being used. Maybe test
> to see if it's empty and set it to some reasonable default (like :
> 0.0) if necessary.
>
> Aaron Flynt
>
> On Sep 1, 2006, at 12:49 PM, Ken & Deb Allen wrote:
>
> > Previously with 1.1.16 on MacOS X there were a number of problems
> > reported launching Mono applications that used System Windows Forms,
> > all revolving around the inability to locate specific libraries, all
> > of which actually appeared to be present.
> >
> > This seems to be have been resolved with the 1.1.17.1 release, but I
> > still cannot get the application to execute.
> >
> > I downloaded and installed the new Mono release, compiled and
> > macpacked the application code, and when I double-click on the
> > application from the Finder, the program starts to load and then
> > crashes. I then explicitly started the X11 program and again double-
> > clicked my built application, with the same result.
> >
> > The following is the console output from attempting to execute the
> > built program. I can provide the simple source files and build script
> > to any who want to attempt to reproduce this problem. I should note
> > that this is a 'clean' Mono installation, with no extra configuration
> > attempts or environment variables manually set. I have simply been
> > installing each version of Mono as it becomes available and then
> > attempting to execute the code. I should also note that this exact
> > same code loaded and ran under 1.1.13, although the forms rendering
> > on the screen had a large number of problems.
> >
> >
> > ----> Initial console information from first attempt to execute the
> > built application.
> >> Mono System.Windows.Forms Assembly [$auto_build_revision$]
> >>
> >> 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 <0x00000> <unknown method>
> >>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
> >>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
> >>   at System.Windows.Forms.Control..ctor () [0x00000]
> >>   at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
> >>   at System.Windows.Forms.ContainerControl..ctor () [0x00000]
> >>   at System.Windows.Forms.Form..ctor () [0x00000]
> >>   at EliminationTournament.ControlForm..ctor (System.Drawing.Icon
> >> FormIcon) [0x00000]
> >>   at (wrapper remoting-invoke-with-check)
> >> EliminationTournament.ControlForm:.ctor (System.Drawing.Icon)
> >>   at EliminationTournament.ControlForm.Main () [0x00000]
> >>
> > ----> Console information from launching X11
> >> XFree86 Version 4.4.0 / X Window System
> >> (protocol Version 11, revision 0, vendor release 6600)
> >> _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
> >> [DRI] screen 0 installation complete
> >> Screen 0 added: 1440x900 @ (0,0)
> >> Could not init font path element /usr/X11R6/lib/X11/fonts/CID/,
> >> removing from list!
> > ----> Console information from launching the Mono application after
> > X11 was launched and running.
> >> Mono System.Windows.Forms Assembly [$auto_build_revision$]
> >>
> >> 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 <0x00000> <unknown method>
> >>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
> >>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
> >>   at System.Windows.Forms.Control..ctor () [0x00000]
> >>   at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
> >>   at System.Windows.Forms.ContainerControl..ctor () [0x00000]
> >>   at System.Windows.Forms.Form..ctor () [0x00000]
> >>   at EliminationTournament.ControlForm..ctor (System.Drawing.Icon
> >> FormIcon) [0x00000]
> >>   at (wrapper remoting-invoke-with-check)
> >> EliminationTournament.ControlForm:.ctor (System.Drawing.Icon)
> >>   at EliminationTournament.ControlForm.Main () [0x00000]
> >>
> > _______________________________________________
> > Mono-osx mailing list
> > Mono-osx at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>


More information about the Mono-osx mailing list