! 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 crashed trying to open a CD drive with no media.
Status:
RESOLVED: FIXED

Comments

Description Ambroz Bizjak 2011-02-19 11:32:14 CET
Created attachment 3484 
Fix for the bug

To reproduce:
1. install a CD drive
2. remove media from the drive
3. in Thunar, go to computer:///
4. double click on the CD drive entry

Result:
GLib-GIO-CRITICAL **: guint g_file_hash(gconstpointer): assertion `G_IS_FILE (file)' failed
(more assertion failures and crash follows)
Comment 1 Jannis Pohlmann editbugs 2011-02-19 16:08:05 CET
Fixed in master and the xfce-4.8 branch. Thanks for finding the cause of the problem!

commit f3def301388057f8080d675c8446907d7c62f3bc
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Sat Feb 19 16:06:27 2011 +0100

    Fix crash when opening a mountable drive with no media.
    
    Error spotted, reported and solved by Ambroz Bizjak.
Comment 2 Jannis Pohlmann editbugs 2011-07-15 21:09:31 CEST
Unfortunately, the fix broke SMB browsing and appears to be trigger bug #7774. I've decided to revert it for now (in master at least) to look for a better solution.
Comment 3 Ambroz Bizjak 2011-07-15 22:57:41 CEST
Created attachment 3785 
Improved fix

This appears to fix both this bug and bug #7774. While the previous patch considered anything that has an URI to be mounted, and everything else not mounted, this patch additionally considers all files that "can be mounted" to not be mounted.

I say "appears" because I can't fully test it; when I watch computer:/// and then insert a CD, I get:

(Thunar:18881): Thunar-WARNING **: Failed to launch the volume manager (Failed to execute child process "thunar-volman" (No such file or directory)), make sure you have the "thunar-volman" package installed.
[New Thread 0x7fffc4f58700 (LWP 18915)]
[New Thread 0x7fffbffff700 (LWP 18916)]
[New Thread 0x7fffbeffd700 (LWP 18917)]
[New Thread 0x7fffbf7fe700 (LWP 18919)]
[New Thread 0x7fffbe7fc700 (LWP 18920)]
[New Thread 0x7fffbdffb700 (LWP 18921)]
[New Thread 0x7fffbd3d8700 (LWP 18922)]
[New Thread 0x7fffbcbd7700 (LWP 18923)]
[New Thread 0x7fffb7fff700 (LWP 18924)]
[New Thread 0x7fffb77fe700 (LWP 18925)]
[Thread 0x7fffb7fff700 (LWP 18924) exited]
[Thread 0x7fffbe7fc700 (LWP 18920) exited]
[Thread 0x7fffbf7fe700 (LWP 18919) exited]
[Thread 0x7fffbd3d8700 (LWP 18922) exited]
[Thread 0x7fffbcbd7700 (LWP 18923) exited]
[Thread 0x7fffc4f58700 (LWP 18915) exited]
[Thread 0x7fffb77fe700 (LWP 18925) exited]
[Thread 0x7fffbdffb700 (LWP 18921) exited]
[Thread 0x7fffbffff700 (LWP 18916) exited]
[Thread 0x7fffbeffd700 (LWP 18917) exited]
[New Thread 0x7fffbeffd700 (LWP 18942)]
[Thread 0x7fffbeffd700 (LWP 18942) exited]
[New Thread 0x7fffbeffd700 (LWP 18949)]
[New Thread 0x7fffbffff700 (LWP 18953)]
[Thread 0x7fffbeffd700 (LWP 18949) exited]

(Thunar:18881): Thunar-WARNING **: Failed to launch the volume manager (Failed to execute child process "thunar-volman" (No such file or directory)), make sure you have the "thunar-volman" package installed.

GLib-GIO-CRITICAL **: g_file_info_get_attribute_uint32: assertion `G_IS_FILE_INFO (info)' failed
aborting...

Program received signal SIGABRT, Aborted.
0x00007ffff46048a5 in raise () from /lib64/libc.so.6
(gdb) br
Breakpoint 1 at 0x7ffff46048a5
(gdb) bt
#0  0x00007ffff46048a5 in raise () from /lib64/libc.so.6
#1  0x00007ffff4605ba5 in abort () from /lib64/libc.so.6
#2  0x00007ffff49aadaa in g_logv () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff49aae33 in g_log () from /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff53380fc in g_file_info_get_attribute_uint32 () from /usr/lib64/libgio-2.0.so.0
#5  0x00000000004460a8 in thunar_file_get_user (file=0x7fffb8016000) at thunar-file.c:1770
#6  0x000000000045d402 in thunar_list_model_get_value (model=0x8915d0, iter=0x7fffffffd020, column=5, 
    value=0x7fffffffce20) at thunar-list-model.c:698
