[Mono-winforms-list] erratic behavior in running winforms - redhat 7.2

mpollack@speakeasy.net mpollack@speakeasy.net
Mon, 11 Aug 2003 05:38:57 +0000


Hi,

I have redhat 7.2 and have some erratic behavior running the examples, sometimes they work, sometimes I get a stack trace.

The procedure for installing was the following

1. Download wine from http://primates.ximian.com/~duncan/mono-wine/sources/ and install according to http://www.nullenvoid.com/mono/wiki/index.php/MonoWinePackages

I also need to make the changes 

(NB There is a source code error after patching in line 695 where a variable
HMODULE module is declared after other statements which is not allowed in C. 
I swapped lines 694 and 695 to cure.)

2. downloaded mono from http://go-mono.com/daily/  version mono-0.25.99.2.20030810 and did ./configure --prefix=/usr/local, make, make install

3. compiled and ran a simple program, got the whole font generation stuff.  Then my winform showed up, with a message from wine, "I think you have a buggy version of libXrender.so.

4. I ran across the post on http://kt.zork.net/wine/wn20020509_122.html#6 .  I was using XFree86 4.1, I downloaded the 4.2 version of Xlib.tgz and put in the newer version of libXrender.so.1.1

5. Built some samples from http://primates.ximian.com/~duncan/mono-wine/samples/sources/ and ran them.

Now sometimes I can run the label program and get 

mono swf-label.exe
MonoWin32: Initializing WineLib
Warning: Language 'en_US' was not found, retrying without country name...
Warning: Language 'en' was not recognized, defaulting to English
err:menu:MENU_GetSysMenu failed to load system menu!

and i see the program run fine.

If I try to run the buttons example i get

mono swf-buttons.exe
MonoWin32: Initializing WineLib
Warning: Language 'en_US' was not found, retrying without country name...
Warning: Language 'en' was not recognized, defaulting to English

Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was required
in (unmanaged) 06 System.Windows.Forms.Win32:CreateWindowEx (uint,string,string,uint,int,int,int,int,intptr,intptr,intptr,intptr)
in <0x00004> 06 System.Windows.Forms.Win32:CreateWindowEx (uint,string,string,uint,int,int,int,int,intptr,intptr,intptr,intptr)
in <0x004ac> 00 System.Windows.Forms.NativeWindow:CreateHandle (System.Windows.Forms.CreateParams)
in <0x000c5> 00 System.Windows.Forms.Control:get_ParkingWindowHandle ()
in <0x00177> 00 System.Windows.Forms.Control:get_CreateParams ()
in <0x0000d> 00 System.Windows.Forms.ButtonBase:get_CreateParams ()
in <0x0001c> 00 System.Windows.Forms.Button:get_CreateParams ()
in <0x00048> 00 System.Windows.Forms.Control:UpdateBounds (int,int,int,int)
in <0x000a3> 08 System.Windows.Forms.Control:UpdateBounds (int,int,int,int)
in <0x000fb> 00 System.Windows.Forms.Control:SetBoundsCore (int,int,int,int,System.Windows.Forms.BoundsSpecified)
in <0x0001d> 00 System.Windows.Forms.Control:SetBounds (int,int,int,int,System.Windows.Forms.BoundsSpecified)
in <0x000b5> 08 System.Windows.Forms.Control:SetBounds (int,int,int,int,System.Windows.Forms.BoundsSpecified)
in <0x0007e> 00 System.Windows.Forms.Control:set_Location (System.Drawing.Point)
in <0x0009b> 08 System.Windows.Forms.Control:set_Location (System.Drawing.Point)
in <0x00582> 00 MyFormProject.MainForm:InitializeComponent ()
in <0x00054> 08 MyFormProject.MainForm:InitializeComponent ()
in <0x00019> 00 MyFormProject.MainForm:.ctor ()
in <0x00054> 08 MyFormProject.MainForm:.ctor ()
in <0x0001e> 00 MyFormProject.MainForm:Main (string[])


What is also interesting is if I try to run the label example like this

mono ./swf-label.exe I also get the same exception.

Any ideas what is going on?

Cheers and keep up the good work!

- Mark