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 619988 - Unexpected death
Unexpected death
Status: RESOLVED FIXED
Product: gnome-nibbles
Classification: Applications
Component: general
3.12.x
Other Linux
: High major
: ---
Assigned To: gnome-nibbles-maint
gnome-nibbles-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-29 01:09 UTC by Phillip Susi
Modified: 2014-07-18 23:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnibbles patch for reverse bug in worm.c (515 bytes, patch)
2010-07-17 09:37 UTC, Philip Muskovac
committed Details | Review

Description Phillip Susi 2010-05-29 01:09:21 UTC
From: https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/574212:

While playing nibbles you sometimes die for no apparent reason.  Sometimes when this happens, you get stuck in a loop where you respawn and die again after moving 3 spaces ( and not crashing into anything ) until you are out of lives.  The respawn loop can be broken if you press any key to change direction after you respawn but before you die again.  The unexpected death can be triggered by you or one of the computer worms eating something.
Comment 1 Philip Muskovac 2010-07-17 09:37:35 UTC
Created attachment 166056 [details] [review]
gnibbles patch for reverse bug in worm.c

Patch from Felix Oxley (see Launchpad bug):

"Hi,

I had this problem often, so I had a look at it this week - here is a patch. :-)

The problem was that when an AI worm ate a diamond, which reverses all other players, the calculation to determine which direction you were now moving in was incorrect.

If your worm was moving in a straight line (imagine a short worm with no kinks) say right, then the direction assigned after reversing would also be right and the new head/old tail would run in to the body of the worm.

The correction is a very straightforward, hopefully it can be merged quickly."
Comment 2 Thomas Andersen 2010-08-09 23:19:11 UTC
Hey Felix. Thanks a lot for the patch :) And thank you Philip for forwarding it to the right place.

Ideally bugs/patches like this should just go to gnome bugzilla directly. It would save us all a lot of work (and I would also not have found your nice clarification of the patch after I had already reviewed it). I only went to lp afterwards to look for your email to give proper credit in the commit.

I did not find your email so I'll just commit it now and put your name in the comment. If you plan to send more patches please consider sending them to bugzilla directly as git formatted patches. It will save me a lot of trouble and probably also get your work committed faster... :)

Thanks again.

Committed to master:
http://git.gnome.org/browse/gnome-games/commit/?id=c99525beee74d22c7ebf4d8daa0a70ed1197cd89
Comment 3 Michael Catanzaro 2014-07-18 23:50:17 UTC
Hmmmm this looks familiar
Comment 4 Michael Catanzaro 2014-07-18 23:50:48 UTC
*** Bug 654072 has been marked as a duplicate of this bug. ***
Comment 5 Michael Catanzaro 2014-07-18 23:53:03 UTC
Just kidding. Maybe I should read bug reports before deciding they're duplicates.