After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 359487 - update to latest xdgmime breaks gnome-vfs - I think
update to latest xdgmime breaks gnome-vfs - I think
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.16.x
Other All
: Normal critical
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 359488 403978 404181 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-04 03:42 UTC by Hans Nieser
Modified: 2007-02-07 08:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Fix crash on FreeBSD (1.20 KB, patch)
2006-10-07 22:25 UTC, Joe Marcus Clarke
none Details | Review

Description Hans Nieser 2006-10-04 03:42:00 UTC
Steps to reproduce:
1. Launch any application that uses gnome-vfs
2. Watch it segfault, or
3. Try opening a file with open file dialog, and watch it segfault


Stack trace:
(gdb) bt
  • #0 _gtk_xdg_alias_list_lookup
    at xdgmimealias.c line 105
  • #1 _xdg_mime_unalias_mime_type
    at xdgmime.c line 634
  • #2 _gnome_vfs_xdg_unalias_mime_type
    at xdgmime.c line 645
  • #3 get_entry
    at gnome-vfs-mime-info.c line 478
  • #4 gnome_vfs_mime_get_value
    at gnome-vfs-mime-info.c line 545
  • #5 gnome_vfs_mime_get_description
    at gnome-vfs-mime-handlers.c line 83
  • #6 _gedit_tab_get_tooltips
    at gedit-tab.c line 1578
  • #7 sync_name
    at gedit-notebook.c line 731
  • #8 gedit_notebook_add_tab
    at gedit-notebook.c line 917
  • #9 gedit_window_create_tab
    at gedit-window.c line 3231
  • #10 main
    at gedit.c line 549

Other information:
This problem is happening to me running gnome 2.16 on FreeBSD 6.2-PRERELEASE (stable branch) with gnome-vfs-2.16.1 specifically.

I spent some time digging through the code to see what was going wrong, and I think this is what's happened:

The new xdgmime code removed several calls to xdg_mime_init() from xdgmime.c, and from what I can figure out, gnome-vfs used to rely on these calls so that the alias_list global was initialised. Since it is now left uninitialised, gnome-vfs segfaults as soon as xdg_mime_unalias_mime_type is called from get_entry (gnome-vfs-mime-info.c:478).

I'm afraid that I am not familiar enough with the code to come up with a patch (I don't even know if my conclusion is correct), sorry
Comment 1 Tim 2006-10-04 18:54:26 UTC
I can confirm this problem. I am also running gnome 2.16 on FreeBSD 6.2-Prerelease. 

Reverting gnome-vfs-2.16.1 back to 2.16.0 fixes the problem. 
Comment 2 demonbob 2006-10-04 19:22:29 UTC
I can confirm this also.

$ uname -a
FreeBSD syslaptop 6.1-RELEASE-p7 FreeBSD 6.1-RELEASE-p7 #0: Fri Sep 22 12:41:09 CDT 2006     DemonBob@syslaptop:/usr/obj/usr/src/sys/SYSLAPTOP  i386

When i converted back to 2.16.0 everything went back to normal. 
Comment 3 Paolo Borelli 2006-10-07 12:57:15 UTC
*** Bug 359488 has been marked as a duplicate of this bug. ***
Comment 4 Joe Marcus Clarke 2006-10-07 22:25:32 UTC
Created attachment 74253 [details] [review]
Fix crash on FreeBSD

The problem is a symbol conflict between gnome-vfs and gtk+.  If the private _xdg_mime functions are protected with XDG_PREFIX, then this problem will go away.  This should be merged upstream into xdgmime as well.
Comment 5 Andreas Liebe 2006-12-14 11:29:29 UTC
The above patch for FreeBSD does fix the issue on Sun Solaris 2.8 + 2.9/SPARC as well.
Comment 6 Roy Marples 2007-01-31 10:23:44 UTC
What's the status of this as it's holding up GNOME adoption on Gentoo/FreeBSD?
Is there anything I can do to help?
Comment 7 palfrey 2007-02-04 14:00:53 UTC
*** Bug 403978 has been marked as a duplicate of this bug. ***
Comment 8 palfrey 2007-02-04 14:00:59 UTC
*** Bug 404181 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Larsson 2007-02-07 08:40:44 UTC
Commited. Thanks.