FMOD_System_CreateSound wav file with zeros in total chunk size causes crash

#1

Breakpoint below at line with **** at start.

Thanks

0x10041f429 <+69>: callq 0x100422190 ; FMOD::SystemI::validate(FMOD::System*, FMOD::SystemI**, FMOD::SystemLockScope*)
0x10041f42e <+74>: testl %eax, %eax
0x10041f430 <+76>: jne 0x10041f456 ; <+114>
0x10041f432 <+78>: movq -0x138(%rbp), %rdi
0x10041f439 <+85>: movq %r14, %rsi
0x10041f43c <+88>: movl %r15d, %edx
0x10041f43f <+91>: movq %r12, %rcx
0x10041f442 <+94>: movq -0x140(%rbp), %r8
0x10041f449 <+101>: callq 0x100427c9e ; ___lldb_unnamed_symbol1436$$libfmodL.dylib
**** 0x10041f44e <+106>: testl %eax, %eax . *signal SIBABRT
0x10041f450 <+108>: je 0x10041f58d ; <+425>
0x10041f456 <+114>: movl %r15d, %r13d
0x10041f459 <+117>: movq %r12, -0x150(%rbp)
0x10041f460 <+124>: leaq 0x8eefe(%rip), %rsi ; “/Users/fmod/jenkins/workspace/Build__1.10__API_Mac/lowlevel_api/src/fmod_system.cpp”
0x10041f467 <+131>: movl $0x3a4, %edx ; imm = 0x3A4
0x10041f46c <+136>: movl %eax, %edi
0x10041f46e <+138>: movl %eax, %r15d
0x10041f471 <+141>: callq 0x1003dabb2 ; ___lldb_unnamed_symbol572$$libfmodL.dylib

0 Likes

#2

And this from FMOD memory logging (in
[LOG] SystemI::createSoundInternal : Create name=‘xxxx.wav’
LOG] MemPool::alloc : 528 bytes (0x101868ab8) (alloc 351)
[LOG] MemPool::alloc : 600 bytes (0x10186bf68) (alloc 352)
[LOG] MemPool::free : 600 bytes (0x10186bf68)
[LOG] MemPool::alloc : 432 bytes (0x1018407c8) (alloc 353)
[ERR] CodecFSB5::readHeader : Header check failed. Not an FSB5
[LOG] MemPool::free : 432 bytes (0x1018407c8)
[LOG] MemPool::alloc : 1312 bytes (0x102053e08) (alloc 354)
[LOG] MemPool::free : -388396727 bytes (0x100403eab)

and codec logging:

[LOG] SystemI::createSoundInternal : 15 codecs found. Scan all until one succeeds
[LOG] SystemI::createSoundInternal : Scan for tags.
[LOG] CodecTag::openInternal : attempting to open ID3 or ASF tags…
[LOG] Codec::release :
[LOG] Codec::release : done
[LOG] CodecWav::openInternal : attempting to open as WAV…
[LOG] CodecWav::parseRIFF : chunk : id bext size 1114
[LOG] CodecWav::parseRIFF : offset = 1126 / 0
[LOG] Codec::release :
[LOG] Codec::release : done
[LOG] CodecFSB5::openInternal : attempting to open as FSB5…
[ERR] CodecFSB5::readHeader : Header check failed. Not an FSB5
[LOG] Codec::release :
[LOG] Codec::release : done
[LOG] CodecOggVorbis::openInternal : attempting to open as OGG…
[LOG] CodecWav::parseRIFF : chunk : id bext size 1114
[LOG] CodecWav::parseRIFF : offset = 1126 / 0

0 Likes

#3

Does this only occur with a specific file?
If so are you able to send this to us: support@fmod.com

0 Likes

#4

I think it happens with any wav file. Just zero out bytes 5,6,7 and 8. And try to open stream on it.

Ive attached one,

(Attachment BB0484_A001-002B-_010.WAV.zip is missing)

0 Likes

#5

Thanks very much for the file.

We can see how this 0 chunk length file can cause a problem and have fixed the reason for the crash for the next release.

0 Likes