On Sat, 15 Apr 2006 23:37:37 +0200, Benedikt Meurer
<[EMAIL PROTECTED]> said:


> Hm, cannot reproduce it here, and it's somewhat unlikely, since
> libxfce4util strips off empty paths. Are you sure that its crashing
> inside Thunar code, not inside GTK+ code?

Instead of studying for exams, I've been poking around in it with GDB. The crash
is definitely in Thunar code.

The backtrace:
----
(thunar:10862): thunar-vfs-CRITICAL **: thunar_vfs_monitor_add_file: assertion
`path != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1866983088 (LWP 10862)]
0x6ffba026 in IA__thunar_vfs_path_to_string (path=0x0,
    buffer=0x778e3a13
"/home/ori/coding/testing_root/share/applications/mimeinfo.cache",
bufsize=4097, error=0x0) at thunar-vfs-path.c:657 657       if (G_UNLIKELY
(path->parent == NULL)) 

(gdb) bt
#0  0x6ffba026 in IA__thunar_vfs_path_to_string (path=0x0,
    buffer=0x778e3a13
"/home/ori/coding/testing_root/share/applications/mimeinfo.cache",
bufsize=4097, error=0x0) at thunar-vfs-path.c:657
#1  0x6ffb1df9 in thunar_vfs_mime_database_store_parse_file 
(database=0x8113820, path=0x0, table=0x82774e0)
    at thunar-vfs-mime-database.c:813
#2  0x6ffb1a5f in thunar_vfs_mime_database_initialize_stores 
(database=0x8113820)
    at thunar-vfs-mime-database.c:685
#3  0x6ffb2cb0 in IA__thunar_vfs_mime_database_get_applications 
(database=0x8113820, info=0x82783a8)
    at thunar-vfs-mime-database.c:1320
#4  0x0807675a in thunar_file_list_get_applications (file_list=0x8294940) at 
thunar-file.c:2114
#5  0x0807df06 in thunar_launcher_update (launcher=0x8113860) at 
thunar-launcher.c:797
#6  0x0807d36b in thunar_launcher_set_selected_files (component=0x8113860, 
selected_files=0x82b3a60)
    at thunar-launcher.c:407
#7  0x0806da5e in thunar_component_set_selected_files (component=0x8113860, 
selected_files=0x82b3a60)
    at thunar-component.c:140
#8  0x0807d1ec in thunar_launcher_set_property (object=0x8113860, prop_id=2, 
value=0x778e4c98, pspec=0x8114f40)
    at thunar-launcher.c:336
#9  0x6f690e9c in g_object_set_property () from /usr/lib/libgobject-2.0.so.0
#10 0x0000000b in ?? ()
#11 0x0000000c in ?? ()
#12 0x778e4c58 in ?? ()
#13 0x6f5e9644 in g_list_free () from /usr/lib/libglib-2.0.so.0
#14 0x0000000c in ?? ()
#15 0x778e4c98 in ?? ()
#16 0x08113868 in ?? ()
#17 0x0814a9b0 in ?? ()
#18 0x08281b40 in ?? ()
#19 0x0805a698 in [EMAIL PROTECTED] ()
#20 0x00000000 in ?? ()

the source snippet it crashes on, in thunar-vfs-path.c:657:
652       g_return_val_if_fail (buffer != NULL, -1);
653       g_return_val_if_fail (bufsize > 0, -1);
654       g_return_val_if_fail (error == NULL || *error == NULL, -1);
655
656       /* the root element is a special case to ease the processing */
         Path is NULL in this test, and so Thunar crashes.
657       if (G_UNLIKELY (path->parent == NULL))
658         {
659           if (G_UNLIKELY (bufsize < 2))
660             goto error;
661           buffer[0] = G_DIR_SEPARATOR;

the source snippet where the calls that trigger this are
is in thunar-vfs-mime-database.c:685, which is:

thunar_vfs_mime_database_store_parse_file (database, store->defaults_list_path,
                                           store->defaults_list);

the value of "path" is "applications/defaults.list"
the value of "store->default_lists_path" is NULL
the value of "basedirs[n]" is "" (an empty but non-NULL string)

for this, I set XDG_DATA_DIRS="/home/ori/coding/testing_root/share/:" which
does exist. setting it to "/home/ori/coding/testing_root/share/" or unsetting it
fixes the crash.
_______________________________________________
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to