Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 / drag-n-drop exception if source (no longer) supports requested format #21271

Open
ThomasKuehne opened this issue Nov 1, 2021 · 0 comments

Comments

@ThomasKuehne
Copy link
Contributor

Steps to Reproduce

  1. start a native X11 application ("source")
  2. start a mono application ("target")
  3. drag from mono to native and ensure that the source at drop time no longer supports the formats advertised at the start of drag operation

Current Behavior

mono throws a X11 Error encountered - see stack trace below

Expected Behavior

mono gracefully handles this situation without throwing exceptions as the "i no longer support this" behavior is explicitly defined for X11

On which platforms did you notice this

[ ] macOS
[X] Linux
[ ] Windows

Version Used:
Mono JIT compiler version 6.12.0.122 (tarball Fri Oct 29 08:00:16 CEST 2021)

Stacktrace

X11 Error encountered:
Error: BadAtom (invalid Atom parameter)
Request: 20 (0)
Resource ID: 0x0
Serial: 1432
Hwnd:
Control: at System.Environment.get_StackTrace () [0x00000] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/corlib/System/Environment.cs:316
at System.Windows.Forms.XplatUIX11.HandleError (System.IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00067] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:2118
at System.Windows.Forms.XplatUIX11.XGetWindowProperty (System.IntPtr , System.IntPtr , System.IntPtr , System.IntPtr , System.IntPtr , System.Boolean , System.IntPtr , System.IntPtr& , System.Int32& , System.IntPtr& , System.IntPtr& , System.IntPtr& ) [0x00000] in :0
at System.Windows.Forms.X11Dnd.GetData (System.Windows.Forms.XEvent& xevent) [0x0000f] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Dnd.cs:1308
at System.Windows.Forms.X11Dnd+SerializedObjectConverter.GetData (System.Windows.Forms.X11Dnd dnd, System.Windows.Forms.IDataObject data, System.Windows.Forms.XEvent& xevent) [0x00000] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Dnd.cs:107
at System.Windows.Forms.X11Dnd.HandleSelectionNotifyEvent (System.Windows.Forms.XEvent& xevent) [0x0002a] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Dnd.cs:675
at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue, System.Boolean allowIdle) [0x00949] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:1934
at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:1690
at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr handle, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x0001c] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3991
at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr hWnd, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x00000] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:724
at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x0034a] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:824
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00011] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:696
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in /var/tmp/portage/dev-lang/mono-6.12.0.122/work/mono-6.12.0.122-abi_x86_64.amd64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:679
at ClipDrop.ClipDropDotNet.Main (System.String[] args) [0x00011] in /opt/GIT/ClipDrop/DotNet/ClipDropDotNet.cs:729

ThomasKuehne added a commit to ThomasKuehne/mono that referenced this issue Nov 1, 2021
ThomasKuehne added a commit to ThomasKuehne/mono that referenced this issue Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant