GNOME Bugzilla – Bug 700330
gnome-chess segfaults
Last modified: 2013-05-16 14:45:36 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.
+ Trace 231944
Thread 1 (Thread 0x7ffff7fa88c0 (LWP 27470))
Installing the glib2 debug package is highly welcome.
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.
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.
Odd. Can you confirm that changing the opponent setting from "" to a particular engine (e.g. "GNUChess") is a valid workaround?
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.
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.
Thanks for the good job. Anyway as we got the trigger nailed. :)