GNOME Bugzilla – Bug 114425
Won't start the first time you execute it
Last modified: 2007-12-02 14:35:00 UTC
If you start gtetrinet on a new user account, which has never run gtetrinet before, gtetrinet will fail to run. The second time you try it will work normally. I guess it's some gconf initialization issue, but I know little more. It's quite easy to reproduce, though. Filing just to have it documented...
Thom May told me that for him, gtetrinet is doing even weirder stuff. Every time he reboots, the first time he starts gtetrient he must do under strace. If he doesn't, it just doesn't start. Thom suggested there might be some race somewhere that strace solves by running slower. I still think it's some gconf-related thing, but not the init of gnome-settings-daemon, as Thom runs a complete GNOME desktop and the daemon is already running when he starts gtetrinet.
Maybe it's an uninitialized variable. GDB, for example, always initializes an integer variable to zero, I've been hit with this kind of bug quite a few times. It's annoying when an app does work when running under gdb, and doesn't when running alone, and I always end up finding an uninitialized variable in those apps. I don't know if strace works in the same way though.
Same problem on 2 machines here: $ gtetrinet (gtetrinet:4886): GConf-CRITICAL **: gconf_value_new: assertion `GCONF_VALUE_TYPE_VALID(type)' failed GConf-ERROR **: file gconf-value.c: line 767 (gconf_value_copy): should not be reached aborting...
(gdb) run Starting program: /home/lool/g/gtetrinet-0.7.10/src/gtetrinet Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1223857952 (LWP 17259)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 81022
Thread NaN (LWP 17259)
The problematic handling is when the GConf key /apps/gtetrinet/themes/theme_dir isn't set. "gconftool-2 -u /apps/gtetrinet/themes/theme_dir" should be enough to reproduce the bug. More complete bt: (gdb) bt
+ Trace 81038
Don't look at the backtraces; I stripped theme.cfg down to: [T] Name=G Author=Z Description=D and got: *** glibc detected *** malloc(): memory corruption (fast): 0x080cbae8 *** instead of a segfault, but at the same place. This presumably shows that a previous libgnome call is overwriting some stuff it shouldn't be overwriting.
Hmm, I thought glibc would protect against double free()s, so I didn't thought it was useful to report the one I saw here: ==31651== Invalid free() / delete / delete[] ==31651== at 0x401CFA5: free (vg_replace_malloc.c:233) ==31651== by 0x4A61B30: g_free (in /usr/lib/libglib-2.0.so.0.1200.4) ==31651== by 0x8050408: config_loadconfig (config.c:202) ==31651== by 0x8058BCB: main (gtetrinet.c:222) ==31651== Address 0x511E2A0 is 0 bytes inside a block of size 1 free'd ==31651== at 0x401CFA5: free (vg_replace_malloc.c:233) ==31651== by 0x4A61B30: g_free (in /usr/lib/libglib-2.0.so.0.1200.4) ==31651== by 0x80503A8: config_loadconfig (config.c:196) ==31651== by 0x8058BCB: main (gtetrinet.c:222) But it was the bug, patch coming.
Created attachment 75845 [details] [review] Fixes double free() which causes a crash on first start, when theme_dir isn't set
*** Bug 156780 has been marked as a duplicate of this bug. ***
*** Bug 311552 has been marked as a duplicate of this bug. ***
*** Bug 352478 has been marked as a duplicate of this bug. ***
*** Bug 361961 has been marked as a duplicate of this bug. ***
Fixed in HEAD, will appear in 0.7.11.
*** Bug 378682 has been marked as a duplicate of this bug. ***
*** Bug 379741 has been marked as a duplicate of this bug. ***
*** Bug 380109 has been marked as a duplicate of this bug. ***
*** Bug 380307 has been marked as a duplicate of this bug. ***
*** Bug 380472 has been marked as a duplicate of this bug. ***
*** Bug 380576 has been marked as a duplicate of this bug. ***
*** Bug 381245 has been marked as a duplicate of this bug. ***
*** Bug 382134 has been marked as a duplicate of this bug. ***
*** Bug 386020 has been marked as a duplicate of this bug. ***
*** Bug 388564 has been marked as a duplicate of this bug. ***
*** Bug 388810 has been marked as a duplicate of this bug. ***
*** Bug 397484 has been marked as a duplicate of this bug. ***
*** Bug 396756 has been marked as a duplicate of this bug. ***
*** Bug 396545 has been marked as a duplicate of this bug. ***
*** Bug 396318 has been marked as a duplicate of this bug. ***
*** Bug 396204 has been marked as a duplicate of this bug. ***
*** Bug 395980 has been marked as a duplicate of this bug. ***
*** Bug 395826 has been marked as a duplicate of this bug. ***
*** Bug 391756 has been marked as a duplicate of this bug. ***
*** Bug 391592 has been marked as a duplicate of this bug. ***
*** Bug 390996 has been marked as a duplicate of this bug. ***
*** Bug 389825 has been marked as a duplicate of this bug. ***
*** Bug 389347 has been marked as a duplicate of this bug. ***
Added this bug report to the auto-rejecter. The auto-reject info is: "Thank you for reporting this bug. This issue has been already fixed. The fix is available in Gtetrinet 0.7.11."
*** Bug 399482 has been marked as a duplicate of this bug. ***
*** Bug 399740 has been marked as a duplicate of this bug. ***
*** Bug 399795 has been marked as a duplicate of this bug. ***
*** Bug 401136 has been marked as a duplicate of this bug. ***
*** Bug 401746 has been marked as a duplicate of this bug. ***
no new duplicates for >4 months now, removing from auto-reject list.