kickerskopp
Posts: 3
Joined: Mon Jan 06, 2014 3:46 pm

Re: Raspbian vs Wheezy (beta) Mono support

Tue Apr 01, 2014 3:57 pm

This is what I actually do :)

User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Raspbian vs Wheezy (beta) Mono support

Tue Apr 01, 2014 4:25 pm

Don't write it here, write it in the bug tracker.

MeeVal
Posts: 2
Joined: Tue Apr 01, 2014 6:50 pm
Location: Czech republic
Contact: ICQ

Re: Raspbian vs Wheezy (beta) Mono support

Tue Apr 01, 2014 6:59 pm

I have same problem, when I try "sudo mono robot.exe".
But when I open "sudo monodevelop" and start debugging (F5) it is working.
Any ideas how to run same program from terminal?
I apologize for my English. I am not a native speaker. I am from Czech republic

xfx
Posts: 24
Joined: Thu Dec 06, 2012 10:09 pm

Re: Raspbian vs Wheezy (beta) Mono support

Wed Apr 02, 2014 3:14 am

dobova86 wrote: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.
MobaXterm is definitely a great solution... but for a free alternative I'd suggest the following combo:

moelski
Posts: 63
Joined: Wed Jan 09, 2013 8:16 am

Re: Raspbian vs Wheezy (beta) Mono support

Wed Aug 27, 2014 5:01 pm

Hi @all,

yesterday I build Mono 3.6.0 from a TAR and just treid a very basic WinForms App. As soon as I used a ComboBox I got the error which was described here a lot. :(

So I just started to write a long post here asking for a solution ... But then I found a small note that it could work with the last GIT version. :o
I turned my Pi (and my cubietruck) on, got the Mono GIT stuff and made some compilations and installations ... Which - well - takes a long long time :D

Now I got a very interesting Mono version (on Pi and Cubietruck):
[email protected] ~ $ mono --version
Mono JIT compiler version 3.8.1 (master/813d661 Wed Aug 27 09:14:48 CEST 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. http://www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Now I run my Basic WinForms App (on Pi and Cubietruck) and my eyes make something like this : :o :geek: :ugeek: 8-) :o :D

Take a look at the attached Screenshot. That is on a Raspberry Pi (running via SSH / X Server).

I´m really impressed now. And it seems that most of the stuff I need did work now. Even the TChart component runs fine and smoothly. I thought this would be impossible - but it isn´t :o :o
Also a basic Menu works like a charm.

So guys ... Get your GCC´s use the GIT repo and give it a try. It´s worth it :ugeek:

Dominik
Attachments
It Works.jpg
It Works.jpg (63.43 KiB) Viewed 4620 times

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Wed Aug 27, 2014 8:48 pm

Very interesting @moelski

I have no idea how to do this. Would you be able to provide more detail? Exact steps?
... got the Mono GIT stuff and made some compilations and installations ... Get your GCC´s use the GIT repo and give it a try
Also, what is a "Cubietruck" and do I have to have one for this?

Thanks

moelski
Posts: 63
Joined: Wed Jan 09, 2013 8:16 am

Re: Raspbian vs Wheezy (beta) Mono support

Thu Aug 28, 2014 5:33 am

Hi !
Would you be able to provide more detail? Exact steps?
Maybe it´s a good idea to start an extra topic for this (or I place it on my website).
Also, what is a "Cubietruck" and do I have to have one for this?
A CubieTruck is "the big brother" of the Pi:
http://cubieboard.org/2013/10/30/cubieb ... all-ready/

And no you don´t need one of those. I just have one to test on ARM6 (Pi) and ARM7 (CubieTruck) ;)

Dominik

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Thu Aug 28, 2014 10:12 am

moelski wrote:
Would you be able to provide more detail? Exact steps?
Maybe it´s a good idea to start an extra topic for this (or I place it on my website).
Dominik
Either suggestion is fine with me and would be great. Just let us me know where to find it. Thanks.

moelski
Posts: 63
Joined: Wed Jan 09, 2013 8:16 am

Re: Raspbian vs Wheezy (beta) Mono support

Sun Aug 31, 2014 4:53 am

Hi !

I have created a new topic for the mono compiling stuff. :ugeek:
Check it our here:
http://www.raspberrypi.org/forums/viewt ... 34&t=85807

Dominik

plugwash
Forum Moderator
Forum Moderator
Posts: 3254
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Aug 31, 2014 3:21 pm

So now we just have to wait for mono upstream to make a release and then for debian to package it.

janith
Posts: 6
Joined: Tue Sep 02, 2014 5:02 am

Re: Raspbian vs Wheezy (beta) Mono support

Tue Sep 02, 2014 6:23 am

Hi All,
I was able to install mono 3.8.1, on ubuntu 14.04 armhf, following the guide shared in here.
But I could not run any Windows.Forms application with mono.
I followed this guide for creating simple WinForm application.
http://www.mono-project.com/docs/gui/wi ... ted-guide/
was able to compile it, but gives Errors when trying to run with "mono hello.exe" command.

These are the errors I am getting:
Unhandled Exception:
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x00000] in <filename unknown>:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at HelloWorld..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
at HelloWorld.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x00000] in <filename unknown>:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at HelloWorld..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
at HelloWorld.Main () [0x00000] in <filename unknown>:0

