! 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_vfs_shutdown segfaults
Status:
CLOSED: INVALID
Product:
Thunar-vfs
Component:
General

Comments

Description Jean-François Wauthy editbugs 2006-07-06 14:46:05 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4

I'm trying to use thunar_vfs in xfburn to provide mime-type informations but thunar_vfs_shutdown segfaults at exit. I don't know if i'm doing something wrong, the only thing i do is :

mime_database = thunar_vfs_mime_database_get_default ();
mime_info = thunar_vfs_mime_database_get_info_for_file (mime_database, full_path, NULL);		
screen = gtk_widget_get_screen (GTK_WIDGET (browser));
icon_theme = gtk_icon_theme_get_for_screen (screen);
mime_icon_name = thunar_vfs_mime_info_lookup_icon_name (mime_info, icon_theme);
mime_icon = gtk_icon_theme_load_icon (icon_theme, mime_icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR, GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
		
mime_str = thunar_vfs_mime_info_get_comment (mime_info);
		
if (G_LIKELY (G_IS_OBJECT (mime_icon)))
  g_object_unref (mime_icon);
thunar_vfs_mime_info_unref (mime_info);

backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1222297936 (LWP 24567)]
0xb73afc99 in g_atomic_int_exchange_and_add () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0  0xb73afc99 in g_atomic_int_exchange_and_add ()
   from /usr/lib/libglib-2.0.so.0
#1  0xb7ec829e in IA__thunar_vfs_mime_info_unref (info=0x0)
    at thunar-vfs-mime-info.c:164
#2  0xb7ebf200 in _thunar_vfs_info_shutdown () at thunar-vfs-info.c:716
#3  0xb7ed5f8c in IA__thunar_vfs_shutdown () at thunar-vfs.c:88
#4  0x08057638 in main (argc=759583829, argv=0x6f430038) at xfburn-main.c:82


Reproducible: Always
Comment 1 Benedikt Meurer editbugs 2006-07-06 16:24:27 CEST
That sounds like _thunar_vfs_info_init() was never invoked, hence thunar_vfs_init() was never invoked. Otherwise mime_application_octet_stream would not be NULL.
Comment 2 Jean-François Wauthy editbugs 2006-07-06 16:27:49 CEST
thunar_vfs_init is invoked (but before gtk_main if it matters), you can check that in xfburn-main.c:64
Comment 3 Jean-François Wauthy editbugs 2006-07-07 07:07:03 CEST
sorry for the noise i did invoke thunar_vfs_init but before gtk_init, therefpre g_type wasn't initialized (a too small terminal doesn't let me see the error messages)
Comment 4 Benedikt Meurer editbugs 2006-07-07 13:32:55 CEST
Good to see that fixed. ;-)

Bug #1994

Reported by:
Jean-François Wauthy
Reported on: 2006-07-06
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information