Page 8 of 10

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Sun Dec 29, 2013 6:25 pm
by plugwash
I've just uploaded an update for them, it should be available after the next mirror run (which should be finished by arround midnight UTC)

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Mon Dec 30, 2013 8:22 pm
by bluespot
plugwash wrote:I've just uploaded an update for them, it should be available after the next mirror run (which should be finished by arround midnight UTC)
Thanks, xsp is properly updated and my mini-website is working perfectly !

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Dec 31, 2013 1:36 am
by bfagioli
WinForm TextBox causes crash. I created a very simple exe (attached inside the zip) with a WinForm and two Button controls and it was fine but then I added a TextBox control and it crashed during startup with this error.

Code: Select all

mono WindowsFormsApplication1.exe
Xlib:  extension "RANDR" missing on display ":10.0".
* Assertion at mini-codegen.c:798, condition `i == sel' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at System.Windows.Forms.TextBoxBase.Draw (System.Drawing.Graphics,System.Drawing.Rectangle) <0x000b3>
  at System.Windows.Forms.TextBoxBase.OnPaintInternal (System.Windows.Forms.PaintEventArgs) <0x00063>
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&) <0x0017f>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x00223>
  at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message&) <0x0032f>
  at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message&) <0x001eb>
  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x0002b>
  at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x0003b>
  at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x002e7>
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&) <0x00023>
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&) <0x00033>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00bf3>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x00067>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00033>
  at WindowsFormsApplication1.Program.Main () <0x00043>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:


Debug info from gdb:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb6a0f430 (LWP 2879)]
0xb6e5aa3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
  Id   Target Id         Frame 
  2    Thread 0xb6a0f430 (LWP 2879) "mono" 0xb6e58700 in [email protected]@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
* 1    Thread 0xb6f2e000 (LWP 2878) "mono" 0xb6e5aa3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0

Thread 2 (Thread 0xb6a0f430 (LWP 2879)):
#0  0xb6e58700 in [email protected]@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x001f8160 in mono_sem_wait (sem=0x2eaa1c, alertable=1) at mono-semaphore.c:116
#2  0x00176ed8 in finalizer_thread (unused=<optimized out>) at gc.c:1073
#3  0x0015c2a0 in start_wrapper_internal (data=0x105c128) at threads.c:609
#4  start_wrapper (data=0x105c128) at threads.c:654
#5  0x001ee228 in thread_start_routine (args=0x1017228) at wthreads.c:294
#6  0x001fc308 in inner_start_thread (arg=<optimized out>) at mono-threads-posix.c:49
#7  0xb6e51bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#8  0xb6dbe758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#9  0xb6dbe758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb6f2e000 (LWP 2878)):
#0  0xb6e5aa3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x000afec8 in mono_handle_native_sigsegv (signal=<optimized out>, ctx=<optimized out>) at mini-exceptions.c:2344
#2  <signal handler called>
#3  0xb6d20bfc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0xb6d2497c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#5  0x000137ee in ?? ()
#6  0x000137ee in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

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

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Dec 31, 2013 3:44 am
by plugwash
Do you know if windows.forms is core mono or supplied by some other package?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Dec 31, 2013 9:02 am
by emg
I used ILSpy to have a look at your test executable. I don't know if it makes any difference, but you are targeting:

// Architecture: AnyCPU (64-bit preferred)
// Runtime: .NET 4.0

Try changing to 32-bit and target .NET 2.0 and re-test. I'm under the impression that Mono is usually a few vers behind in runtime support...

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 01, 2014 5:06 pm
by bfagioli
emg wrote:I used ILSpy to have a look at your test executable. I don't know if it makes any difference, but you are targeting:

// Architecture: AnyCPU (64-bit preferred)
// Runtime: .NET 4.0

Try changing to 32-bit and target .NET 2.0 and re-test. I'm under the impression that Mono is usually a few vers behind in runtime support...
When using Architecture: AnyCPU the .NET runtime should select the appropriate arch. The .NET 4.0 could be a problem but I don't think so in case since the TextBox control has been around for a while.

In any case I changed the project to .NET 2.0 / x86 but the problem still occurs. By the way these Windows Forms projects worked just fine on the old soft-float abi distro.

I have not tried any more Forms controls since TexBox is pretty rudimentary and if its not working then its pretty unusable in general -- wrt Windows Forms programming.

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 01, 2014 6:36 pm
by gcsdave
I get the same error... TextBox doesnt work .
* Assertion at mini-codegen.c:807, condition `i == sel' not met