#7  0x00007ffff6b4a779 in gtk_tree_view_column_cell_set_cell_data () from /usr/lib64/libgtk-x11-2.0.so.0
#8  0x00007ffff6b36a27 in gtk_tree_view_bin_expose () from /usr/lib64/libgtk-x11-2.0.so.0
#9  0x00007ffff6b38515 in gtk_tree_view_expose () from /usr/lib64/libgtk-x11-2.0.so.0
#10 0x00007ffff6a3da88 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib64/libgtk-x11-2.0.so.0
#11 0x00007ffff50a8e9a in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#12 0x00007ffff50ba2d7 in signal_emit_unlocked_R () from /usr/lib64/libgobject-2.0.so.0
#13 0x00007ffff50c3b44 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#14 0x00007ffff50c3f73 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#15 0x00007ffff6b5972f in gtk_widget_event_internal () from /usr/lib64/libgtk-x11-2.0.so.0
#16 0x00007ffff6a3c2aa in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0
#17 0x00007ffff647d322 in _gdk_window_process_updates_recurse () from /usr/lib64/libgdk-x11-2.0.so.0
#18 0x00007ffff647d2cf in _gdk_window_process_updates_recurse () from /usr/lib64/libgdk-x11-2.0.so.0
#19 0x00007ffff647d2cf in _gdk_window_process_updates_recurse () from /usr/lib64/libgdk-x11-2.0.so.0
#20 0x00007ffff647827b in gdk_window_process_updates_internal () from /usr/lib64/libgdk-x11-2.0.so.0
#21 0x00007ffff647a469 in gdk_window_process_all_updates () from /usr/lib64/libgdk-x11-2.0.so.0
#22 0x00007ffff69bebb1 in gtk_container_idle_sizer () from /usr/lib64/libgtk-x11-2.0.so.0
#23 0x00007ffff64577e6 in gdk_threads_dispatch () from /usr/lib64/libgdk-x11-2.0.so.0
#24 0x00007ffff49a1f7e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#25 0x00007ffff49a2768 in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#26 0x00007ffff49a2dd2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#27 0x00007ffff6a3aff7 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#28 0x000000000042439e in main (argc=1, argv=0x7fffffffdc48) at main.c:294
Comment 4 Ambroz Bizjak 2011-07-15 23:02:02 CEST
Also, I noticed that with the first patch, where smb:// shares could not be mounted, Thunar in fact hits assertion failures because the chooser is created with a NULL content-type (but without debug, the chooser still shows up).
Comment 5 Jannis Pohlmann editbugs 2011-07-16 00:21:24 CEST
(In reply to comment #4)
> Also, I noticed that with the first patch, where smb:// shares could not be
> mounted, Thunar in fact hits assertion failures because the chooser is created
> with a NULL content-type (but without debug, the chooser still shows up).

Yep, I noticed that too. When built without debuggin, all assertions are stripped as they are mostly a testing feature to avoid bad behavior.
Comment 6 Ambroz Bizjak 2011-07-18 15:38:50 CEST
Sorry, perhaps I wasn't clear enough: my patch does not in fact introduce any new bugs, the crash I mentioned was there all along.
Comment 7 Jannis Pohlmann editbugs 2011-09-14 20:21:50 CEST
Thanks. This is now fixed in master and in the xfce-4.8 branch:

commit 4406581a896e46b7589a905424b1d99ae762147e
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Wed Sep 14 20:09:18 2011 +0200

    Fix crash when opening a drive with no media (bugs #7308 and #7774).
    
    Patches provided by Ambroz Bizjak and Axel Sommerfeld.

Bug #7308

Reported by:
Ambroz Bizjak
Reported on: 2011-02-19
Last modified on: 2011-09-14

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Attachments

Fix for the bug (641 bytes, patch)
2011-02-19 11:32 CET , Ambroz Bizjak
no flags
Improved fix (694 bytes, patch)
2011-07-15 22:57 CEST , Ambroz Bizjak
no flags

Additional information