Bug 244530

Summary: firefox crashes in save file dialog: create_file_info
Product: [Fedora] Fedora Reporter: Sami Farin <hvtaifwkbgefbaei>
Component: gtk2Assignee: Matthias Clasen <mclasen>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 9CC: adebened, lex.lists
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 16:00:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sami Farin 2007-06-16 18:40:49 UTC
Description of problem:
gtk2-2.11.2 worked, but 2.11.3 crashes when I try to save something in Firefox.

Version-Release number of selected component (if applicable):
2.11.3-1

How reproducible:
always

Steps to Reproduce:
1. start firefox
2. press ctrl-s
3.
  
Actual results:
segfault

Expected results:
save dialog

Additional info:
***MEMORY-WARNING***: firefox-bin[24670]: GSlice: g_thread_init() must be called
before all other GLib functions; memory corruption due to late invocation of
g_thread_init() has been detected; this program is likely to crash, leak or
unexpectedly abort soon...
[New Thread -1230161008 (LWP 24736)]
[New Thread -1257743472 (LWP 24752)]
[New Thread -1268233328 (LWP 24753)]
[New Thread -1278723184 (LWP 24754)]

** (Gecko:24670): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (Gecko:24670): WARNING **: IOR not set.

** (Gecko:24670): WARNING **: Could not locate registry
[New Thread -1289360496 (LWP 24766)]
[New Thread -1299850352 (LWP 24767)]
[New Thread -1311769712 (LWP 24777)]
[New Thread -1322259568 (LWP 24778)]
[New Thread -1332749424 (LWP 24779)]
[Thread -1322259568 (LWP 24778) exited]
[Thread -1332749424 (LWP 24779) exited]
[New Thread -1332749424 (LWP 24823)]
I/O error : Permission denied
I/O error : Permission denied

(Gecko:24670): Gtk-CRITICAL **: gtk_file_system_filename_to_path: assertion
`filename != NULL' failed

(Gecko:24670): Gtk-CRITICAL **: gtk_file_system_path_is_local: assertion `path
!= NULL' failed

(Gecko:24670): Gtk-CRITICAL **: gtk_file_system_path_is_local: assertion `path
!= NULL' failed

(Gecko:24670): Gtk-CRITICAL **: gtk_file_system_path_is_local: assertion `path
!= NULL' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209177888 (LWP 24670)]
0x00a4d7f8 in strcmp () from /lib/libc.so.6
(gdb) bt
#0  0x00a4d7f8 in strcmp () from /lib/libc.so.6
#1  0x00818622 in create_file_info (folder_unix=0x0, 
    filename=0x9e9efa8 "/home/mozflash/youtube", basename=0x9e9ee00 "youtube", 
    types=<value optimized out>, statbuf=0xbfceb1f4, mime_type=0x0)
    at gtkfilesystemunix.c:1609
#2  0x0081a462 in gtk_file_system_unix_get_info (file_system=0x943d000,
path=0x9e9efa8, 
    types=<value optimized out>, callback=0x658f17 <get_file_info_finished>,
data=0x9e4b050)
    at gtkfilesystemunix.c:842
#3  0x006764d6 in gtk_file_system_get_info (file_system=0x943d000,
path=0x9e9efa8, types=69, 
    callback=0x658f17 <get_file_info_finished>, data=0x9e4b050) at
gtkfilesystem.c:476
#4  0x00658976 in shortcuts_insert_path (impl=0x9dd9098, pos=7, 
    shortcut_type=<value optimized out>, volume=0x0, path=0x9e12448, label=0x0,
removable=0, 
    type=SHORTCUTS_CURRENT_FOLDER) at gtkfilechooserdefault.c:1777
#5  0x0065c171 in update_current_folder_get_info_cb (handle=0x9e0c600,
info=0x9e9b280, 
    error=0x0, user_data=0x9e9b240) at gtkfilechooserdefault.c:2316
#6  0x008199e9 in execute_callbacks (data=0x943d000) at gtkfilesystemunix.c:525
#7  0x001540cf in gdk_threads_dispatch (data=0x98dc090) at gdk.c:470
#8  0x41c513f6 in g_idle_dispatch () from /lib/libglib-2.0.so.0
#9  0x41cd93bc in __cxa_pure_virtual () from /lib/libglib-2.0.so.0
#10 0x00cb4760 in ?? () from /lib/libpthread.so.0
#11 0x09cd7670 in ?? ()
#12 0xbfceb3f4 in ?? ()
#13 0x00cb4770 in pthread_mutex_unlock () from /lib/libpthread.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

Comment 1 Sami Farin 2007-06-17 08:10:29 UTC
Checking for NULL in these two places and I can save a file in firefox...

I do not know is this the "correct" fix (I do not get money for wasting
extra hours to verify it), but seems to work for me,
and I did not create an attachment on purpose for this patch.

--- gtk+-2.11.3/gtk/gtkfilesystemunix.c.bak     2007-06-15 21:07:36.000000000 +0300
+++ gtk+-2.11.3/gtk/gtkfilesystemunix.c 2007-06-17 11:02:27.152235051 +0300
@@ -1601,12 +1601,15 @@ gtk_file_system_unix_filename_to_path (G
 static const char *
 get_icon_name_for_directory (const char *path)
 {
+  char *special;
+
   if (!g_get_home_dir ())
     return "gnome-fs-directory";
 
+  special = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
   if (strcmp (g_get_home_dir (), path) == 0)
     return "gnome-fs-home";
-  else if (strcmp (g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP), path) == 0)
+  else if (special && strcmp (special, path) == 0)
     return "gnome-fs-desktop";
   else
     return "gnome-fs-directory";
@@ -2290,7 +2293,7 @@ create_file_info (GtkFileFolderUnix *fol
   if (types & GTK_FILE_INFO_SIZE)
     gtk_file_info_set_size (info, (gint64) statbuf->st_size);
 
-  if (types & GTK_FILE_INFO_ICON)
+  if ((types & GTK_FILE_INFO_ICON) && folder_unix)
     {
       IconType icon_type;
       gboolean free_icon_name = FALSE;


Comment 2 Andrew D. 2008-02-07 17:25:25 UTC
I've been having the Firefox crash problem for a while. Usually (though not
always) when I try to save something from Firefox. I dont know if it is directly
related to the problem posted here. It seems to have gotten worse lately. I ran
it from a terminal window once and had it crash so I was able to do an echo $?
which returned 139. Anyway, the problem is fairly serious since it makes WEB
browsing unreliable which is a problem if you are paying bills or doing any
other transactions. A good description of the problem, along with some
information on what may be causing it can be found here (The subject line says
SeaMonkey but most of the posts are regarding Firefox on CentOS/RHEL 5.1):

http://grokbase.com/topic/2008/01/08/centos-probably-ot-has-anyone-else-seen-seamonkey-pop-without-warning/tDWRIeknQLrTmOfXX3pYvNIKIV4

and some more info can be found here:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=11589&forum=38&post_id=41367#forumpost41367



Comment 3 Bug Zapper 2008-05-14 02:59:34 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 lexual 2009-02-25 11:41:12 UTC
Can anyone reproduce on a later Fedora version.

I just hit Ctrl + s, and successfully saved a file.

Does it happen every time, or intermittently.

Comment 5 Sami Farin 2009-02-25 11:56:16 UTC
In January 2009 I got segfault in AppendUTF16toUTF8 when saving a file, but not anymore.

However, now I get 20 MB memory leak every time I save a file (or just press ESC after the filename prompt dialog).  I may make another bugreport about that..

Comment 6 Bug Zapper 2009-06-09 22:39:28 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2009-07-14 16:00:39 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.