! 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 segfaults immediately after startup...
Status:
CLOSED: FIXED
Priority:
Very High
Severity:
blocker

Comments

Description Will L G 2007-01-08 15:13:28 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux alpha; en-US; rv:1.8.0.6) Gecko/20060818 Firefox/1.5.0.6
Build Identifier: 

Thunar immediately crashes after being started up... This also happened with previous versions as well...

Reproducible: Always

Steps to Reproduce:
1.Open Xterm
2.type 'thunar'
3.press enter and waiting for 'segmentatation fault'

Actual Results:  
*same as above

Expected Results:  
To fire up and see pretty icons all over the place.

Kernel-2.6.13.1
GTK-2.6.10
GLIB-2.6.6
EXO-0.3.1.12rc2
LIBEXO-r22927
XFCE-4.2.3.1

GNU DDD 3.3.11 (alphapca56-alpha-linux-gnu), by Dorothea Lütkehaus and Andreas Zeller.
Copyright © 1995-1999 Technische Universität Braunschweig, Germany.
Copyright © 1999-2001 Universität Passau, Germany.
Copyright © 2001 Universität des Saarlandes, Germany.
Copyright © 2001-2004 Free Software Foundation, Inc.
(gdb) set can-use-hw-watchpoints 0
(gdb) set can-use-hw-watchpoints 1
(gdb) set write on
(gdb) set follow-fork-mode parent
(gdb) set write off
(gdb) set follow-fork-mode child
(gdb) set follow-fork-mode parent
(gdb) file thunar
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 20332)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 20332)]
0x0000020000951234 in g_type_fundamental () from /usr/lib/libgobject-2.0.so.0
(gdb) bt
#0  0x0000020000951234 in g_type_fundamental () from /usr/lib/libgobject-2.0.so.0
#1  0x0000020000931f6c in g_object_new () from /usr/lib/libgobject-2.0.so.0
#2  0x00000001200864b0 in thunar_window_init (window=0x1201339b0) at thunar-window.c:1641
#3  0x0000020000958928 in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#4  0x000002000093086c in g_object_thaw_notify () from /usr/lib/libgobject-2.0.so.0
#5  0x0000020000930f88 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#6  0x00000200009322bc in g_object_new () from /usr/lib/libgobject-2.0.so.0
#7  0x000000012001a118 in thunar_application_open_window (application=0x12011c090, directory=0x120120ae0, screen=0x1200ee110) at thunar-application.c:462
#8  0x000000012002fb1c in thunar_file_launch (file=0x120120ae0, parent=Variable "parent" is not available.
) at thunar-file.c:885
#9  0x000000012001977c in thunar_application_process_filenames (application=Variable "application" is not available.
) at thunar-application.c:855
#10 0x00000001200175dc in main (argc=1, argv=0x11fb1f6c8) at main.c:212
(gdb) 
#0  0x0000020000951234 in g_type_fundamental () from /usr/lib/libgobject-2.0.so.0
#1  0x0000020000931f6c in g_object_new () from /usr/lib/libgobject-2.0.so.0
#2  0x00000001200864b0 in thunar_window_init (window=0x1201339b0) at thunar-window.c:1641
#3  0x0000020000958928 in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#4  0x000002000093086c in g_object_thaw_notify () from /usr/lib/libgobject-2.0.so.0
#5  0x0000020000930f88 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#6  0x00000200009322bc in g_object_new () from /usr/lib/libgobject-2.0.so.0
#7  0x000000012001a118 in thunar_application_open_window (application=0x12011c090, directory=0x120120ae0, screen=0x1200ee110) at thunar-application.c:462
#8  0x000000012002fb1c in thunar_file_launch (file=0x120120ae0, parent=Variable "parent" is not available.
) at thunar-file.c:885
#9  0x000000012001977c in thunar_application_process_filenames (application=Variable "application" is not available.
) at thunar-application.c:855
#10 0x00000001200175dc in main (argc=1, argv=0x11fb1f6c8) at main.c:212
(gdb) quit
Comment 1 Will L G 2007-01-08 15:15:12 CET
Created attachment 931 
Complete Debugging

More thorough debugging...
Comment 2 Benedikt Meurer editbugs 2007-01-08 16:09:41 CET
Aye, looks familar, you already filed bug #1969 and bug #2155, and disappeared for a while. ;-)

But this time I'm pretty sure, I know what's wrong. Build and run this little test program and post the output here:

---< test.c >---
#include <glib-object.h>
int main() {
  g_print ("GType=%u\n", (guint) sizeof (GType));
  g_print ("gint=%u\n", (guint) sizeof (gint));
  return 0;
}
----------------

Build with: cc -o test test.c `pkg-config --cflags --libs gobject-2.0`

I'd suspect this can be fixed in Thunar. Nevertheless, GObject shouldn't crash, but should print a warning or similar. I'd suggest to also file a bug report to GObject.
Comment 3 Will L G 2007-01-08 16:57:32 CET
Yea long time no see, got busy at work and started putting everything on the back burner... The test program compiled fine with no warnings or anything:

[root@jericho coding]# gcc -o test test.c `pkg-config --cflags --libs gobject-2.0`
[root@jericho coding]# ls
test*  test.c
[root@jericho coding]# ./test 
GType=8
gint=4
[root@jericho coding]# 
Comment 4 Will L G 2007-01-10 21:39:04 CET
I was wondering, does it still look like it may be an issue with GTK/GLIB? This is the only program that's having this problem... Oh, also wanted to note... I'm sporting Gnome-2.8.3 and not the latest greatest release.
Comment 5 Benedikt Meurer editbugs 2007-01-10 21:44:12 CET
It's a bug in Thunar. Thunar tries to store a GType into a gint, loosing 4 bytes of information. I'll try to come up with a fix.

Nevertheless, GLib shouldn't crash because of this, but warn the user/developer. So, to say, it's also a bug in GLib.
Comment 6 Will L G 2007-01-11 05:25:52 CET
Just submitted the bug to GTK.ORG, have to take a wait and see attitude and see what they say... 
Comment 7 Benedikt Meurer editbugs 2007-01-11 11:45:03 CET
Created attachment 935 
Possible fix

Please try this patch.
Comment 8 Will L G 2007-01-12 00:21:34 CET
Recieved the error:
[root@jericho Thunar-0.5.0rc2]# patch -p0 < gtype_gint.patch 
patching file thunar/thunar-window.c
Hunk #1 succeeded at 1 with fuzz 2.
Hunk #3 FAILED at 655.
1 out of 5 hunks FAILED -- saving rejects to file thunar/thunar-window.c.rej
[root@jericho Thunar-0.5.0rc2]# 

modified the patch a little, to correspond to my version of thunar-window.c, built, and everything appears to run like a top [except the icon/detailed/compact views ;-)

Comment 9 Benedikt Meurer editbugs 2007-01-12 00:23:23 CET
So, you don't see any crashes switching between the different views and starting with different views?
Comment 10 Will L G 2007-01-12 00:50:54 CET
Na, no crashes or anything, it appears to be working fine. I've been playing around with most of the settings and haven't come across anything other than the display issue where everything is displayed in 'icon mode'.

I'm going to go ahead and file another bug report for the 'display' issue... I like the speed of this file manger and just wanted to tell everyone THANKS!
Comment 11 Benedikt Meurer editbugs 2007-01-12 09:29:27 CET
Committed with revision 24366.

2007-01-12	Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-window.c: Finally fix crash on platforms where
	  sizeof(GType) != sizeof(gint). Bug #2726.

Comment 12 Will L G 2007-01-16 03:53:24 CET
Here's the new error I get:

ccache gcc-4.0.1 -ggdb -O3 -w -pipe -mieee -mtune=pca56 -Wl,-lots -Wl,--as-needed -o tdbtool tdbtool.o  ./.libs/libtdb.a
make[2]: Leaving directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk/tdb'
Making all in thunarx
make[2]: Entering directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk/thunarx'
make  all-am
make[3]: Entering directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk/thunarx'
make[3]: *** No rule to make target `thunarx-aliasdef.c', needed by `libthunarx_1_la-thunarx-aliasdef.lo'.  Stop.
make[3]: Leaving directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk/thunarx'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk/thunarx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr2/www/pub/alpha-RH7/desktop/xfce-4/xfce-4.4/source/trunk'
make: *** [all] Error 2
Comment 13 Benedikt Meurer editbugs 2007-01-16 07:34:54 CET
Don't reopen unrelated bug reports. The compile error has nothing to do with the segfault. You get this error because you are compiling from a SVN sandbox and forgot to pass --enable-maintainer-mode to autogen.sh.

Bug #2726

Reported by:
Will L G
Reported on: 2007-01-08
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.5.0rc2

Attachments

Complete Debugging (97.13 KB, application/octet-stream)
2007-01-08 15:15 CET , Will L G
no flags
Possible fix (4.27 KB, patch)
2007-01-11 11:45 CET , Benedikt Meurer
no flags

Additional information