Subject: bug#13500: 24.2.92; tetris score grows after ending the game

From: Sven Joachim <[email-masked]>
Date: Sat, 19 Jan 2013 22:00:16 +0100

tags 13500 + moreinfo unreproducible
thanks

On 2013-01-19 21:11 +0100, Glenn Morris wrote:

> Sven Joachim wrote:
>
>> Start tetris with M-x tetris and keep pressing SPC until the playing
>> area is filled.  Now Emacs writes the score to
>> ~/.emacs.d/games/tetris-scores, but not only once but several times per
>> second, increasing the score each time as if the game is still going on
>> (press C-g to stop that).
>
> I can't reproduce this, though I did find an (old) bug in
> gamegrid-add-score-with-update-game-score.
>
> The fact that your scores get written to ~/.emacs.d/games means that
> /usr/local/libexec/emacs/24.2.92/arch/update-game-score
>
> is not setuid.

Correct, I did not even run "make install".

> If I set it non-setuid, and do
>
> rm- rf ~/.emacs.d/games/
>
> then Emacs fails to write score files due to a
> gamegrid-add-score-with-update-game-score bug. If I fix that bug (see
> below), or mkdir ~/.emacs.d/games first, then it works fine.
>
> What happens if you rm ~/.emacs.d/games/tetris-scores?

I was not able to reproduce the bug then; but even with the file back in
place I couldn't, although it happened both in my regular session and
the "emacs -Q" instance I started specially for reporting it.  Now it
does not happen in either. :-/

There's another problem in that the file is not truncated to
gamegrid-score-file-length lines, but that has been the case for a long
time IIRC.

Cheers,
       Sven