views:

466

answers:

1

In general, I have been having difficulties porting my .NET Windows Forms applications created in Visual Studio 2008 to Mono/Linux. The problem is that sometimes, some types of text do not get displayed; where I expect to see text there is just emptiness or illegible marks. On one Ubuntu machine, all the text was displayed correctly except the text in dialog boxes from MessageBox.Show, which looked like tiny illegible black marks. On another Ubuntu machine, that same program worked fine. But then I upgraded that machine from Ubuntu 9.4 to 9.10: now the text of Checkboxes and Labels does not show up, but the text inside Textboxes and Tab labels does show up.

When you are porting an application to Mono/Linux and you have text display difficulties, how do you debug it? What are your general strategies?

Am I missing fonts, and how do I figure out which fonts are missing?

More specifically: I made a small program in Visual Studio that just had a tab control with two tab pages, and a label in each one. It works fine in Visual Studio, but in Mono/Linux the text of the tabs gets displayed while the labels' text does not get displayed.

I am using Ubuntu 9.10, and I have installed these relevant packages: mono-gmcs libusb-1.0-0-dev mono-2.0-devel libmono-winforms2.0-cil.

Here is the command I used to compile the program:

gmcs -unsafe -debug -target:exe -out:EventTest.exe
./Form1.cs ./Form1.Designer.cs ./Program.cs
-r:/usr/lib/mono/2.0/System.dll
-r:/usr/lib/mono/2.0/System.Core.dll
-r:/usr/lib/mono/2.0/System.Drawing.dll
-r:/usr/lib/mono/2.0/System.Windows.Forms.dll

When I ran it with MONO_LOG_LEVEL=DEBUG, I got several error messages:

(./EventTest.exe:8395): Mono-WARNING **: The request to load the assembly
mscorlib v1.0.5000.0 was remapped to v2.0.0.0
(./EventTest.exe:8395): Mono-WARNING **: The request to load the assembly
System.Windows.Forms v1.0.5000.0 was remapped to v2.0.0.0
(./EventTest.exe:8427): Mono-WARNING **: DllImport unable to load library
'lib/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon:
cannot open shared object file: No such file or directory'.

Why would it try to load version 1.0 when I explicitly compiled with version 2.0? Why would it try to load Carbon (isn't that a Max OS thing?) I'll give the whole log if you want to see it.

There was also a log message about not being able to find "libgdi32". I add a symbolic link using the command below, and that removed the error message but didn't seem to affect the application's other problems.

sudo ln -s /usr/lib/wine/gdi32.dll.so /usr/lib/libgdi32.so
+1  A: 

There seems to be problems with the video drivers shipped with ubuntu 9.10.

More information is here: https://bugzilla.novell.com/show%5Fbug.cgi?id=549882

jpobst
Thanks a lot! After a lot of work, I was able to compile the new X.org Intel driver (xserver-xorg-video-intel 2.9.1) from scratch and it fixed my problem.For more information, see:https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/462349http://intellinuxgraphics.org/
David Grayson