GNOME Bugzilla – Bug 675628
glines segmentation fault
Last modified: 2013-06-01 18:44:29 UTC
Game seems to crash with segmentation fault. Here's relevant output from gdb. Reading symbols from /home/user/test/gnome-games-3.4.1/glines/src/glines...done. (gdb) run Starting program: /home/user/test/gnome-games-3.4.1/glines/src/glines [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 0xb6883b70 (LWP 11083)] [New Thread 0xb6082b70 (LWP 11084)] Program received signal SIGSEGV, Segmentation fault. *INT_cairo_pattern_create_for_surface (surface=0x3) at cairo-pattern.c:733 733 if (surface->status) (gdb) bt
+ Trace 230185
I've stripped the output of gdb. Backtrace is much longer and I tought it could not fit into bugzilla.
I forgot to mention: Segfault happens with Cairo 1.12.0 and 1.12.2. I did not try 1.10.2, but I think it worked when I used that version. I'm currently using Cairo 1.12.2. Other versions: GLib 2.32.2 GTK+ 3.4.3 Clutter 1.10.4 Cogl 1.10.2 GDK-Pixfbuf 2.26.1 librsvg 2.36.1 Atk 2.4.0 Pango 1.30.0 Freetype 2.4.9 Fontconfig 2.9.0 Xorg Libraries and Protocol headers - latest stable releases available from upstream (with libX11 1.5 rc1 exception). Xorg Server 1.12.1 Glibc 2.13 and Linux 3.2.17 Version of gnome-games is 3.4.1 and other gnome components are latest available from gnome upstream (exception is today's date). Segfault still happens and at the same point.
A patch has been proposed on Launchpad: https://launchpadlibrarian.net/106290229/04_fix-segfault.patch https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/995281
from LP: "I just wrote this patch to get things working again; not at all certain it's completely sane though." Also hiding in lp seems to be the info that this is specific for 32 bit. I am downloading 12.04 32bit to test
Any progress on this yet?
No, sorry. It would be helpful if someone could test on both 32 and 64 bit. Does it segfault when starting up or are there some specific actions that reproduce it?
Hm, my current system is 32 bit Linux From Scratch and I have 64 bit Debian Sid installed in Virtual Machine and as second system. I could test it. Do you need any specific information or you want to know if it does or does not run? On this 32bit system it segfaults when I try to start it.
Alright. On 32 bit LFS it still segfaults, while on Debian Sid 64 bit it does not. I'll bootstrap Debian Sid 32bit and report again.
Update: I have set up 32 bit and 64 bit Debian Sid with exactly the same packages and their versions, fully upgraded untill the moment of writing. On 64 bit Debian, glines work fine. Starting program: /usr/games/glines [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7f4442609700 (LWP 3991)] [New Thread 0x7f4441e08700 (LWP 3992)] [Thread 0x7f4441e08700 (LWP 3992) exited] [Thread 0x7f4442609700 (LWP 3991) exited] [Inferior 1 (process 3987) exited normally] (gdb) bt No stack. However, on 32 bit Debian, glines segfaultet with same error as I reported it. Starting program: /usr/games/glines [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1". [New Thread 0xb6309b70 (LWP 7887)] [New Thread 0xb59ffb70 (LWP 7888)] Program received signal SIGSEGV, Segmentation fault. INT_cairo_pattern_create_for_surface (surface=0x3) at /build/buildd-cairo_1.12.2-2-i386-1cmzkR/cairo-1.12.2/src/cairo-pattern.c:733 733 /build/buildd-cairo_1.12.2-2-i386-1cmzkR/cairo-1.12.2/src/cairo-pattern.c: No such file or directory. (gdb) bt
+ Trace 230453
There was no -dbg package that contained symbols for gnome-games and I was lazy to compile one, but this one is identical to mine that I sent in the first place. If you need anything else, just ask.
Created attachment 223129 [details] [review] This patch works for me: prevents to draw before game.
Still happens with 3.6.0.
Could I ask you to test again with 3.7.90? It has a patch that should fix the error. The game was not reset before starting it the first tine. Not resetting it meant that the preview array would contain random uninitialized memory. Instead of trying to deal with the bad data the committed patch makes it sure it is correct to begin with. Please reopen this bug if the problem is still there.
the crash can still be reproduced in ubuntu 13.04 which apparently has the 3.8.0 version: https://launchpad.net/ubuntu/+source/five-or-more this patch still applies and fixes it: https://launchpadlibrarian.net/128212634/gnome-games_1%3A3.4.1-0ubuntu2.1_1%3A3.4.1-0ubuntu2.2.diff.gz
I Installed 13.04 yesterday and tested with a version built from upstream master. It exists there so I can confirm that it is not a problem in the packaging or anything like that. I am not going to accept the patch as it only papers over the problem. We need to fix the reason that the preview is not set instead of just not drawing the piece on the board. The good news is that it can be reproduced so I should fix ready soon.
I can't confirm it anymore with ArchLinux i686 which has recent 3.8.x version of five-or-more. 2e79cd17d26da2991d3a3fa69a93a45e6fe2bdfb appears to have fixed it. I'm sorry I didn't reply earlier, I didn't have i686 system available and the error was unreproducible on x86_64.
I get the bug only on ubuntu. On unity the call to gtk_widget_show_all in activate callback leads to configure event where it will try to paint the preview. The previews are not loaded yet at that point. The fix moves the call to reset_game before the gtk_widget_show_all. This fixes the problem. https://git.gnome.org/browse/five-or-more/commit/?id=752fd6abc2a2c9e6c6fc9e23583ac0ffcfc5e6bb
Julian Taylor: I just released a fixed version 3.8.2 for you guys in ubuntu.