Bug 79933 - Gnibbles exits unexpectedly trying to load level 000
Gnibbles exits unexpectedly trying to load level 000
Product: Red Hat Linux
Classification: Retired
Component: gnome-games (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Havoc Pennington
Jay Turner
: MoveUpstream
Depends On:
  Show dependency treegraph
Reported: 2002-12-17 22:40 EST by C Duvall
Modified: 2015-01-07 19:02 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-19 10:55:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test patch to get rid of level 000 (549 bytes, patch)
2002-12-18 08:18 EST, C Duvall
no flags Details | Diff

  None (edit)
Description C Duvall 2002-12-17 22:40:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020913

Description of problem:
When playing gnibbles, with the 'levels in random order' option selected,
gnibbles will occasionally exit unexpectedly attempting to load a new level. The
message on the console is:

Ack! Couldn't load level file /usr/share/gnibbles/level000.gnl

It's reproducable consistently when playing many, many games. The levels are in
random order, you know :)


Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start Gnibbles
2. Choose the levels in random order option
3. Play a couple hundred games

Actual Results:  Game exits unexpectedly.

Expected Results:  A new level should be loaded.
Comment 1 Havoc Pennington 2002-12-17 23:31:45 EST
Hmm, is this an excuse to spend an entire day playing gnibbles? ;-)
Comment 2 C Duvall 2002-12-18 08:18:09 EST
Created attachment 88794 [details]
Test patch to get rid of level 000

This patch is untested as I haven't figured much out about rpm yet, but it
seems to be the only place where current_level could be set to 0.
Comment 3 Miloslav Trmac 2002-12-18 12:28:45 EST
		tmp = rand () % MAXLEVEL;
		tmp = rand () % MAXLEVEL + 1;
This should be
+                       tmp = rand () % (MAXLEVEL - 1) + 1;
Otherwise you remove 0, and add MAXLEVEL
Comment 4 C Duvall 2002-12-18 15:24:16 EST
MAXLEVEL is defined as 26 in the sources I have, and there is a level for it.
Other places in the source it does rand() % MAXLEVEL + 1, validly. It looks like
valid levels are 1-MAXLEVEL, inclusive.
Comment 5 C Duvall 2002-12-19 10:25:34 EST
Looking further, this bug seems to be a dup of bug 52900 at bugzilla.gnome.org.
Same trivial patch was submitted as fix by someone else, seems to be fixed now
Comment 6 Havoc Pennington 2002-12-19 10:55:36 EST
Thanks for looking into this. We should have the fix in the next release, then.

Note You need to log in before you can comment on or make changes to this bug.