stever29
Posts: 5
Joined: Wed Feb 27, 2013 6:57 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Sep 07, 2014 4:06 pm

I came across this thread yesterday - what an annoying bug! - FYI compiled from the 3.8 tar and the error still occurred.

Spent too much time on it already, so I bodged together a custom textbox and thought it might help someone.
It's _extremely_ rough around the edges, doesn't support selection, doesn't support keys like home/end, doesn't support copy/paste, doesn't support multiline, or even lines longer than the textbox... :!: (long list!) but I'm using it with a little touchscreen and a virtual keyboard so I don't think I'll be expanding it further as it meets what I need.

That said, if you improve it please share it back!

The string measurer class was from peenut here: http://stackoverflow.com/questions/3811 ... difference
It seemed one of the more accurate out of those I tried

[edit: setting this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); in the ctor seems to kill a small amount of flicker]

Code: Select all

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormsUI.TextBox
{
    public class NotATextBox : Panel
    {
        private int _cursorLocation = 0;
        private bool _showCursor = false;
        Timer timer = new Timer();
        StringFormat _strFormat = new StringFormat(StringFormat.GenericTypographic)
        {
            FormatFlags = StringFormatFlags.MeasureTrailingSpaces,
            Alignment = StringAlignment.Near,
            LineAlignment = StringAlignment.Near
        };

        public NotATextBox()
        {
            SetStyle(ControlStyles.Selectable, true);

            timer.Interval = 500;
            timer.Tick += (s, a) => { _showCursor = !_showCursor; this.Refresh(); };

            base.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            base.BackColor = Color.White;
            
            base.KeyPress += NotATextBox_KeyDown;
            base.PreviewKeyDown += NotATextBox_PreviewKeyDown;
            base.Enter += (s, a) => { timer.Start(); };
            base.Leave += (s, a) => { timer.Stop(); };
        }

        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (this.CanSelect) this.Select();

            _cursorLocation = GetCharIndexFromPosition(e.Location, this.Text);
            this.Refresh();
        }

        private void NotATextBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.Left:
                case Keys.Right:
                case Keys.Delete:
                    e.IsInputKey = true;
                    break;
            }
        }

        // By default, KeyDown does not fire for the ARROW keys 
        protected override void OnKeyDown(KeyEventArgs e)
        {
 	
            switch (e.KeyCode)
            {
                case Keys.Left:
                    if (_cursorLocation > 0)
                        _cursorLocation -= 1;
                    e.Handled = true;
                    break;
                case Keys.Right:
                    if (_cursorLocation < this.Text.Length)
                    _cursorLocation += 1;
                    e.Handled = true;
                    break;
                case Keys.Delete:
                    if (this.Text.Length > _cursorLocation)
                        this.Text = this.Text.Substring(0, _cursorLocation) + this.Text.Substring(_cursorLocation + 1, this.Text.Length - _cursorLocation - 1);
                    e.Handled = true;
                    break;
            }
            this.Refresh();
            base.OnKeyDown(e);
        }

        void NotATextBox_KeyDown(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Back)
            {
                if (this.Text.Length > 0 && _cursorLocation > 0 && this.Text.Length >= _cursorLocation)
                {
                    this.Text = this.Text.Substring(0, _cursorLocation - 1) + this.Text.Substring(_cursorLocation, Math.Max(this.Text.Length - _cursorLocation - 1, 0));
                    _cursorLocation--;
                }
            }
            else if (e.KeyChar == (char)Keys.Left && _cursorLocation > 0)
                _cursorLocation -= 1;
            else if (e.KeyChar == (char)Keys.Right && _cursorLocation < this.Text.Length)
                _cursorLocation += 1;
            else
            {
                this.Text = this.Text.Insert(_cursorLocation, new string(e.KeyChar, 1));
                _cursorLocation++;
            }
            this.Refresh();
            e.Handled = true;
        }

        
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
            e.Graphics.SmoothingMode = SmoothingMode.None;
            e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(Color.Black), new PointF(1, 2), _strFormat);
            
            if (!_showCursor)
                return;

            string str = this.Text.Substring(0, (_cursorLocation > Text.Length ? Text.Length : _cursorLocation));  
            float width = StringMeasurer.MeasureString(e.Graphics, _strFormat, this.Font, str).Width;

            if (str.EndsWith(" ") || str.StartsWith(" "))
            {
                float width1 = StringMeasurer.MeasureString(e.Graphics, _strFormat, this.Font, ". .").Width;
                float width2 = StringMeasurer.MeasureString(e.Graphics, _strFormat, this.Font, "..").Width;
                width += (width1 - width2) * (str.Length - str.TrimEnd(' ').TrimStart(' ').Length);
            }

            e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Black)), width + 2, 2, width + 2, this.Height - 4);
            
        }

        public int GetCharIndexFromPosition(Point pt, string str)
        {
            using (Graphics gr = base.CreateGraphics())
            {
                int x = str.Length;
                float width = float.MaxValue;
                while (width > pt.X)
                    width =  StringMeasurer.MeasureString(gr, _strFormat, this.Font, str.Substring(0, x--)).Width;
                
                return x + 1;
            }
        }

        private string _text = "";
        public string Text
        {
            get
            {
                return _text;
            }
            set
            {
                _text = value;
                Refresh();
            }
        }

        static class StringMeasurer
        {
            private static SizeF GetScaleTransform(Matrix m)
            {
                /*
                 3x3 matrix, affine transformation (skew - used by rotation)
                 [ X scale,     Y skew,      0 ]
                 [ X skew,      Y scale,     0 ]
                 [ X translate, Y translate, 1 ]

                 indices (0, ...): X scale, Y skew, Y skew, X scale, X translate, Y translate
                 */
                return new SizeF(m.Elements[0], m.Elements[3]);
            }

            public static RectangleF MeasureString(Graphics graphics, StringFormat strFormat, Font f, string s)
            {
                if (string.IsNullOrEmpty(s))
                    return new RectangleF(0, 0, 0, 0);
                //copy only scale, not rotate or transform
                var scale = GetScaleTransform(graphics.Transform);

                // Get initial estimate with MeasureText
                //TextFormatFlags flags = TextFormatFlags.Left | TextFormatFlags.NoClipping;
                //Size proposedSize = new Size(int.MaxValue, int.MaxValue);
                //Size size = TextRenderer.MeasureText(graphics, s, f, proposedSize, flags);
                SizeF sizef = graphics.MeasureString(s, f);
                sizef.Width *= scale.Width;
                sizef.Height *= scale.Height;
                Size size = sizef.ToSize();

                int xLeft = 0;
                int xRight = size.Width - 1;
                int yTop = 0;
                int yBottom = size.Height - 1;

                // Create a bitmap
                using (Bitmap image = new Bitmap(size.Width, size.Height))
                {
                    image.SetResolution(graphics.DpiX, graphics.DpiY);

                   // StringFormat strFormat = new StringFormat();
                

                    // Draw the actual text
                    using (Graphics g = Graphics.FromImage(image))
                    {
                        g.SmoothingMode = graphics.SmoothingMode;
                        g.TextRenderingHint = graphics.TextRenderingHint;
                        g.Clear(Color.White);
                        g.ScaleTransform(scale.Width, scale.Height);
                        g.DrawString(s, f, Brushes.Black, new PointF(0, 0), strFormat);
                    }
                    // Find the true boundaries of the glyph

                    // Find left margin
                    for (; xLeft < xRight; xLeft++)
                        for (int y = yTop; y <= yBottom; y++)
                            if (image.GetPixel(xLeft, y).ToArgb() != Color.White.ToArgb())
                                goto OUTER_BREAK_LEFT;
                OUTER_BREAK_LEFT: ;

                    // Find right margin
                    for (; xRight > xLeft; xRight--)
                        for (int y = yTop; y <= yBottom; y++)
                            if (image.GetPixel(xRight, y).ToArgb() != Color.White.ToArgb())
                                goto OUTER_BREAK_RIGHT;
                OUTER_BREAK_RIGHT: ;

                    // Find top margin
                    for (; yTop < yBottom; yTop++)
                        for (int x = xLeft; x <= xRight; x++)
                            if (image.GetPixel(x, yTop).ToArgb() != Color.White.ToArgb())
                                goto OUTER_BREAK_TOP;
                OUTER_BREAK_TOP: ;

                    // Find bottom margin
                    for (; yBottom > yTop; yBottom--)
                        for (int x = xLeft; x <= xRight; x++)
                            if (image.GetPixel(x, yBottom).ToArgb() != Color.White.ToArgb())
                                goto OUTER_BREAK_BOTTOM;
                OUTER_BREAK_BOTTOM: ;
                }

                var pt = new PointF(xLeft, yTop);
                var sz = new SizeF(xRight - xLeft + 1, yBottom - yTop + 1);
                return new RectangleF(pt.X / scale.Width, pt.Y / scale.Height,
                    sz.Width / scale.Width, sz.Height / scale.Height);

            }
        }
    }
}

