Open bskimaa opened 5 years ago
Quite a few people are also running into this issue:
@bskimaa can you please re-open this issue? It is still valid and still needs a fix.
I reproduce it also on a Linux Mint 19 Tara, with Mono version 5.16.0.220. An interesting link: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1246872
Maybe it's possible to call from mono (via DllImport) the suggested "xf86_cursors_init(screen, 64,64,0)" as workaround?
I absolutely need a workaround to this, that works with any recent Mono distribution (i distribute my app in .deb package with Mono as dependencies). I offer 200$ via Paypal for any workaround that can be applied to the code of @bskimaa. Thanks.
It was several years back and probably no longer relevant, but when we first started working with the BB there were two flavors, armhf Mono and not-hard float. We had to patch to get a working mono for hard float, and until then there were several arithmetic related bugs that we encountered. Dates was one, if I recall. Screen resolution calculations could have been another.
Linux Mint 19 Tara upgraded to Mono version 5.18.1.3, resolved. I tested the following distro in a fresh install:
In all,
All works, i cannot reproduce anymore.
I'm having this exact same issue on a Parrot OS linux installation on a vultr.com VPS. I managed to solve it by patching DefineCursor method in XPlatUIX11.cs file from mono sources an then recompiling.
DefineCursor method has this code: `if (XQueryBestCursor(DisplayHandle, RootWindow, bitmap.Width, bitmap.Height, out width, out height) == 0) { return IntPtr.Zero; }
// Win32 only allows creation cursors of a certain size
if ((bitmap.Width != width) || (bitmap.Width != height)) {
cursor_bitmap = new Bitmap(bitmap, new Size(width, height));
cursor_mask = new Bitmap(mask, new Size(width, height));
} else {
cursor_bitmap = bitmap;
cursor_mask = mask;
}`
It seems that XQueryBestCursor function return width=0 and height=0, and after that, creating a new Bitmap with those values throws an exception.
Just added a small if before creating the Bitmap, setting a width and height default value in case they where 0, that got rid of the crash, and now my small app runs smoothly.
Forgot to mention: my actual mono version is 5.20.1.34, but the code in DefineCursor method is still the same on the last mono source from git, so i think this bug is still there.
This happens on two of my SBCs running latest armbian. However with some stock images from respective board vendors it was fine. Also, if I run this with X-forwarding through SSH, it also runs fine.
Ladies and gents, I could solve my problem with keepass crashing in most menus by recompiling libgdiplus with the --with-pango
switch.
I have this problem. My HelloWorld doesn't work on Astra Linux via Hyper-V but works fine on Windows and other PC with Astra Linux where Virtual machine is not used.
@Vkurtke, run your app with debug
mono --debug MyApp.exe
Now you can see stacktraces with line numbers. You nedd to modify code to add Console.WriteLine for last call params.
Than build modified project like here https://github.com/mono/mono/issues/20769#issuecomment-2144648092
Steps to Reproduce
public class HelloWorld : Form { static public void Main () { Application.Run (new HelloWorld ()); }
}
Current Behavior
Expected Behavior
On which platforms did you notice this
[ ] macOS [*] Linux :
uname -a
[ ] Windows
Version Used:
Mono JIT compiler version 5.18.0.240 (tarball Wed Jan 16 09:28:29 UTC 2019) 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 Interpreter: yes LLVM: yes(600) Suspend: preemptive GC: sgen (concurrent by default)
Stacktrace