! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar crashes when dragging a file from Opera over it
Status:
RESOLVED: FIXED

Comments

Description mik01aj 2009-09-18 11:06:40 CEST
Here's the console output:

(thunar:22505): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed
The program 'thunar' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
  (Details: serial 1962 error_code 5 request_code 24 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I'm using Thunar 1.0.1 and Opera 10.
If I drag and drop the file to gedit, a space appears in this place.

I think that this bug may be reproducable, so I list the steps to reproduce:

1. Download some file with Opera
2. Open transfers tab.
3. Start dragging the file
4. When you move your mouse over any thunar window,thunar crashes.
Comment 1 k.blammo 2009-11-05 09:15:47 CET
Looks suspiciously like a bug I describe here:
http://foo-projects.org/pipermail/thunar-dev/2009-October/004653.html

Could someone review and commit included patch please?

diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 83139fc..27802c1 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -2857,7 +2857,8 @@ thunar_standard_view_drag_motion (GtkWidget          *view,
       else
         {
           /* request the drag data from the source */
-          gtk_drag_get_data (view, context, target, timestamp);
+          if ( target != GDK_NONE )
+            gtk_drag_get_data (view, context, target, timestamp);
         }

       /* tell Gdk whether we can drop here */
Comment 2 Jannis Pohlmann editbugs 2009-11-06 07:50:12 CET
Confirmed, I get the same behaviour. I'm marking this important for Thunar 1.2 so I hopefull won't forget to take a look at it.
Comment 3 Jerome 2009-11-11 13:19:00 CET
For what it is worth, I'm having the same issue when trying to drop files, in any thunar window, dragged from the remote site column of filezilla.

As far as i understand, proposed patch prevents thunar from crashing.

While this is a benefit, it would probably be nice to be able to handle legitimate drag'n drops. Such as files in transfer tabs, etc...
Comment 4 Jerome 2009-11-11 13:49:08 CET
Since the bug makes thunar crash, it may be a good idea to introduce the patch proposed in Comment 1 before version 1.2, wouldn't it ? (Assuming it is reviewed and accepted.) 

It seems to be just a test/check, not an architecture or design change.
Comment 5 Jannis Pohlmann editbugs 2009-12-20 13:45:28 CET
Fixed in master:

commit 58568697a90844d98c7602902df8084297f19c1b
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Sun Dec 20 14:42:21 2009 +0100

    Avoid requesting drag data if target is GDK_NONE (bug #5771).
    
    Patch provided by k.blammo@gmail.com.
Comment 6 Lionel Le Folgoc 2011-10-21 14:15:56 CEST
*** Bug 6218 has been marked as a duplicate of this bug. ***

Bug #5771

Reported by:
mik01aj
Reported on: 2009-09-18
Last modified on: 2011-10-21
Duplicates (1):
  • 6218 Crash if data with unknown format is dragged over directory view

People

Assignee:
Jannis Pohlmann
CC List:
3 users

Version

Attachments

Additional information