After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675628 - glines segmentation fault
glines segmentation fault
Status: RESOLVED FIXED
Product: five-or-more
Classification: Applications
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-07 17:30 UTC by Armin K.
Modified: 2013-06-01 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch works for me: prevents to draw before game. (553 bytes, patch)
2012-09-01 10:34 UTC, Anton Guda
none Details | Review

Description Armin K. 2012-05-07 17:30:45 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
  • #0 *INT_cairo_pattern_create_for_surface
    at cairo-pattern.c line 733
  • #1 draw_preview
    at glines.c line 445
  • #2 preview_configure_cb
    at glines.c line 1438
  • #3 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #4 g_closure_invoke
    at gclosure.c line 777

I've stripped the output of gdb. Backtrace is much longer and I tought it could not fit into bugzilla.
Comment 1 Armin K. 2012-05-13 13:12:42 UTC
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.
Comment 3 Thomas Andersen 2012-06-01 19:53:52 UTC
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
Comment 4 Armin K. 2012-06-24 18:08:17 UTC
Any progress on this yet?
Comment 5 Thomas Andersen 2012-06-28 21:10:41 UTC
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?
Comment 6 Armin K. 2012-06-28 21:37:21 UTC
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.
Comment 7 Armin K. 2012-06-28 22:52:13 UTC
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.
Comment 8 Armin K. 2012-06-29 15:07:16 UTC
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
  • #0 INT_cairo_pattern_create_for_surface
    at /build/buildd-cairo_1.12.2-2-i386-1cmzkR/cairo-1.12.2/src/cairo-pattern.c line 733
  • #1 draw_preview
  • #2 ??
  • #3 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkmarshalers.c line 85
  • #4 g_closure_invoke
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 777
  • #5 signal_emit_unlocked_R
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3547
  • #6 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3306
  • #7 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #8 gtk_widget_event_internal
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 6380
  • #9 gtk_widget_event
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 6037
  • #10 gtk_drawing_area_send_configure
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkdrawingarea.c line 244
  • #11 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #12 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #13 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #14 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #15 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #16 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #17 gtk_box_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkbox.c line 658
  • #18 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #19 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #20 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #21 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #22 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #23 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #24 ??
  • #25 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #26 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #27 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #28 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #29 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #30 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #31 gtk_box_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkbox.c line 658
  • #32 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #33 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #34 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #35 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #36 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #37 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #38 gtk_box_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkbox.c line 658
  • #39 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #40 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #41 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #42 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #43 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #44 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #45 gtk_window_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwindow.c line 5593
  • #46 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 1160
  • #47 g_type_class_meta_marshalv
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 997
  • #48 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #49 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #50 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #51 gtk_widget_size_allocate
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4992
  • #52 gtk_window_show
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwindow.c line 4837
  • #53 g_cclosure_marshal_VOID__VOID
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gmarshal.c line 85
  • #54 g_type_class_meta_marshal
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gclosure.c line 970
  • #55 g_closure_invoke
  • #56 signal_emit_unlocked_R
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3477
  • #57 g_signal_emit_valist
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3296
  • #58 g_signal_emit
    at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #59 gtk_widget_show
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4011
  • #60 gtk_widget_show
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 3988
  • #61 gtk_container_show_all
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkcontainer.c line 3177
  • #62 gtk_widget_show_all
    at /build/buildd-gtk+3.0_3.4.2-1-i386-sKVQ7r/gtk+3.0-3.4.2/./gtk/gtkwidget.c line 4175
  • #63 main

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.
Comment 9 Anton Guda 2012-09-01 10:34:32 UTC
Created attachment 223129 [details] [review]
This patch works for me: prevents to draw before game.
Comment 10 Armin K. 2012-09-26 10:56:25 UTC
Still happens with 3.6.0.
Comment 11 Thomas Andersen 2013-02-18 21:55:07 UTC
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.
Comment 12 Julian Taylor 2013-05-30 16:24:34 UTC
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
Comment 13 Thomas Andersen 2013-05-31 10:20:06 UTC
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.
Comment 14 Armin K. 2013-05-31 14:35:27 UTC
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.
Comment 15 Thomas Andersen 2013-05-31 21:05:31 UTC
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
Comment 16 Thomas Andersen 2013-06-01 18:44:29 UTC
Julian Taylor: I just released a fixed version 3.8.2 for you guys in ubuntu.