Bug 198970 - GTK File Picker SIGSEGV
Summary: GTK File Picker SIGSEGV
Status: RESOLVED WORKSFORME
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-05 04:27 UTC by tnorris
Modified: 2014-08-06 22:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tnorris 2009-07-05 04:27:02 UTC
Version:            (using KDE 4.2.90)
OS:                Linux
Installed from:    Ubuntu Packages

Ever since I upgraded to KDE 4.2.90 any application that uses the GTK File Picker (e.g. Firefox, Thunderbird, Lotus Notes, etc.) crash when I bring up the file picker.

I recently upgraded to 4.3 RC1 and the problem persists.

By running FF from the command line and reproducing the problem I can see that the crash is caused by segmentation fault. Unfortunately, I don't have a FF installed with debugging symbols so I can't easily give a stack trace.

After some testing, I determined that the File Picker only crashes when I navigate to a directory that has an Open Office document of any kind in it.

The only unique thing I know of that I've done with OO is to change all the mime icons to ones of my choice (via the newly available button in file type properties).

I waited to report this problem in hopes it would go away in RC1, but it has not.
Comment 1 FiNeX 2009-07-05 11:23:00 UTC
What does it happen if you switch to another desktop enviroment?
Comment 2 tnorris 2009-07-05 18:08:17 UTC
I don't have another environment installed. I hate to install the whole gnome-desktop environment on Kubuntu just to test this bug...Is there a simpler solution?
Comment 3 FiNeX 2009-07-05 20:24:39 UTC
You could try to install firefox with debug symbols... anyway it could be related to anything on your system, some updated libraries outside kde or a memory problem.
Comment 4 Dario Andres 2009-07-05 22:40:57 UTC
I wonder if this could be related to bug 196207: the KDE init script is setting a malloc check variable to a value that will force the applications (gtk/glib, and some others) to exit/crash on some errors/situations.
Comment 5 tnorris 2009-07-06 07:27:27 UTC
I went ahead and installed the debug version of libglib to at least get some symbols since I could see most of the call stack was in libglib and I didn't have to install a million other debug packages to get it to work. Here's a stack trace mostly filled in. Unfortunately, the very last call is still missing but it's more information than I had before:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xafb9cb90 (LWP 16297)]
0xffe9e8e8 in ?? ()
(gdb) where
#0  0xffe9e8e8 in ?? ()
#1  0xb64f5d9d in g_local_file_enumerator_next_file (enumerator=0xb621998,
    cancellable=0xb5c6648, error=0xafb9c2c8)
    at /build/buildd/glib2.0-2.20.1/gio/glocalfileenumerator.c:343
#2  0xb64ce8b2 in next_files_thread (res=0xb5bfd50, object=0xb621998,
    cancellable=0xb5c6648)
    at /build/buildd/glib2.0-2.20.1/gio/gfileenumerator.c:641
#3  0xb64e22f9 in run_in_thread (job=0xb837e20, c=0xb5c6648, _data=0xb837ad8)
    at /build/buildd/glib2.0-2.20.1/gio/gsimpleasyncresult.c:656
#4  0xb64db204 in io_job_thread (data=0xb837e20, user_data=0x0)
    at /build/buildd/glib2.0-2.20.1/gio/gioscheduler.c:179
#5  0xb6afae26 in g_thread_pool_thread_proxy (data=0xb5bf700)
    at /build/buildd/glib2.0-2.20.1/glib/gthreadpool.c:265
#6  0xb6af97bf in g_thread_create_proxy (data=0xb5c3078)
    at /build/buildd/glib2.0-2.20.1/glib/gthread.c:635
#7  0xb7f094ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb7d5b49e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) q

Based on skimming that other bug report, they don't look like the same bug to me but I'll spend some more time making sure.
Comment 6 tnorris 2009-07-06 07:30:52 UTC
I went ahead and installed the debug version of libglib to at least get some symbols since I could see most of the call stack was in libglib and I didn't have to install a million other debug packages to get it to work. Here's a stack trace mostly filled in. Unfortunately, the very last call is still missing but it's more information than I had before:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xafb9cb90 (LWP 16297)]
0xffe9e8e8 in ?? ()
(gdb) where
#0  0xffe9e8e8 in ?? ()
#1  0xb64f5d9d in g_local_file_enumerator_next_file (enumerator=0xb621998,
    cancellable=0xb5c6648, error=0xafb9c2c8)
    at /build/buildd/glib2.0-2.20.1/gio/glocalfileenumerator.c:343
#2  0xb64ce8b2 in next_files_thread (res=0xb5bfd50, object=0xb621998,
    cancellable=0xb5c6648)
    at /build/buildd/glib2.0-2.20.1/gio/gfileenumerator.c:641
#3  0xb64e22f9 in run_in_thread (job=0xb837e20, c=0xb5c6648, _data=0xb837ad8)
    at /build/buildd/glib2.0-2.20.1/gio/gsimpleasyncresult.c:656
#4  0xb64db204 in io_job_thread (data=0xb837e20, user_data=0x0)
    at /build/buildd/glib2.0-2.20.1/gio/gioscheduler.c:179
#5  0xb6afae26 in g_thread_pool_thread_proxy (data=0xb5bf700)
    at /build/buildd/glib2.0-2.20.1/glib/gthreadpool.c:265
#6  0xb6af97bf in g_thread_create_proxy (data=0xb5c3078)
    at /build/buildd/glib2.0-2.20.1/glib/gthread.c:635
