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

Etienne Millon etienne.millon at gmail.com
Sun Sep 9 19:23:11 UTC 2012


Hello,

This is great ! Thanks for the investigation and of course for the
patch.

> 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).

Do you know why it computes a NaN ? If it's an overflow in the
following line :

> -  ticks=((float)(now.tv_sec-sem_start.tv_sec))*1000.f+((float)(now.tv_usec-sem_start.tv_usec))*.001f;

.. is the int64 version immune to overflows ?

> 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.

Of course this needs testing, but I see no problem in adding this
patch to the current package.

Please note that the next release is frozen, so it won't be part of a
package too soon (in a few months, I believe).

Have a nice day and thanks again for the patch !


PS: (off-topic) - I got curious and saw your DKC2 patch[1], feel free
to submit it as another (minor) bug when you think it's ready.

[1]: https://raw.github.com/DarkStarSword/junk/master/patches/zsnes-dkc2-spinning-barrel-workaround.patch

-- 
Etienne Millon



More information about the Pkg-games-devel mailing list