Stacktrace:

at <unknown> <0xffffffff>
at System.Windows.Forms.TextBoxBase.Draw (System.Drawing.Graphics,System.Drawing.Rectangle) <0x000b3>
at System.Windows.Forms.TextBoxBase.OnPaintInternal (System.Windows.Forms.PaintEventArgs) <0x00063>
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&) <0x0017f>
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x00223>
at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message&) <0x0032b>
at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message&) <0x001db>
at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x0002b>
at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x0003b>
at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x002e7>
at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&) <0x00023>
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&) <0x00033>
at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00bdf>
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x00067>
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00033>
at test1.Program.Main () <0x00043>
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:


Debug info from gdb:

Mono support loaded.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb6a17430 (LWP 2473)]
0xb6e60a3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
Id Target Id Frame
2 Thread 0xb6a17430 (LWP 2473) "mono" 0xb6e5e700 in [email protected]@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
* 1 Thread 0xb6f32000 (LWP 2472) "mono" 0xb6e60a3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0

Thread 2 (Thread 0xb6a17430 (LWP 2473)):
#0 0xb6e5e700 in [email protected]@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x001fb298 in mono_sem_wait (sem=0x2ef91c, alertable=1) at mono-semaphore.c:119
#2 0x0017a2fc in finalizer_thread (unused=<optimized out>) at gc.c:1073
#3 0x0015f19c in start_wrapper_internal (data=0x1224da0) at threads.c:609
#4 start_wrapper (data=0x1224da0) at threads.c:654
#5 0x001f139c in thread_start_routine (args=0x11e0628) at wthreads.c:294
#6 0x001ff4a4 in inner_start_thread (arg=<optimized out>) at mono-threads-posix.c:49
#7 0xb6e57bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#8 0xb6dc4758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#9 0xb6dc4758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb6f32000 (LWP 2472)):
#0 0xb6e60a3c in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x000b10fc in mono_handle_native_sigsegv (signal=<optimized out>, ctx=<optimized out>) at mini-exceptions.c:2299
#2 <signal handler called>
#3 0xb6d26bfc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#4 0xb6d2a97c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#5 0x000135c6 in ?? ()
#6 0x000135c6 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

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

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Fri Jan 03, 2014 6:39 pm
by wakawaka54
I get the exact same error when I ran a WinForms with a textbox controls. This is quite disappointing :/

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Sun Jan 05, 2014 10:34 am
by emg
This might be a possible solution (see last post in thread):