#7  0xb7f094ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb7d5b49e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) q

Based on skimming that other bug report, they don't look like the same bug to me but I'll spend some more time making sure.
Comment 7 tnorris 2009-07-06 07:33:39 UTC
Ugh, sorry for the double post...
Comment 8 tnorris 2009-07-06 08:06:59 UTC
I tested out the workaround suggested in bug 196207 and there was no change in behavior. FF still crashed when I brought up the GTK File Picker. I changed MALLOC_CHECK to 1 in startkde and logged out/in.

tnorris@tnorris-laptop:~$ env | grep MALLOC
MALLOC_CHECK_=1
Comment 9 Dario Andres 2009-07-07 20:54:31 UTC
You could try installing a small window manager like IceWM just to start a session and try to run Firefox and check the bug (so you don't have to install the gnomes packages if you don't want to).
Comment 10 tnorris 2009-07-08 08:03:00 UTC
I installed IceWM and tried FF in it and it still crashed. It would seem that would imply KDE isn't the issue BUT, I also found the two links below that seem to be somewhat related to this issue (maybe?). I'd be interested to see what anyone else's XDG_DATA_DIRS variable is set to if they aren't having this problem. In particular, the pastebin link looks almost exactly like the problem I have with a strikingly similar call stack. I did try several modifications to the XDG_DATA_DIRS variable but none of them seemed to have any effect.

http://de.pastebin.ca/1487098
http://markmail.org/message/yea5vczxeep53s2f#query:+page:1+mid:yea5vczxeep53s2f+state:results

I'm really at a loss at this point for what's causing the problem much less how to fix it.

It does seem to me that it can't be a coincidence that the OO icons are the only ones I overrode from the default after installing 4.2.95, and the file picker only crashes when I navigate to a directories with OO files in them.
Comment 11 tnorris 2009-07-08 08:38:08 UTC
OK, I tracked the problem down. It was indeed the setting of the custom OO icons via the KDE File Type Properties (the wrench icon) that was added in KDE 4.2.95. To "resolve" the issue I deleted all the XML documents from ~/.local/share/mime/packages and did an update-mime-database. The GTK File Picker now works normally, but the obvious problem is I'm stuck w/ the OO icons I didn't want. Perhaps someone else can try setting custom OO icons and see if you can reproduce the problem?
Comment 12 FiNeX 2009-07-08 11:20:20 UTC
I've tried to change icons to the MIME types related to OpenOffice (writer) but OpenOffice doesn't crash. Strange bug...
Comment 13 tnorris 2009-07-09 03:02:35 UTC
(In reply to comment #12)
> I've tried to change icons to the MIME types related to OpenOffice (writer) but
> OpenOffice doesn't crash. Strange bug...

For clarification, it's not OO that crashes, it's the app that opens the GTK File Picker dialog (e.g. Firefox when ui.allow_platform_file_picker is set to true or any other app that uses the GTK File Picker) that crashes. Are you saying that you didn't get that crash or did you try something else?
Comment 14 FiNeX 2009-07-09 10:14:28 UTC
I've done the following steps:
1) changed the MIME icon (from dolphin) of .odt
2) opened an .odt file (with one click on it), OO started and opened the file
3) opened the gtk file chooser dialog from OO (file -> open)
4) selected and opened another .odt file
5) closed OO

And I've got no crashes.

I'm using:
  KDE from trunk r992584
  Qt 4.5.2
  xorg-server 1.6.1
  OpenOffice.org 3.1
  libgnome 2.26
  libgnomeui 2.24
  linux kernel 2.6.30
Comment 15 tnorris 2009-07-09 16:56:34 UTC
(In reply to comment #14)
> I've done the following steps:
> 1) changed the MIME icon (from dolphin) of .odt
> 2) opened an .odt file (with one click on it), OO started and opened the file
> 3) opened the gtk file chooser dialog from OO (file -> open)
> 4) selected and opened another .odt file
> 5) closed OO
> 
> And I've got no crashes.
> 
> I'm using:
>   KDE from trunk r992584
>   Qt 4.5.2
>   xorg-server 1.6.1
>   OpenOffice.org 3.1
>   libgnome 2.26
>   libgnomeui 2.24
>   linux kernel 2.6.30

At least in my case, OO uses a KDE File Open dialog, not a GTK one. The easiest way to get a GTK File Open dialog is the way I mentioned previously (with FF).
Comment 16 Sordon 2009-09-08 19:34:28 UTC
I'm having the same problem. After following the advice in comment #11 I'm now able again to open directories that contain OpenOffice documents. The same effect was also true for GIMP and Inkscape on my machine.
I'm currently using KDE 4.3.1. and GTK 2.0 in version 2.16.6-1 from Debian Sid
Comment 17 tnorris 2009-09-08 19:59:54 UTC
FYI, I was able to eventually get custom icons for OO that don't trigger a crash in the GTK File Picker by not setting the icon via the KDE GUI and doing it manually instead.

That is to say, I just set the png image names I want to be the icons to match the mime-type (e.g. application-vnd.oasis.opendocument.chart.png) in /usr/share/icons/oxygen and then do "xdg-icon-resource forceupdate --mode system". I ultimately put it all in a script that I run after each oxygen update since it blows away my icons each time.

It seems to be that setting them via the KDE GUI causes the problem, but I can't for the life of me figure out why.