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 771541 - Crash after pressing pause button twice when game has ended
Crash after pressing pause button twice when game has ended
Status: RESOLVED FIXED
Product: quadrapassel
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal critical
: ---
Assigned To: quadrapassel-maint
quadrapassel-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-16 15:19 UTC by Michael Catanzaro
Modified: 2016-12-14 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Prevent setting up timer when game has ended (836 bytes, patch)
2016-09-20 07:40 UTC, Tomi Leppänen
committed Details | Review
[PATCH] Prevent unpause when game is over (824 bytes, patch)
2016-09-20 07:41 UTC, Tomi Leppänen
committed Details | Review

Description Michael Catanzaro 2016-09-16 15:19:51 UTC
Crash after pressing pause keyboard button twice when game has ended:

Truncated backtrace:
Thread no. 1 (6 frames)
 #0 game_land_shape at game.c:1744
 #1 game_fall_timeout_cb at game.c:894
 #6 g_main_context_iteration at gmain.c:3901
 #7 g_application_run at gapplication.c:2381
 #8 quadrapassel_main at quadrapassel.c:2886
 #10 _start

The downstream bug is private but the reporter there says he'll try to write a patch; that's nice.
Comment 1 Tomi Leppänen 2016-09-20 07:40:12 UTC
Created attachment 335904 [details] [review]
[PATCH] Prevent setting up timer when game has ended

This fixes the crashing when the game has ended. This is done by checking if the game has ended before setting up drop timer. I will send another patch to prevent pause action after the game has ended, but this alone prevents the segmentation fault.

I'd like to get feedback about these patches if you have any thoughts. Thank you!
Comment 2 Tomi Leppänen 2016-09-20 07:41:47 UTC
Created attachment 335905 [details] [review]
[PATCH] Prevent unpause when game is over

This is the second patch I mentioned. It also prevents the crashing, but I don't think it's good solution alone. This patch prevents pause key action from happening after the game is over and that way the text shown to the user doesn't change.

Forgot to mention, but I'm the original reporter from Redhat Bugzilla. I'm sending these here as I was told I should.
Comment 3 Michael Catanzaro 2016-12-14 15:51:15 UTC
Mario, do you have time to look at these? They both look sane to me, OK to commit?
Comment 4 Mario Wenzel 2016-12-14 16:12:01 UTC
Yeah, that looks good. Don't know why I've missed that.
Comment 5 Mario Wenzel 2016-12-14 16:12:26 UTC
Review of attachment 335904 [details] [review]:

Looks fine
Comment 6 Mario Wenzel 2016-12-14 16:12:38 UTC
Review of attachment 335905 [details] [review]:

Looks fine