Mono (C#) 2.11.4 hard-float for Raspberry Pi

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Sun Jan 05, 2014 5:21 pm
by bfagioli
emg wrote:This might be a possible solution (see last post in thread):

Mono (C#) 2.11.4 hard-float for Raspberry Pi
I took a look at my system and it already had libgdiplus.so installed in /usr/lib but it did not have the symbolic link from /usr/local/lib. I created that symbolic link and tried it again -- but it failed in the same manner.

I am actually able to create a WinForm app and run it via mono on my Raspberry Pi as long as it does not use a TextBox control. So, far I have only used a Form and Button. If TextBox has a problem I'm sure there are other controls that also have problems.

Is something wrong with the mono runtime or maybe the problem in in the package ??

If a package problem maybe one of these?

Code: Select all

libmono-system-reactive-windows-forms2.1-cil
Mono System.Reactive.Windows.Forms Library (for CLI 4.5)

libmono-system-windows-forms-datavisualization4.0a-cil
Mono System.Windows.Forms.DataVisualization Library (for CLI 4.0)

libmono-system-windows-forms4.0-cil
Mono System.Windows.Forms Library (for CLI 4.0)

libmono-winforms2.0-cil
Mono System.Windows.Forms library (for CLI 2.0)


Re: Raspbian vs Wheezy (beta) Mono support

Posted: Mon Jan 06, 2014 6:45 am
by fooBart
I have this problem too.

I compiled my own mono from git source on the pi.
mono-test-install passes fine after I tweaked /usr/local/etc/mono/config to repoint to correct libgdiplus.so location (before that it was looking in the wrong path)

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Mon Jan 06, 2014 3:51 pm
by kickerskopp
Same problem here...

This was the first ever try I made with mono and winforms on my raspberry...
Nice start :D

Any fix available ?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 08, 2014 1:27 am
by plugwash
I've made upstream aware of the issue but I don't have any news of a fix at this time.

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 08, 2014 3:28 am
by bfagioli
plugwash wrote:I've made upstream aware of the issue but I don't have any news of a fix at this time.
Thanks let us know if you hear anything.

Here is a the result of a little more testing of WinFoms. I have found several other controls that fail because they are either derived form TextBox or use one.

These do not work:
  • RichTextBox
    ComboBox
    MaskedTextBox
    NumericUpDown
    OpenFileDialog
Also, I noticed that the WebBrowser control does not appear to work. It does not case the app to crash but I can't seem to get it visible.

Attached is an idea of the controls that do work (so far).

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 08, 2014 10:21 am
by emg

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Jan 14, 2014 1:46 am
by Slowmo
Same problem here. Any news or workarounds?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Jan 14, 2014 1:22 pm
by bfagioli
Slowmo wrote:Same problem here. Any news or workarounds?
I don't know of any workaround.

No news in the bug report that was created specifically for this problem:
https://bugzilla.xamarin.com/show_bug.cgi?id=17013

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Jan 28, 2014 8:12 pm
by SteveMSJ
Does anybody know if any progress is being made on this?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 29, 2014 6:24 pm
by fernando.cruz
Hello, I need to install the mono 2.11.4 that was published in the Raspberry page months ago, now isn't there, someone do you know where I can obtain that?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Wed Jan 29, 2014 9:26 pm
by plugwash

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Thu Jan 30, 2014 3:30 pm
by fernando.cruz
Thanks, I have reviewed the link http://snapshot.raspbian.org/201312282317/raspbian/ but the Compiled mono distribution 2.11.4 HF for Raspbian is not there!

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Mar 25, 2014 11:27 am
by dobova86
Hi,
i face this problem and we are few month later. I'm using apt-get install mono-complete from last wheezy version.
mono report --version:

Code: Select all

Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4+rpi1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  armel,vfp+hard
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen
So it must be 3.x release.
Error:

Code: Select all

* Assertion at mini-codegen.c:807, condition `i == sel' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at System.Windows.Forms.TextBoxBase.Draw (System.Drawing.Graphics,System.Drawing.Rectangle) <0x000b3>
  at System.Windows.Forms.TextBoxBase.OnPaintInternal (System.Windows.Forms.PaintEventArgs) <0x00063>
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&) <0x0017f>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x00223>
  at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message&) <0x00327>
....
I get the error on TextBox control, using .NET fwk v2 and v4. Still no solution to this ?

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Apr 01, 2014 2:37 pm
by ReBoot
A Little Status update for those who doesn't read the Xamarin bugtracker:
the last Thing the maintainer said was
Admittedly, I would prefer a repro that doesn't use WinForms since I have no
monitors connected to my ARM boards...
So I've added a CLI test case. It uses a RichTextBox, but the whole app is a CLI one so he should be able to test.

HOWEVER, I don't have a Raspbian HF Setup right now, so it would be nice if someone of you would actually confirm that it crashes as expected.

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Apr 01, 2014 3:28 pm
by kickerskopp
Hi,

I tried your executable on my Raspberry and it does NOT crash.
This makes sense as the call stack shows that the problem is happening in the Draw

at System.Windows.Forms.TextBoxBase.Draw (System.Drawing.Graphics,System.Drawing.Rectangle) <0x000b3>
at System.Windows.Forms.TextBoxBase.OnPaintInternal (System.Windows.Forms.PaintEventArgs) <0x00063>

and your code just creates an RichTextBox Object and does not contain any container which will actually draw it ( like a form )

I would guess that the problem will be difficult to reproduce w/o actually trying to display the Text/RichTextBox control :?

One idea would perhaps be to add a call to the .Show method of the control...

Peter

Re: Raspbian vs Wheezy (beta) Mono support

Posted: Tue Apr 01, 2014 3:35 pm
by dobova86
You can reproduce error also using X server on a PC, you don't need a monitor on a PI.
Take a look http://mobaxterm.mobatek.net/ for example, it has a freeware version.