Bug#687107: zsnes: ZSNES often freezes when resuming game

Ian Munsie darkstarsword at gmail.com
Sun Sep 9 18:38:40 UTC 2012


Package: zsnes
Version: 1.510+bz2-4
Severity: important
Tags: upstream patch

Dear Maintainer,

After pausing a game with escape to go to the zsnes menu, zsnes often
locks up when resuming the game.

It seems that sem_GetTicks sometimes returns NAN. If this happens when
resuming the game (i.e. from Start60HZ), than the 'start' variable can
be set to NAN, which causes this test in CheckTimers to never succeed:
while ((end - start) >= update_ticks_pc).

Since this is a floating point issue, the CPU may be relevant. Mine is:
Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz

This issue has been discussed further on:

http://board.zsnes.com/phpBB3/viewtopic.php?f=3&t=2337&p=225072#p225072

And I have created a patch to fix it by replacing the floating point
arithmetic with 64bit integer arithmetic:

https://raw.github.com/DarkStarSword/junk/master/patches/zsnes-linux-resume-freeze-fix.patch

Given upstream is in the middle of a huge 5+ year re-write, It's not
clear if this will be fixed in an upstream version any time soon (as
seen in the above post, this problem has existed since at least 2005),
so I propose picking the patch up in Debian in the interim.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages zsnes depends on:
ii  libao4                    1.1.0-2
ii  libc6                     2.13-35
ii  libgcc1                   1:4.7.1-2
ii  libgl1-mesa-glx [libgl1]  8.0.4-2
ii  libncurses5               5.9-10
ii  libpng12-0                1.2.49-1
ii  libsdl1.2debian           1.2.15-5
ii  libstdc++6                4.7.1-2
ii  libtinfo5                 5.9-10
ii  zlib1g                    1:1.2.7.dfsg-13

zsnes recommends no packages.

zsnes suggests no packages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zsnes-linux-resume-freeze-fix.patch
Type: text/x-diff
Size: 3729 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20120910/600d7465/attachment.patch>


More information about the Pkg-games-devel mailing list