[Mono-winforms-list] running winforms application on OS X
Erik Renes
keenriser at planet.nl
Thu Jan 24 18:30:38 EST 2008
Paul,
I browsed a bit through the source code, guided by your stack trace. It
seems that Mono tries to fetch the font 'MS Sans Serif' (see font.c ->
GdipGetGenericFontFamilySansSerif). Could you check if you have that font
installed? If you don't have it, perhaps you could rename some other generic
font to 'MS Sans Serif' to check if that helps.
Perhaps someone more involved in libgdiplus development could shed a light
on my assessment?
Erik
From: Paul Berry [mailto:tall_paulb at hotmail.com]
Sent: donderdag 24 januari 2008 10:47
To: Erik Renes
Cc: mono-winforms-list at lists.ximian.com
Subject: RE: [Mono-winforms-list] running winforms application on OS X
Thanks for the response. I'm trying to runs this application under X11, it
gives the error detailed.
Also, this happens with *any* mono application, I'm guessing the problem
lies in my X11 / mono configuration somewhere but I've no idea where to
start looking.
_____
From: keenriser at planet.nl
To: paulb at premiere-employment.co.uk; mono-winforms-list at lists.ximian.com
Date: Wed, 23 Jan 2008 23:42:10 +0100
Subject: Re: [Mono-winforms-list] running winforms application on OS X
Hi Paul,
I notice in your stack trace there is something about a font family missing,
I have read here:
http://groups.google.com/group/cocoa-sharp-dev/browse_thread/thread/4be54c8a
401ad445 that you need X11 installed for something font-related.
That's all I can think of right now, other things I do sometimes is to check
out the source code and see why it goes wrong. That may provide insight in
what to google for, or workarounds.
Hope this helps,
Erik Renes
From: mono-winforms-list-bounces at lists.ximian.com
[mailto:mono-winforms-list-bounces at lists.ximian.com] On Behalf Of Paul Berry
Sent: woensdag 23 januari 2008 17:57
To: mono-winforms-list at lists.ximian.com
Subject: [Mono-winforms-list] running winforms application on OS X
HI all, hopefully someone can help with this, I've been googling for answers
to this problem for 2 days now without any luck.
Basically, I'm at the stage where my application (originally written in
.Net, ported to mono on linux, now trying to port to OS X) compiles fine,
but running it provokes the error at the bottom of this message.
Further testing has revealed that this error occurs for *any* mono
application. Googling has revealed several cases of this error with
winforms on OS X but no useful solution. I've tried copying fonts from my
windows machine to ~/fonts and running mkfontdir on that directory but this
results in 'Bus error'.
Please help!
Here's the error:
Unhandled Exception: System.TypeInitializationException: An exception was
thrown
by the type initializer for
System.Windows.Forms.WindowsFormsSynchronizationCon
text ---> System.TypeInitializationException: An exception was thrown by the
typ
e initializer for System.Windows.Forms.ThemeEngine --->
System.ArgumentException
: The requested FontFamily could not be found [GDI+ status:
FontFamilyNotFound]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
at System.Drawing.FontFamily..ctor (GenericFontFamilies genericFamily)
[0x0000
0]
at (wrapper remoting-invoke-with-check) System.Drawing.FontFamily:.ctor
(Syste
m.Drawing.Text.GenericFontFamilies)
at System.Drawing.FontFamily.get_GenericSansSerif () [0x00000]
at System.Drawing.Font.CreateFont (System.String familyName, Single
emSize, Fo
ntStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)
[0x00000]
at System.Drawing.Font..ctor (System.String familyName, Single emSize,
FontSty
le style, GraphicsUnit unit, Byte charSet, Boolean isVertical) [0x00000]
at System.Drawing.Font..ctor (System.String familyName, Single emSize,
System.
String systemName) [0x00000]
at (wrapper remoting-invoke-with-check) System.Drawing.Font:.ctor
(string,sing
le,string)
at System.Drawing.SystemFonts.get_DefaultFont () [0x00000]
at System.Windows.Forms.Theme..ctor () [0x00000]
at System.Windows.Forms.ThemeWin32Classic..ctor () [0x00000]
at System.Windows.Forms.ThemeEngine..cctor () [0x00000] --- End of inner
excep
tion stack trace ---
at System.Windows.Forms.Hwnd.GetBorderWidth
(System.Windows.Forms.CreateParams
cp) [0x00000]
at System.Windows.Forms.Hwnd.GetBorders (System.Windows.Forms.CreateParams
cp,
System.Windows.Forms.Menu menu) [0x00000]
at System.Windows.Forms.Hwnd.GetWindowRectangle
(System.Windows.Forms.CreatePa
rams cp, System.Windows.Forms.Menu menu, Rectangle client_rect) [0x00000]
at System.Windows.Forms.XplatUIOSX.CalculateWindowRect
(System.Drawing.Rectang
le& ClientRect, System.Windows.Forms.CreateParams cp,
System.Windows.Forms.Menu
menu, System.Drawing.Rectangle& WindowRect) [0x00000]
at System.Windows.Forms.XplatUI.CalculateWindowRect
(System.Drawing.Rectangle&
ClientRect, System.Windows.Forms.CreateParams cp, System.Windows.Forms.Menu
men
u, System.Drawing.Rectangle& WindowRect) [0x00000]
at System.Windows.Forms.Control.InternalSizeFromClientSize (Size
clientSize) [
0x00000]
at System.Windows.Forms.Control.ClientSizeFromSize (Size size) [0x00000]
at System.Windows.Forms.Control..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor
()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor ()
[0x00000]
--- End of inner exception stack trace ---
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 WindowsApplication1.Form1..ctor () [0x00000]
IMPORTANT NOTICE:
-------------------------------------
This E-Mail and any files transmitted with it are confidential and are
intended solely for the use of the intended recipient(s).
If you are not the intended recipient, you must not copy, distribute or take
any action based on this communication.
If you have received this communication in error please contact the sender
and delete this communication and any copies of it.
Any views or opinions presented are solely those of the author and do not
necessarily represent those of Premiere Employment Group Ltd.
Premiere Employment Group Ltd monitors E-Mails to ensure its systems
operates effectively and to minimise the risk of viruses.
Any file attachments to this communication will have been virus checked
prior to transmission, however you should carry out your own virus check
before opening.
We do not accept liability for any damage or loss that may occur from
software viruses.
Premiere Employment Group Ltd
7th Floor, Blackfriars House
1 The Parsonage
Manchester
M3 2JA
Fax: 0161 832 0307
www.premierepeople.com
Premiere People is the trading name of Premiere Employment Group Ltd
4963501
Registered Address: Chevron House,
346 Long Lane,
Hillingdon,
Middlesex,
UB10 9PF
_____
Think you know your TV, music and film? Try Search Charades!
<https://www.searchcharades.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20080125/9e647bad/attachment-0001.html
More information about the Mono-winforms-list
mailing list