[Mono-dev] SIGSEGV with Windows.Forms programs (Mono 1.1.14)

2006-04-10 Thread Heinz Mueller

Hi all,
programs with Windows.Forms work no longer with Mono 1.1.14 on
Linux.
Sample Code, 'makefile' and stack trace are attached.

Regards and thanks for the good work,
Heinz

Copyright notice: the sample code is from Charles Petzold's
Programming Microsoft Windows with C#

--
Heinz Mueller [EMAIL PROTECTED]
Tel: (+49)5251 815137 Fax: ... 816106
Disclaimer: All opinions above are my own (at least I think so ;-))
//---
// TwoForms.cs © 2001 by Charles Petzold
//---
using System.Windows.Forms;

class TwoForms
{
 public static void Main()
 {

  Form form1 = new Form();
  Form form2 = new Form();

  form1.Text = Form passed to Run();
  form2.Text = Second form;
  form2.Show();

  Application.Run(form1);


  MessageBox.Show(Application.Run() has returned  +
  control back to Main. Bye, bye!,
  TwoForms);
 }
}
Could not get XIM

=
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=

Stacktrace:

in (wrapper managed-to-native) System.Windows.Forms.X11Keyboard:XCreateIC 
(intptr,string,System.Windows.Forms.XIMProperties,string,intptr,string,intptr,intptr)
 0x4
in (wrapper managed-to-native) System.Windows.Forms.X11Keyboard:XCreateIC 
(intptr,string,System.Windows.Forms.XIMProperties,string,intptr,string,intptr,intptr)
 0xffd2
in System.Windows.Forms.X11Keyboard:CreateXic (intptr) 0x32
in System.Windows.Forms.X11Keyboard:.ctor (intptr,intptr) 0x185
in System.Windows.Forms.XplatUIX11:SetDisplay (intptr) 0x3e9
in System.Windows.Forms.XplatUIX11:.ctor () 0x8b
in System.Windows.Forms.XplatUIX11:GetInstance () 0x40
in System.Windows.Forms.XplatUI:.cctor () 0x61
in (wrapper runtime-invoke) System.Object:runtime_invoke_void 
(object,intptr,intptr,intptr) 0xc7782857
in System.Windows.Forms.Form:get_CreateParams () 0x
in System.Windows.Forms.Form:get_CreateParams () 0x64
in System.Windows.Forms.Control:.ctor () 0x273
in System.Windows.Forms.ScrollableControl:.ctor () 0x11
in System.Windows.Forms.ContainerControl:.ctor () 0x10
in System.Windows.Forms.Form:.ctor () 0x19
in (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:.ctor () 
0xfefe
in TwoForms:Main () 0x1e
in (wrapper runtime-invoke) System.Object:runtime_invoke_void 
(object,intptr,intptr,intptr) 0xc77838d7

Native stacktrace:

mono(mono_handle_native_sigsegv+0xbb) [0x815385b]
mono [0x813e1bf]
[0xe440]
[0x4120afb2]
[0x4120af23]
[0x4120886e]
[0x41205d6a]
[0x41201014]
[0x41200f01]
[0x40da0ff2]
[0x409bb83e]
mono [0x813e070]
mono(mono_runtime_invoke+0x27) [0x80d7847]
mono(mono_runtime_class_init+0x12b) [0x80d5c4b]
mono [0x813d8c4]
mono [0x813dc12]
mono [0x813ddaa]
mono(mono_compile_method+0x3a) [0x80d604a]
mono(mono_magic_trampoline+0x1a) [0x8154cea]
[0x40251032]
[0x40da0324]
[0x40d9fe9a]
[0x40d9fdb9]
[0x40d9fab2]
[0x409bb7ea]
[0x409bb6c7]
[0x409ba7be]
mono [0x813e070]
mono(mono_runtime_invoke+0x27) [0x80d7847]
mono(mono_runtime_exec_main+0x5c) [0x80d897c]
mono(mono_runtime_run_main+0x171) [0x80d85a1]
mono(strftime+0x1bae) [0x805c632]
mono(mono_main+0x841) [0x805d001]
mono(__fxstat64+0x137) [0x805b9eb]
/lib/tls/libc.so.6(__libc_start_main+0xe0) [0x40116250]
mono(sinh+0x4d) [0x805b941]
mcs -r:System.Windows.Forms twoforms.cs

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-devel-list] Found a bug in DrawBeziers in Graphics.cs (I think...)

2005-07-25 Thread Heinz Mueller

Hi all,
at first a short introduction: my name and Company you can see below,
I dabble around with Mono mre or less in my free time :-).
To get a grip on it I wrote some short programs of my own (nothing
special) and try to get to run sample programs from books
(e.g. Programming Windows with C# (Charles Petzold), Programming
in the key of C# (same author), Mono - a Developers Notebook
(Edd Dumbill).

Now to the subject: when trying out a program from the fist
mentioned book (a clock with Bezier spline hands with System.Drawing)
I got an value out of range exception in the points array of
DrawBeziers.
I looked up the source and I think the DrawBeziers for loop should
start with
for (i=0;(i+3)length;i+=3)...
or the first statement should be
if (i == (length -1)) break;

How do you think?

Regards, Heinz
--
Heinz Mueller [EMAIL PROTECTED]
Tel: (+49)5251 815137 Fax: ... 816106
Disclaimer: All opinions above are my own (at least I think so ;-))
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list