csgyorgy
Posts: 2
Joined: Tue Sep 09, 2014 9:46 am

Re: Raspbian vs Wheezy (beta) Mono support

Tue Sep 09, 2014 10:01 am

From TAR you get mono version 3.8.0 which still have the "Textbox" error, from GIT you'll get 3.9.0 version which fails to compile on rpi.

MCS [build] mscorlib.dll

Unhandled Exception:
System.TypeLoadException: Could not load type 'Mono.CSharp.CommandLineParser' ...

Raspi_developer
Posts: 8
Joined: Sun Aug 10, 2014 5:20 am

Re: Raspbian vs Wheezy (beta) Mono support

Tue Sep 23, 2014 2:37 pm

Hello,
I am using mono with Raspberry Pi and getting the same error with TextBox discussed here. any suggestion or update please?
@stever29
Thanks a lot for sharing this.

csgyorgy
Posts: 2
Joined: Tue Sep 09, 2014 9:46 am

Re: Raspbian vs Wheezy (beta) Mono support

Mon Nov 03, 2014 12:53 pm

I did not try on RPI, but on BPI I could compile 3.10 mono version that works fine without "TextBox" issue. I see now the 3.10.0 mono version can be downloaded from TAR. Attached some screenshot as comparison of same VB.NET application run on WIN7 I5 vs. Raspbian BPI.
Attachments
WIN7_VBNET.jpg
WIN7_VBNET.jpg (50.41 KiB) Viewed 3719 times
BPI_VBNET_Mono.jpg
BPI_VBNET_Mono.jpg (54.2 KiB) Viewed 3719 times

