exo-eject crashes trying to eject a strangely stuck HAL device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
thunar (Ubuntu) |
Fix Released
|
Medium
|
Lionel Le Folgoc |
Bug Description
Sadly, I have no idea exactly how I managed to get such a state of HAL database.
When I try to click on the icon on my desktop which represents the wretched thing
(a Canon camera formatted CF card), exo-eject just crashes in main:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f32c36fc7a0 (LWP 11140)]
0x00000000004033f5 in main (argc=1, argv=0x7fffcb72
338 main.c: No such file or directory.
in main.c
(gdb) bt
#0 0x00000000004033f5 in main (argc=1, argv=0x7fffcb72
(gdb) dir ~/compile/
Source directories searched: /home/raa/
(gdb) l
333 else
334 message = g_strdup_printf (_("Failed to mount \"%s\""), name);
335
336 /* popup an error message dialog */
337 dialog = gtk_message_
338 gtk_message_
339 gtk_dialog_run (GTK_DIALOG (dialog));
340 gtk_widget_destroy (dialog);
341 g_free (message);
342 }
(gdb) p err
$1 = (GError *) 0x0
(gdb) quit
The hal-device output for the UDI:
$ hal-device
0: udi = '/org/freedeskt
block.device = '/dev/sdc1' (string)
info.capabilities = { 'volume', 'block' } (string list)
volume.
volume.
block.major = 8 (0x8) (int)
volume.
block.minor = 33 (0x21) (int)
volume.
block.is_volume = true (bool)
volume.
linux.
volume.
info.product = 'CANON_DC' (string)
volume.ignore = false (bool)
info.udi = '/org/freedeskt
org.freedeskt
org.freedeskt
storage.model = '' (string)
org.freedeskt
org.freedeskt
info.interfaces = { 'org.freedeskto
volume.
volume.
block.
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT16' (string)
volume.uuid = '220D-41BE' (string)
volume.label = 'CANON_DC' (string)
volume.
volume.is_mounted = false (bool)
linux.sysfs_path = '/sys/devices/
volume.
info.parent = '/org/freedeskt
volume.
volume.is_disc = false (bool)
volume.
volume.
volume.block_size = 512 (0x200) (int)
volume.num_blocks = 507360 (0x7bde0) (int)
volume.size = 259768320 (0xf7bc000) (uint64)
info.category = 'volume' (string)
volume.
I managed to work the problem around with the attached patch,
but someone should look into the issue deeper (why is the UDI
listed, for instance? The device is long gone!)
But the patch should be applied anyway: it is no good to try to
report an error which is not described properly (the GError *err
is never set when that err0 branch is taken. Not to mention
suspicious use of goto here: _inside_ a conditional _past_ exactly
that err != NULL check?!)