rlopez1j / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

mono applications not working under xmonad #251

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. take any mono application that uses System.Windows.Forms
2. compile
3. execute under xmonad(-0.8)

What is the expected output? What do you see instead?

applicattion crashes on startup with

Stacktrace:

  at (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal.ReadIntPtr (intptr,int) <0x00004>
  at (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal.ReadIntPtr (intptr,int) <0xffffffff>
  at System.Windows.Forms.XplatUIX11.get_WorkingArea () <0x00496>
  at System.Windows.Forms.XplatUI.get_WorkingArea () <0x00019>
  at System.Windows.Forms.SystemInformation.get_WorkingArea () <0x0000e>
  at System.Windows.Forms.Screen..cctor () <0x0002d>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.Hwnd.GetNextStackedFormLocation
(System.Windows.Forms.CreateParams,System.Windows.Forms.Hwnd) <0xffffffff>
  at System.Windows.Forms.Hwnd.GetNextStackedFormLocation
(System.Windows.Forms.CreateParams,System.Windows.Forms.Hwnd) <0x00253>
  at System.Windows.Forms.XplatUIX11.CreateWindow
(System.Windows.Forms.CreateParams) <0x003ca>
  at System.Windows.Forms.XplatUI.CreateWindow
(System.Windows.Forms.CreateParams) <0x00015>
  at System.Windows.Forms.NativeWindow.CreateHandle
(System.Windows.Forms.CreateParams) <0x00030>
  at System.Windows.Forms.Control.CreateHandle () <0x00076>
  at System.Windows.Forms.Form.CreateHandle () <0x00011>
  at System.Windows.Forms.Control.CreateControl () <0x0008c>
  at System.Windows.Forms.Control.SetVisibleCore (bool) <0x0007d>
  at System.Windows.Forms.Form.SetVisibleCore (bool) <0x0017e>
  at System.Windows.Forms.Control.set_Visible (bool) <0x00023>
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control.set_Visible (bool) <0xffffffff>
  at System.Windows.Forms.Application.RunLoop
(bool,System.Windows.Forms.ApplicationContext) <0x001bc>
  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext) <0x0006a>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00025>
  at Havannah.Program.Main () <0x00034>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

What version of the product are you using? On what operating system?

xmonad-0.8, ghc-6.10.1, suse-linux-11.1

Please provide any additional information below.

Application is running fine under icewm.

Original issue reported on code.google.com by waldm...@imn.htwk-leipzig.de on 23 Dec 2008 at 12:02

GoogleCodeExporter commented 8 years ago
Can you provide some example mono applications that use System.Windows.Forms?

Original comment by justin%j...@gtempaccount.com on 23 Dec 2008 at 1:44

GoogleCodeExporter commented 8 years ago
Compile with 

  gmcs Main.cs   /r:System.Windows.Forms /out:Main.exe

then run with

  mono Main.exe

You know what is really really strange - this application crashes
when I start it from (a konsole within) the first desktop - it works fine from 
desktops with larger numbers. (I am using KDEWM=/usr/local/bin/xmonad in kde3)

Original comment by waldm...@imn.htwk-leipzig.de on 23 Dec 2008 at 3:21

Attachments:

GoogleCodeExporter commented 8 years ago
Does not crash here.  I used:
    Mono C# compiler version 1.9.1.0
    Mono JIT compiler version 1.9.1 (tarball)
    whatever version of libmono-winforms2.0-cil Ubuntu 8.10 provides

Can you replicate the crash with the default xmonad config?

You're most likely seeing a bug in Mono or the winforms library, application 
crashes
are generally not the window manager's fault.

Original comment by SpencerJ...@gmail.com on 23 Dec 2008 at 4:01

GoogleCodeExporter commented 8 years ago
I am using 
Mono C# compiler version 2.0.1.0
Mono JIT compiler version 2.0.1 (tarball)

what exactly is "the default xmonad config"?

Original comment by waldm...@imn.htwk-leipzig.de on 23 Dec 2008 at 10:01

GoogleCodeExporter commented 8 years ago
> what exactly is "the default xmonad config"?

The default configuration is used when there is no ".xmonad" directory -- ie. 
the
configuration without any user customizations.

Original comment by SpencerJ...@gmail.com on 24 Dec 2008 at 2:24

GoogleCodeExporter commented 8 years ago
Confirmed with XMonad 0.8 on Ubuntu Hardy with this config:

http://haskell.org/haskellwiki/Xmonad/Config_archive/Thomas_ten_Cate's_monad.hs

And this application:

http://nanowritool.sourceforge.net/
http://downloads.sourceforge.net/nanowritool/NaNoWriTool.exe

Works fine on all desktops except the first.

Looks like the calls to XGetWindowProperty in
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs, in 
particular the
WorkingArea getter, need some extra return value checking. What funkiness in 
XMonad
causes this behaviour, I don't know. Something to do with the root window, I 
guess.

Original comment by ttenc...@gmail.com on 4 Jan 2009 at 4:12

GoogleCodeExporter commented 8 years ago
> in particular the WorkingArea

xmonad does not support _NET_WM_WORKAREA.  However, mono should not crash on 
window
managers that do not support EWMH.

Original comment by SpencerJ...@gmail.com on 4 Mar 2009 at 7:57

GoogleCodeExporter commented 8 years ago
Bug confirmed with OpenBSD 4.6 under awesome 2.3.6 and under OpenBSD-current 
too.

Why does such a thing as mono exists ????

Original comment by sexxxena...@gmail.com on 1 Mar 2010 at 9:41

GoogleCodeExporter commented 8 years ago
It looks like there is a bug on the Mono project for this issue with a patch:
https://bugzilla.novell.com/show_bug.cgi?id=494234

I haven't been able to try it yet.

Original comment by bpel...@gmail.com on 26 Mar 2010 at 7:49