libgme / game-music-emu

Blargg's video game music emulation library, which allows audio applications to easily add playback support for the music of many classic video game consoles.
GNU Lesser General Public License v2.1
59 stars 12 forks source link

Crashing bug with some SPCs #50

Closed Wohlstand closed 10 months ago

Wohlstand commented 2 years ago

Original report by Anonymous.


Certain SPCs, for example Final Fantasy V/1.12 - Good Night!.spc (attached), cause GME to crash with SIGFPE. This was experienced and debugged using a debug build of Cog circa version 1920.

Wohlstand commented 2 years ago

Original comment by Christopher Snowhill (Bitbucket: kode54, GitHub: kode54).


Possibly a division by zero error with the fadeout field being 0. I had to deal with that bug back when I was using my previous fork of GME.

Wohlstand commented 2 years ago

Original comment by Christopher Snowhill (Bitbucket: kode54, GitHub: kode54).


Needs a check at the start of Music_Emu::handle_fade() for zero fade_step, since int_log() divides by that value, which can throw a division by zero error. Strangely, it did not occur on AArch64, only Intel.

Wohlstand commented 1 year ago

Original comment by mywave (Bitbucket: mywave, GitHub: mywave).


Does not seem to be a problem with current git master on x86_64 Linux

Wohlstand commented 10 months ago

I tested the thing, and seems, it works just fine.