axis23
Posts: 1
Joined: Mon Nov 10, 2014 7:35 am

Re: Raspbian vs Wheezy (beta) Mono support

Mon Nov 10, 2014 7:37 am

Hi,

Can you show how do you compile mono on Raspbian?

Thanks

nxexo007
Posts: 2
Joined: Wed Nov 26, 2014 1:12 pm

Re: Raspbian vs Wheezy (beta) Mono support

Wed Nov 26, 2014 1:29 pm

Hi,

you can use this howto to compile the current mono version for armhf devices:
http://pingfu.net/programming/troublesh ... black.html

I try it on beaglebone black and it works. But you have to be carry about the free space on your device, because the whole packet could be > 2GB after download and compilation. Good luck...:-)
Last edited by nxexo007 on Wed Nov 26, 2014 9:38 pm, edited 1 time in total.

nxexo007
Posts: 2
Joined: Wed Nov 26, 2014 1:12 pm

Re: Raspbian vs Wheezy (beta) Mono support

Wed Nov 26, 2014 9:38 pm

Hi again,

today I compiled mono 3.10.0 for armhf for beaglebone. If you want I can send you the .deb file to install via dpkg- i filename.deb on debian.

Just write me an email or postmessage in this forum.

W9JSW
Posts: 10
Joined: Mon Sep 28, 2015 1:28 pm

