[ scummvm-Bugs-2872076 ] Floating point exception in rate conversion if w/o soundcd
SourceForge.net
noreply at sourceforge.net
Sat Oct 3 02:59:04 CEST 2009
Bugs item #2872076, was opened at 2009-10-03 02:59
Message generated for change (Tracker Item Submitted) made by jmmdebian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2872076&group_id=37116
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unknown Crash/Other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Moritz Mühlenhoff (jmmdebian)
Assigned to: Nobody/Anonymous (nobody)
Summary: Floating point exception in rate conversion if w/o soundcd
Initial Comment:
This was originally filed in the Debian Bug Tracking system:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540166
I can reproduce this with 1.0-rc1 by rmmod'ing all sound card modules:
Program received signal SIGFPE, Arithmetic exception.
0x0878e47b in Audio::makeRateConverter<false, false> (inrate=10426, outrate=0) at sound/rate.cpp:333
333 if ((inrate % outrate) == 0) {
(gdb) bt
#0 0x0878e47b in Audio::makeRateConverter<false, false> (inrate=10426, outrate=0) at sound/rate.cpp:333
#1 0x0878d1a9 in Audio::makeRateConverter (inrate=10426, outrate=0, stereo=false, reverseStereo=false)
at sound/rate.cpp:353
#2 0x0876d4b7 in Channel (this=0x8b2c188, mixer=0x8a820f0, type=Audio::Mixer::kSFXSoundType, input=0x8abc1b0,
autofreeStream=true, reverseStereo=false, id=0, permanent=false) at sound/mixer.cpp:397
#3 0x0876e16f in Audio::MixerImpl::playInputStream (this=0x8a820f0, type=Audio::Mixer::kSFXSoundType, handle=0x8a9c498,
input=0x8abc1b0, id=0, volume=78 'N', balance=0 '\0', autofreeStream=true, permanent=false, reverseStereo=false)
at sound/mixer.cpp:207
#4 0x0876e28c in Audio::MixerImpl::playRaw (this=0x8a820f0, type=Audio::Mixer::kSFXSoundType, handle=0x8a9c498,
sound=0x8b62500, size=4014, rate=10426, flags=1 '\1', id=0, volume=78 'N', balance=0 '\0', loopStart=0, loopEnd=0)
at sound/mixer.cpp:178
#5 0x085b3b45 in Sky::Sound::playSound (this=0x8a9c488, sound=6, volume=78, channel=0 '\0') at engines/sky/sound.cpp:1121
#6 0x085b3e6e in Sky::Sound::fnStartFx (this=0x8a9c488, sound=1, channel=0 '\0') at engines/sky/sound.cpp:1175
#7 0x085c6191 in Sky::Logic::fnStartFx (this=0x8b15e58, sound=257, b=0, c=127) at engines/sky/logic.cpp:2464
#8 0x085c8438 in Sky::Logic::anim (this=0x8b15e58) at engines/sky/logic.cpp:439
#9 0x085c991d in Sky::Logic::engine (this=0x8b15e58) at engines/sky/logic.cpp:160
#10 0x085b1d2a in Sky::SkyEngine::go (this=0x8aa1d08) at engines/sky/sky.cpp:207
#11 0x085b3291 in Sky::SkyEngine::run (this=0x8aa1d08) at ./engines/sky/sky.h:101
#12 0x080546bd in runGame (plugin=0x8a4f878, system=..., edebuglevels=...) at base/main.cpp:212
#13 0x08054fce in scummvm_main (argc=4, argv=0xbffff604) at base/main.cpp:377
#14 0x080519fa in main (argc=4, argv=0xbffff604) at backends/platform/sdl/main.cpp:108
(gdb)
Since outrate is 0 and ( x module 0) is undefined, it triggers the crash.
template<bool stereo, bool reverseStereo>
RateConverter *makeRateConverter(st_rate_t inrate, st_rate_t outrate)
{
if (inrate != outrate) {
if ((inrate % outrate) == 0) {
return new SimpleRateConverter<stereo,
reverseStereo>(inrate, outrate);
} else {
return new LinearRateConverter<stereo,
reverseStereo>(inrate, outrate);
}
} else {
return new CopyRateConverter<stereo, reverseStereo>();
}
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2872076&group_id=37116
More information about the Scummvm-tracker
mailing list