gnome-chess crash on pawn promotion

Bug #1659828 reported by angem1
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vala
Fix Released
Wishlist
gnome-chess (Debian)
Fix Released
Unknown
gnome-chess (Ubuntu)
Fix Released
High
Unassigned
Yakkety
Fix Released
High
Unassigned

Bug Description

Impact
------
The Chess app in Ubuntu 16.10 will crash when trying to promote a pawn.

gnome-chess is not installed by default by any current Ubuntu flavors.

Test Case
---------
1. Open the Chess app and click Preferences in the app menu. Change Opposing Player to Human. Close Preferences.
2. Make a move then click New Game to start a new game without a computer player.
3. Move a pawn to the far end of the board to promote it to Queen.

Does Chess crash after promoting?

Regression Potential
--------------------
Low. This patch only affects pawn promotion which currently causes the game to crash so this is definitely an improvement.

Other Info
----------
There are 3 ways to fix this bug:
1) Build gnome-chess without hardening flags. (This is the approach taken in Fedora 25).
2) Apply a minimal workaround patch to gnome-chess. The patch was acknowledged by the gnome-chess maintainer, but he preferred to push for a proper fix in vala instead.
3) Fix this in vala (it was fixed in vala 0.36 and 0.34.7) and then rebuild gnome-chess against the new vala.

https://git.gnome.org/browse/vala/commit/?id=f6e29bd1

I initially did #2 in Ubuntu 17.04 Beta (zesty) but will replace it with #3.

I am using #2 for Ubuntu 16.10 since it seems a more minimal SRU.

This only affect Ubuntu 16.10 since that was the first release where we opted gnome-chess into all available hardening flags.

Revision history for this message
angem1 (angem1) wrote :

Found a fix :
vala's enum type should not be nullable (with the ? suffix)
in this case the problem is in the enum: PieceType

just change the relevant declarations in
* gnome-chess.vala
* chess-scene.vala

from PieceType? to PieceType,
and add a NULL member to this enum instead using the null keyword.

Revision history for this message
angem1 (angem1) wrote :

Attachment is a patch for version gnome-chess-3.22.0

Changed in gnome-chess (Ubuntu):
status: New → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fixing nullable enum PieceType malfunction" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug and patch to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Also, the next time you submit a patch for an Ubuntu package, please subscribe ~ubuntu-sponsors so that the patch will be seen faster.

https://wiki.ubuntu.com/SponsorshipProcess

I am setting the status back to Confirmed since this patch hasn't been committed upstream or in Ubuntu yet.

Changed in gnome-chess (Ubuntu):
status: Fix Committed → Confirmed
Mathew Hodson (mhodson)
Changed in gnome-chess (Ubuntu):
importance: Undecided → Medium
Jeremy Bícha (jbicha)
affects: gnome-chess → vala
Changed in vala:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Jeremy Bícha (jbicha)
description: updated
Changed in gnome-chess (Ubuntu):
importance: Medium → High
status: Confirmed → Fix Committed
Changed in gnome-chess (Ubuntu Yakkety):
status: New → Triaged
importance: Undecided → High
description: updated
Jeremy Bícha (jbicha)
summary: - Crash on promoting to queen fairymax engine
+ gnome-chess crash on pawn promotion
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-chess - 1:3.23.92.5-0ubuntu1

---------------
gnome-chess (1:3.23.92.5-0ubuntu1) zesty; urgency=medium

  * New upstream release.
  * Add revert_require_vala36.patch:
    - Revert unnecessary commit that bumped the minimum vala to 0.36
  * Add dont-crash-on-promotion.patch:
    - Workaround vala bug that caused the game to crash when
      promoting a pawn, thanks angem1 (LP: #1659828)

 -- Jeremy Bicha <email address hidden> Sat, 11 Mar 2017 13:50:32 -0500

Changed in gnome-chess (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
tags: added: yakkety
Changed in gnome-chess (Debian):
status: Unknown → Confirmed
Changed in vala:
status: Confirmed → Fix Released
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Thank you for your contribution.

I am uploading this fix to Ubuntu 16.10 now. It will need to be manually approved by the Ubuntu SRU Team before the update is available for testing.

description: updated
Changed in gnome-chess (Ubuntu Yakkety):
status: Triaged → In Progress
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello angem1, or anyone else affected,

Accepted gnome-chess into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-chess/1:3.22.0-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gnome-chess (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in gnome-chess (Debian):
status: Confirmed → Fix Released
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I updated Ubuntu (Unity) 16.10 to gnome-chess 1:3.22.0-1ubuntu1.

Before the update, Chess crashed when I completed the test case. After the update, the test case works without crashing.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-chess - 1:3.22.0-1ubuntu1

---------------
gnome-chess (1:3.22.0-1ubuntu1) yakkety; urgency=medium

  * Add dont-crash-on-promotion.patch:
    - Workaround vala bug that caused the game to crash when
      promoting a pawn, thanks angem1 (LP: #1659828)

 -- Jeremy Bicha <email address hidden> Tue, 21 Mar 2017 11:34:07 -0400

Changed in gnome-chess (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gnome-chess has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.