[Mono-list] Problem with System.Windows.Forms namespace...

Jurek Bartuszek koxta@koxta.net
Sun, 26 Dec 2004 00:03:32 +0100


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there... I have a problem with GUI applications written in C# and
built under linux:

koxta@hell 3 $ cat file.cs
using System;
using System.Windows.Forms;

public class HelloWindowsForms
{
~        public static void Main()
~        {
~                MessageBox.Show("Hello C# World");
~        }
}

koxta@hell 3 $ mcs file.cs -r System.Windows.Forms
Compilation succeeded

koxta@hell 3 $ mono file.exe
Killed

koxta@hell 3 $ mono -v file.exe
Method (wrapper managed-to-native)
System.Object:__icall_wrapper_mono_thread_get_pending_exception ()
emitted at 0x415da000 to 0x415da049 [file.exe]
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void_string
(object,intptr,intptr,intptr) emitted at 0x415da050 to 0x415da0ca [file.exe]
Method System.OutOfMemoryException:.ctor (string) emitted at 0x415da0d0
to 0x415da0f7 [file.exe]
Method System.SystemException:.ctor (string) emitted at 0x415da0f8 to
0x415da11f [file.exe]
Method System.Exception:.ctor (string) emitted at 0x415da120 to
0x415da181 [file.exe]
Method System.Object:.ctor () emitted at 0x415da188 to 0x415da18d [file.exe]
Method System.MonoType:get_FullName () emitted at 0x415da190 to
0x415da1aa [file.exe]
Method (wrapper managed-to-native) System.MonoType:getFullName ()
emitted at 0x415da1b0 to 0x415da200 [file.exe]
Method System.Exception:set_HResult (int) emitted at 0x415da208 to
0x415da216 [file.exe]
Method System.NullReferenceException:.ctor (string) emitted at
0x415da218 to 0x415da23f [file.exe]
Method System.StackOverflowException:.ctor (string) emitted at
0x415da240 to 0x415da253 [file.exe]
Method (wrapper runtime-invoke)
System.Object:runtime_invoke_void_Assembly (object,intptr,intptr,intptr)
emitted at 0x415da258 to 0x415da2d2 [file.exe]
Method (wrapper managed-to-native)
System.Object:__icall_wrapper_mono_object_new_fast (intptr) emitted at
0x415da2d8 to 0x415da328 [file.exe]
Method System.AppDomain:DoAssemblyLoad (System.Reflection.Assembly)
emitted at 0x415da330 to 0x415da382 [file.exe]
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void
(object,intptr,intptr,intptr) emitted at 0x415da388 to 0x415da3f7 [file.exe]
Method HelloWindowsForms:Main () emitted at 0x415da3f8 to 0x415da410
[file.exe]
Killed

I run Gentoo linux, kernel 2.6.9. Mono version 1.0.5, cairo 0.2.0,
winelib 0.3, libgdiplus 1.0.5. That's all, I suppose.

Please, help.

Regards,

Koxta

P.S. Seems to work fine here:
http://bdn.borland.com/article/0,1410,32073,00.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBzfHE6l8uJkeTVlMRAlbjAJ90SlW9N2LMVQFRDoj10Hmfy0RR+wCdEntJ
6XShDEqsTTScGmY2GI+EzrI=
=mFGN
-----END PGP SIGNATURE-----