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 700330 - gnome-chess segfaults
gnome-chess segfaults
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
3.8.x
Other Linux
: High critical
: ---
Assigned To: Michael Catanzaro
Michael Catanzaro
Depends on:
Blocks:
 
 
Reported: 2013-05-14 18:58 UTC by contact
Modified: 2013-05-16 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description contact 2013-05-14 18:58:37 UTC
gnome-chess 3.8.2 segfaults when started. I am using ArchLinux(x86_64) kernal 3.9.2.

I am wondering whether there is any dbus related problem in my installation. 

gdb trace below. 

Thread 1 (Thread 0x7ffff7fa88c0 (LWP 27470))

  • #0 application_start_new_game
    at gnome-chess.c line 6178
  • #1 application_real_startup
    at gnome-chess.c line 1303
  • #2 _g_closure_invoke_va
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_application_register
    from /usr/lib/libgio-2.0.so.0
  • #6 g_application_real_local_command_line
    from /usr/lib/libgio-2.0.so.0
  • #7 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #8 gnome_chess_main
    at gnome-chess.c line 6489
  • #9 __libc_start_main
    at libc-start.c line 258
  • #10 _start
    at ../sysdeps/x86_64/start.S line 123

Comment 1 André Klapper 2013-05-14 23:21:29 UTC
Installing the glib2 debug package is highly welcome.
Comment 2 Michael Catanzaro 2013-05-15 15:07:52 UTC
Thank you for your report.

This is a null pointer dereference caused by https://git.gnome.org/browse/gnome-chess/commit/?h=gnome-3-8&id=b351265df266829f315912662d7ae9cd15965ce8

To reproduce, I browse to org.gnome.gnome-chess in dconf editor and make sure "opponent" is set to "" (the default), then delete /usr/share/gnome-chess/engines.conf. Could you please confirm that that file is missing from your system? If it's missing, then I don't think this is very serious (though I'll make sure to fix it for the next release). If it is present, then I'm confused, and I'd like to see your terminal output after running

export G_MESSAGES_DEBUG=all
gnome-chess

I checked Arch's pkgbuild and didn't see anything that looks like it could cause this, but I guess there has to have been a packaging mistake somewhere. Is this bit of gnome-chess.install correct; I would think there ought to be / before the path names.

post_install() {
  glib-compile-schemas usr/share/glib-2.0/schemas
  update-desktop-database -q
  gtk-update-icon-cache -f -q usr/share/icons/hicolor
}

I don't think that should matter for this bug, but you never know.
Comment 3 contact 2013-05-15 17:39:19 UTC
The opponent is set to "" and engines.conf is present.


export G_MESS.. gives

Gtk-DEBUG: Connecting to session manager
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile GNUchess
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Sjeng
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Amy
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Crafty
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Faile
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Phalanx
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Glaurung
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Stockfish
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile HoiChess
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Diablo
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile BBChess
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Fruit
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Gambit Fruit
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Toga II
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Amundsen
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Boo's Chess Engine
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Fairy-Max
** (gnome-chess:17879): DEBUG: ai-profile.vala:35: Loading AI profile Shredder


it looks like / is missing before usr. pointed that in arch bug list. tried packaging with that changed, but still same segfault. there is atleast one more user in arch, complaining the same issue.
Comment 4 Michael Catanzaro 2013-05-15 21:14:37 UTC
Odd.

Can you confirm that changing the opponent setting from "" to a particular engine (e.g. "GNUChess") is a valid workaround?
Comment 5 contact 2013-05-16 06:50:13 UTC
odd, indeed! :)

thanks. that worked.

To start with, dconf opponent settings was empty and gnuchess was not installed. 

Once i set the opponent field to "GNUChess" and started gnome-chess, it started giving me error about the unknown ai profile gnuchess, but there was no segfault.

I installed gnuchess and gnome-chess detected that and made a move against my move.

I changed opponent to back to "", removed ~/.local/share/gnome-chess and started gnome-chess. it works with the gnuchess ai, but starts a fresh game. no segfaults.

regarding the "/" in .install of arch, the packager said it is not a problem.

thanks. looks like solved from my end, but you may need to check why that happens. :P If none of the ais are found, it should return an error rather than segfaulting.
Comment 6 Michael Catanzaro 2013-05-16 14:11:21 UTC
Sorry, deleting engines.conf is one way to trigger it, but having no chess engines works too.  (Provided you have not changed the "opponent" setting.)

I'll release 3.8.2.1 to fix this, since it's proved to be a major problem for Arch.
Comment 7 contact 2013-05-16 14:45:36 UTC
Thanks for the good job. Anyway as we got the trigger nailed. :)