Built branch-2-1-2 for my iPhone.
FoTAQ from ScummVM site crashes for me when I try to use a bat in BaseMP3Stream::decodeMP3Data(), on _positionInFrame == 0.
I cannot really see anything wrong with the local variables, and libmad is compiled without debug symbols, so cannot immediately step in.
Thread stack:
Code: Select all
com.apple.coreaudio.AQClient (10): EXC_BAD_ACCESS (code=1, address=0x4eca4c)
#0 0x000000010460f27c in III_overlap [inlined] at /Users/bsr/sources/libmad-0.15.1b/layer3.c:2265
#1 0x000000010460f274 in III_decode [inlined] at /Users/bsr/sources/libmad-0.15.1b/layer3.c:2456
#2 0x000000010460f1c4 in mad_layer_III at /Users/bsr/sources/libmad-0.15.1b/layer3.c:2648
#3 0x000000010460ba08 in mad_frame_decode at /Users/bsr/sources/libmad-0.15.1b/frame.c:453
#4 0x00000001042054fc in Audio::BaseMP3Stream::decodeMP3Data(Common::ReadStream&) at /Users/vic/src/scum/scummvm/audio/decoders/mp3.cpp:167
#5 0x0000000104205afc in Audio::BaseMP3Stream::fillBuffer(Common::ReadStream&, short*, int) at /Users/vic/src/scum/scummvm/audio/decoders/mp3.cpp:323
#6 0x0000000104206400 in Audio::MP3Stream::readBuffer(short*, int) at /Users/vic/src/scum/scummvm/audio/decoders/mp3.cpp:364
#7 0x0000000103301bcc in Queen::AudioStreamWrapper::readBuffer(short*, int) at /Users/vic/src/scum/scummvm/engines/queen/sound.cpp:82
#8 0x00000001042aebb0 in Audio::LinearRateConverter<false, false>::flow(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) at /Users/vic/src/scum/scummvm/audio/rate.cpp:237
#9 0x00000001042a9b60 in Audio::Channel::mix(short*, unsigned int) at /Users/vic/src/scum/scummvm/audio/mixer.cpp:616
#10 0x00000001042a994c in Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) at /Users/vic/src/scum/scummvm/audio/mixer.cpp:291
#11 0x000000010430eae4 in OSystem_iOS7::mixCallback(void*, unsigned char*, int) at /Users/vic/src/scum/scummvm/backends/platform/ios7/ios7_osys_sound.cpp:44
#12 0x000000010430ea20 in OSystem_iOS7::AQBufferCallback(void*, OpaqueAudioQueue*, AudioQueueBuffer*) at /Users/vic/src/scum/scummvm/backends/platform/ios7/ios7_osys_sound.cpp:32
Variables in decodeMP3Data, the best I can paste:
Code: Select all
this Audio::MP3Stream * 0x115d1c000 0x0000000115d1c000
Audio::BaseMP3Stream Audio::BaseMP3Stream
_posInFrame uint 0
_state Audio::BaseMP3Stream::State MP3_STATE_READY
_curTime mad_timer_t
seconds long 0
fraction unsigned long 50803200
_stream mad_stream
buffer const unsigned char * 0x115d218f4 0x0000000115d218f4
bufend const unsigned char * "" 0x0000000115d22d34
skiplen unsigned long 0
sync int 1
freerate unsigned long 0
this_frame const unsigned char * 0x115d21a14 0x0000000115d21a14
next_frame const unsigned char * 0x115d21a74 0x0000000115d21a74
ptr mad_bitptr
byte const unsigned char * 0x115d21a21 0x0000000115d21a21
cache unsigned short 61
left unsigned short 8
anc_ptr mad_bitptr
anc_bitlen unsigned int 1
main_data unsigned char (*)[2567] 0x10c839400 0x000000010c839400
md_len unsigned int 79
options int 0
error mad_error MAD_ERROR_NONE
_frame mad_frame
header mad_header
options int 0
sbsample mad_fixed_t [2][36][32]
overlap mad_fixed_t (*)[2][32][18] NULL 0x0000000000000000
_synth mad_synth
_channels uint 1
_rate uint 12000
_buf byte [40968]
_inStream Common::ScopedPtr<Common::SeekableReadStream, Common::DefaultDeleter<Common::SeekableReadStream> >
_length Audio::Timestamp
stream Common::SeekableSubReadStream & 0x0000000280f7b440
Common::SubReadStream Common::SubReadStream
_parentStream Common::MemoryReadStream * 0x281475b90 0x0000000281475b90
_ptrOrig const byte *const 0x10c837e00 0x000000010c837e00
_ptr const byte * "" 0x000000010c839240
_size uint32 5184
_pos uint32 5184
_disposeMemory DisposeAfterUse::Flag YES
_eos bool false
_begin uint32 0
Looks like the same problem as reported here:
viewtopic.php?t=14822