Re: Raspbian vs Wheezy (beta) Mono support

Mon Sep 28, 2015 1:30 pm

Can you pls post the .deb for 3.10?

W9JSW
Posts: 10
Joined: Mon Sep 28, 2015 1:28 pm

Re: Raspbian vs Wheezy (beta) Mono support

Mon Sep 28, 2015 2:47 pm

Nevermind. Misread the date...old post. Will build it myself.

Really wonder why this stuff is so down-level. Running current mono-runtime 3.2.8 gives the known for years textbox error on vb.net forms. A fix is upstream for over a year and no one has brought it down? Really???

What do mere mortals (average users) of this platform do? Walk away?

John :roll:

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Mon Sep 28, 2015 3:09 pm

Yes, I have walked away :( I have years of experience with .NET/C# and was so excited about the possibility of using it to program on Raspberry Pi but became disappointed and frustrated years ago and have given up.


Slowmo
Posts: 2
Joined: Tue Jan 14, 2014 1:33 am

Re: Raspbian vs Wheezy (beta) Mono support

Tue Sep 29, 2015 12:07 pm

bfagioli wrote:Yes, I have walked away :( I have years of experience with .NET/C# and was so excited about the possibility of using it to program on Raspberry Pi but became disappointed and frustrated years ago and have given up.
Try Windows 10 for IoT. You can develop with C# there.

plugwash
Forum Moderator
Forum Moderator
Posts: 3254
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Tue Sep 29, 2015 12:29 pm

I posted some mono 4 packages in a dedicated repo, see

viewtopic.php?f=34&t=99595#p798076

Unfortunately there seems to be some compatibility issues. In particular my attempts to rebuild monodevelop and it's dependencies against mono 4 were unsuccessful.

dslocum
Posts: 5
Joined: Sat Oct 22, 2016 7:13 pm

Re: Raspbian vs Wheezy (beta) Mono support

Thu Nov 03, 2016 5:24 pm

bfagioli wrote: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
I'm having the same problem. Any fixes yet?

Return to “Raspbian”

Who is online

Users browsing this forum: Baidu [Spider] and 17 guests