User picked target 'touche-demo' (engine ID 'touche', game ID 'touche')... Running Touché: The Adventures of the Fifth Musketeer (Demo/DOS/English) touche.dat: ddaed436445b2e77294ed19e8ae4aa2c, 8720683 bytes. ================== WARNING: ThreadSanitizer: data race (pid=74345) Read of size 8 at 0x00010952e040 by thread T14 (mutexes: write M0, write M1): #0 MidiDriver_ADLIB::onTimer() adlib.cpp:1634 (scummvm:arm64+0x100617e24) #1 Common::Functor0Mem::operator()() const func.h:397 (scummvm:arm64+0x10061d9d0) #2 Audio::EmulatedChip::readBuffer(short*, int) chip.cpp:127 (scummvm:arm64+0x1006268e4) #3 Audio::RateConverter_Impl::copyConvert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:109 (scummvm:arm64+0x10063d7f0) #4 Audio::RateConverter_Impl::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:290 (scummvm:arm64+0x10063d3d8) #5 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633f20) #6 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #7 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #8 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #9 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Previous write of size 8 at 0x00010952e040 by main thread: #0 MidiDriver_ADLIB::setTimerCallback(void*, void (*)(void*)) adlib.cpp:1669 (scummvm:arm64+0x1006191e0) #1 Touche::MidiPlayer::MidiPlayer() midi.cpp:50 (scummvm:arm64+0x10005910c) #2 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #3 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #4 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #5 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #6 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 7512 at 0x00010952e000 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 AdLibEmuMusicPlugin::createInstance(MidiDriver**, unsigned int) const adlib.cpp:2319 (scummvm:arm64+0x10061c8bc) #2 MidiDriver::createMidi(unsigned int) mididrv.cpp:408 (scummvm:arm64+0x10062ab2c) #3 Touche::MidiPlayer::MidiPlayer() midi.cpp:47 (scummvm:arm64+0x100059078) #4 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #5 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #6 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race adlib.cpp:1634 in MidiDriver_ADLIB::onTimer() ================== ================== WARNING: ThreadSanitizer: data race (pid=74345) Read of size 8 at 0x00010952e048 by thread T14 (mutexes: write M0, write M1): #0 MidiDriver_ADLIB::onTimer() adlib.cpp:1635 (scummvm:arm64+0x100617e5c) #1 Common::Functor0Mem::operator()() const func.h:397 (scummvm:arm64+0x10061d9d0) #2 Audio::EmulatedChip::readBuffer(short*, int) chip.cpp:127 (scummvm:arm64+0x1006268e4) #3 Audio::RateConverter_Impl::copyConvert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:109 (scummvm:arm64+0x10063d7f0) #4 Audio::RateConverter_Impl::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:290 (scummvm:arm64+0x10063d3d8) #5 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633f20) #6 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #7 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #8 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #9 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Previous write of size 8 at 0x00010952e048 by main thread: #0 MidiDriver_ADLIB::setTimerCallback(void*, void (*)(void*)) adlib.cpp:1670 (scummvm:arm64+0x1006191fc) #1 Touche::MidiPlayer::MidiPlayer() midi.cpp:50 (scummvm:arm64+0x10005910c) #2 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #3 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #4 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #5 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #6 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 7512 at 0x00010952e000 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 AdLibEmuMusicPlugin::createInstance(MidiDriver**, unsigned int) const adlib.cpp:2319 (scummvm:arm64+0x10061c8bc) #2 MidiDriver::createMidi(unsigned int) mididrv.cpp:408 (scummvm:arm64+0x10062ab2c) #3 Touche::MidiPlayer::MidiPlayer() midi.cpp:47 (scummvm:arm64+0x100059078) #4 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #5 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #6 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race adlib.cpp:1635 in MidiDriver_ADLIB::onTimer() ================== ================== WARNING: ThreadSanitizer: data race (pid=74345) Write of size 2 at 0x000108643538 by main thread: #0 Audio::Channel::updateChannelVolumes() mixer.cpp:642 (scummvm:arm64+0x100636d10) #1 Audio::Channel::notifyGlobalVolChange() mixer.cpp:141 (scummvm:arm64+0x100634690) #2 Audio::MixerImpl::muteSoundType(Audio::Mixer::SoundType, bool) mixer.cpp:379 (scummvm:arm64+0x1006345e4) #3 Engine::defaultSyncSoundSettings() engine.cpp:862 (scummvm:arm64+0x1000abdc4) #4 Engine::syncSoundSettings() engine.cpp:840 (scummvm:arm64+0x1000b1518) #5 Touche::ToucheEngine::syncSoundSettings() touche.cpp:342 (scummvm:arm64+0x100071068) #6 Touche::ToucheEngine::run() touche.cpp:200 (scummvm:arm64+0x10006ecbc) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Previous read of size 2 at 0x000108643538 by thread T14 (mutexes: write M0, write M1): #0 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633ee8) #1 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #2 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #3 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #4 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) As if synchronized via sleep: #0 nanosleep :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x2fa24) #1 SDL_Delay_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xd6358) #2 virtual thunk to OSystem_SDL::delayMillis(unsigned int) sdl.cpp (scummvm:arm64+0x10000a908) #3 MidiDriver::sendGMReset() mididrv.cpp:465 (scummvm:arm64+0x10062ad0c) #4 Touche::MidiPlayer::MidiPlayer() midi.cpp:55 (scummvm:arm64+0x10005915c) #5 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #6 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #7 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #8 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #9 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #10 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #11 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 112 at 0x000108643520 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 Audio::MixerImpl::playStream(Audio::Mixer::SoundType, Audio::SoundHandle*, Audio::AudioStream*, int, unsigned char, signed char, DisposeAfterUse::Flag, bool, bool) mixer.cpp:295 (scummvm:arm64+0x100633604) #2 Audio::EmulatedChip::startCallbacks(int) chip.cpp:145 (scummvm:arm64+0x100626af0) #3 virtual thunk to Audio::EmulatedChip::startCallbacks(int) chip.cpp (scummvm:arm64+0x100626b58) #4 Audio::Chip::start(Common::Functor0*, int) chip.cpp:31 (scummvm:arm64+0x10062569c) #5 OPL::OPL::start(Common::Functor0*) fmopl.h:154 (scummvm:arm64+0x100617ddc) #6 MidiDriver_ADLIB::open() adlib.cpp:1469 (scummvm:arm64+0x1006179c4) #7 Touche::MidiPlayer::MidiPlayer() midi.cpp:48 (scummvm:arm64+0x1000590bc) #8 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #9 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #10 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #11 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #12 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #13 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #14 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race mixer.cpp:642 in Audio::Channel::updateChannelVolumes() ================== ================== WARNING: ThreadSanitizer: data race (pid=74345) Read of size 2 at 0x000108643536 by thread T14 (mutexes: write M0, write M1): #0 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633ed4) #1 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #2 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #3 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #4 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Previous write of size 2 at 0x000108643536 by main thread: #0 Audio::Channel::updateChannelVolumes() mixer.cpp:641 (scummvm:arm64+0x100636cec) #1 Audio::Channel::notifyGlobalVolChange() mixer.cpp:141 (scummvm:arm64+0x100634690) #2 Audio::MixerImpl::muteSoundType(Audio::Mixer::SoundType, bool) mixer.cpp:379 (scummvm:arm64+0x1006345e4) #3 Engine::defaultSyncSoundSettings() engine.cpp:862 (scummvm:arm64+0x1000abdc4) #4 Engine::syncSoundSettings() engine.cpp:840 (scummvm:arm64+0x1000b1518) #5 Touche::ToucheEngine::syncSoundSettings() touche.cpp:342 (scummvm:arm64+0x100071068) #6 Touche::ToucheEngine::run() touche.cpp:200 (scummvm:arm64+0x10006ecbc) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 112 at 0x000108643520 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 Audio::MixerImpl::playStream(Audio::Mixer::SoundType, Audio::SoundHandle*, Audio::AudioStream*, int, unsigned char, signed char, DisposeAfterUse::Flag, bool, bool) mixer.cpp:295 (scummvm:arm64+0x100633604) #2 Audio::EmulatedChip::startCallbacks(int) chip.cpp:145 (scummvm:arm64+0x100626af0) #3 virtual thunk to Audio::EmulatedChip::startCallbacks(int) chip.cpp (scummvm:arm64+0x100626b58) #4 Audio::Chip::start(Common::Functor0*, int) chip.cpp:31 (scummvm:arm64+0x10062569c) #5 OPL::OPL::start(Common::Functor0*) fmopl.h:154 (scummvm:arm64+0x100617ddc) #6 MidiDriver_ADLIB::open() adlib.cpp:1469 (scummvm:arm64+0x1006179c4) #7 Touche::MidiPlayer::MidiPlayer() midi.cpp:48 (scummvm:arm64+0x1000590bc) #8 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #9 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #10 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #11 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #12 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #13 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #14 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race mixer.cpp:719 in Audio::Channel::mix(short*, unsigned int) ================== ================== WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=74345) Write of size 8 at 0x0001079638e0 by main thread: #0 StdioStream::~StdioStream() stdiostream.cpp:51 (scummvm:arm64+0x1001b9b28) #1 PosixIoStream::~PosixIoStream() posix-iostream.h:30 (scummvm:arm64+0x10024a820) #2 PosixIoStream::~PosixIoStream() posix-iostream.h:30 (scummvm:arm64+0x10024a6d0) #3 PosixIoStream::~PosixIoStream() posix-iostream.h:30 (scummvm:arm64+0x10024a730) #4 Common::File::close() file.cpp:102 (scummvm:arm64+0x1006b6acc) #5 Touche::ToucheEngine::res_closeDataFile() resource.cpp:86 (scummvm:arm64+0x10005f718) #6 Touche::ToucheEngine::run() touche.cpp:212 (scummvm:arm64+0x10006edfc) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Previous read of size 8 at 0x0001079638e0 by thread T14 (mutexes: write M0, write M1): #0 Common::File::eos() const file.cpp:122 (scummvm:arm64+0x1006b6e40) #1 Audio::VocStream::fillBuffer(int) voc.cpp:173 (scummvm:arm64+0x100668d48) #2 Audio::VocStream::readBuffer(short*, int) voc.cpp:91 (scummvm:arm64+0x100668a34) #3 Audio::RateConverter_Impl::interpolateConvert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:218 (scummvm:arm64+0x10063de1c) #4 Audio::RateConverter_Impl::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:295 (scummvm:arm64+0x10063d48c) #5 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633f20) #6 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #7 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #8 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #9 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Location is heap block of size 32 at 0x0001079638e0 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 PosixIoStream::makeFromPath(Common::String const&, StdioStream::WriteMode)::'lambda'(void*)::operator()(void*) const posix-iostream.h:34 (scummvm:arm64+0x1002498a0) #2 PosixIoStream::makeFromPath(Common::String const&, StdioStream::WriteMode)::'lambda'(void*)::__invoke(void*) posix-iostream.h:33 (scummvm:arm64+0x10024984c) #3 StdioStream::makeFromPathHelper(Common::String const&, StdioStream::WriteMode, StdioStream* (*)(void*)) stdiostream.cpp:198 (scummvm:arm64+0x1001baa68) #4 PosixIoStream::makeFromPath(Common::String const&, StdioStream::WriteMode) posix-iostream.h:33 (scummvm:arm64+0x100248db8) #5 POSIXFilesystemNode::createReadStream() posix-fs.cpp:269 (scummvm:arm64+0x100248d14) #6 Common::FSNode::createReadStream() const fs.cpp:248 (scummvm:arm64+0x1006b880c) #7 Common::FSDirectory::createReadStreamForMember(Common::Path const&) const fs.cpp:386 (scummvm:arm64+0x1006bbd28) #8 Common::SearchSet::createReadStreamForMember(Common::Path const&) const archive.cpp:515 (scummvm:arm64+0x1006a15d0) #9 Common::File::open(Common::Path const&, Common::Archive&) file.cpp:50 (scummvm:arm64+0x1006b6418) #10 Common::File::open(Common::Path const&) file.cpp:41 (scummvm:arm64+0x1006b62f8) #11 Touche::ToucheEngine::res_loadSpeech(int) resource.cpp:625 (scummvm:arm64+0x10006497c) #12 Touche::ToucheEngine::op_loadSpeechSegment() opcodes.cpp:1017 (scummvm:arm64+0x10005eda8) #13 Touche::ToucheEngine::executeScriptOpcode(short) touche.cpp:712 (scummvm:arm64+0x100076840) #14 Touche::ToucheEngine::runCurrentKeyCharScript(int) touche.cpp:690 (scummvm:arm64+0x100075ef4) #15 Touche::ToucheEngine::setupNewEpisode() touche.cpp:606 (scummvm:arm64+0x100072ef0) #16 Touche::ToucheEngine::runCycle() touche.cpp:484 (scummvm:arm64+0x1000716e0) #17 Touche::ToucheEngine::mainLoop() touche.cpp:376 (scummvm:arm64+0x10006f2fc) #18 Touche::ToucheEngine::run() touche.cpp:209 (scummvm:arm64+0x10006edec) #19 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #20 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #21 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #22 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) stdiostream.cpp:51 in StdioStream::~StdioStream() ================== ================== WARNING: ThreadSanitizer: data race (pid=74345) Read of size 8 at 0x00010952e088 by thread T14 (mutexes: write M0, write M1): #0 MidiDriver_ADLIB::onTimer() adlib.cpp:1649 (scummvm:arm64+0x100617f64) #1 Common::Functor0Mem::operator()() const func.h:397 (scummvm:arm64+0x10061d9d0) #2 Audio::EmulatedChip::readBuffer(short*, int) chip.cpp:127 (scummvm:arm64+0x1006268e4) #3 Audio::RateConverter_Impl::copyConvert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:109 (scummvm:arm64+0x10063d7f0) #4 Audio::RateConverter_Impl::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:290 (scummvm:arm64+0x10063d3d8) #5 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633f20) #6 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #7 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #8 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #9 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Previous write of size 8 at 0x00010952e088 by main thread (mutexes: write M2): #0 MidiDriver_ADLIB::mcOff(AdLibVoice*) adlib.cpp:1686 (scummvm:arm64+0x1006164a4) #1 MidiDriver_ADLIB::partKeyOff(AdLibPart*, unsigned char) adlib.cpp:1951 (scummvm:arm64+0x1006143cc) #2 AdLibPart::noteOff(unsigned char) adlib.cpp:1044 (scummvm:arm64+0x1006142c8) #3 MidiDriver_ADLIB::send(signed char, unsigned int) adlib.cpp:1515 (scummvm:arm64+0x1006184f0) #4 AdLibPart::send(unsigned int) adlib.cpp:1037 (scummvm:arm64+0x100614264) #5 Audio::MidiPlayer::sendToChannel(unsigned char, unsigned int) midiplayer.cpp:121 (scummvm:arm64+0x100632590) #6 Audio::MidiPlayer::send(unsigned int) midiplayer.cpp:110 (scummvm:arm64+0x1006323e8) #7 Touche::MidiPlayer::send(unsigned int) midi.cpp:104 (scummvm:arm64+0x10005986c) #8 MidiParser::sendToDriver(unsigned int) midiparser.cpp:89 (scummvm:arm64+0x10062ea48) #9 MidiParser::sendToDriver(unsigned char, unsigned char, unsigned char) midiparser.h:352 (scummvm:arm64+0x10062f3f4) #10 MidiParser::allNotesOff() midiparser.cpp:337 (scummvm:arm64+0x100630a68) #11 MidiParser::stopPlaying() midiparser.cpp:402 (scummvm:arm64+0x10063093c) #12 MidiParser::unloadMusic() midiparser.cpp:537 (scummvm:arm64+0x1006316a0) #13 Audio::MidiPlayer::stop() midiplayer.cpp:166 (scummvm:arm64+0x100632920) #14 Touche::ToucheEngine::stopMusic() touche.cpp:3463 (scummvm:arm64+0x10006e8b0) #15 Touche::ToucheEngine::~ToucheEngine() touche.cpp:186 (scummvm:arm64+0x10006e6c8) #16 Touche::ToucheEngine::~ToucheEngine() touche.cpp:185 (scummvm:arm64+0x10006ebd4) #17 Touche::ToucheEngine::~ToucheEngine() touche.cpp:185 (scummvm:arm64+0x10006ec1c) #18 AdvancedMetaEngine::deleteInstance(Engine*, DetectedGame const&, void const*) advancedDetector.h:722 (scummvm:arm64+0x100057adc) #19 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:324 (scummvm:arm64+0x1000217f0) #20 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #21 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #22 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 7512 at 0x00010952e000 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 AdLibEmuMusicPlugin::createInstance(MidiDriver**, unsigned int) const adlib.cpp:2319 (scummvm:arm64+0x10061c8bc) #2 MidiDriver::createMidi(unsigned int) mididrv.cpp:408 (scummvm:arm64+0x10062ab2c) #3 Touche::MidiPlayer::MidiPlayer() midi.cpp:47 (scummvm:arm64+0x100059078) #4 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #5 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #6 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #7 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #8 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #9 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #10 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M2 (0x0001077328c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MidiPlayer::MidiPlayer() midiplayer.cpp:29 (scummvm:arm64+0x100631a0c) #9 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x100058f44) #10 Touche::MidiPlayer::MidiPlayer() midi.cpp:43 (scummvm:arm64+0x1000591dc) #11 Touche::ToucheEngine::initMusic() touche.cpp:3433 (scummvm:arm64+0x10006ef74) #12 Touche::ToucheEngine::run() touche.cpp:197 (scummvm:arm64+0x10006eca4) #13 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #14 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #15 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #16 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race adlib.cpp:1649 in MidiDriver_ADLIB::onTimer() ================== ================== WARNING: ThreadSanitizer: data race (pid=74345) Read of size 8 at 0x00011a32f268 by thread T14 (mutexes: write M0, write M1): #0 Common::File::read(void*, unsigned int) file.cpp:141 (scummvm:arm64+0x1006b7194) #1 Audio::VocStream::fillBuffer(int) voc.cpp:160 (scummvm:arm64+0x100668c58) #2 Audio::VocStream::readBuffer(short*, int) voc.cpp:91 (scummvm:arm64+0x100668a34) #3 Audio::RateConverter_Impl::interpolateConvert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:218 (scummvm:arm64+0x10063de1c) #4 Audio::RateConverter_Impl::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short) rate.cpp:295 (scummvm:arm64+0x10063d48c) #5 Audio::Channel::mix(short*, unsigned int) mixer.cpp:719 (scummvm:arm64+0x100633f20) #6 Audio::MixerImpl::mixCallback(unsigned char*, unsigned int) mixer.cpp:331 (scummvm:arm64+0x100633b50) #7 SdlMixerManager::callbackHandler(unsigned char*, int) sdl-mixer.cpp:203 (scummvm:arm64+0x100234b3c) #8 SdlMixerManager::sdlCallback(void*, unsigned char*, int) sdl-mixer.cpp:210 (scummvm:arm64+0x100234a40) #9 outputCallback :106956544 (libSDL2-2.0.0.dylib:arm64+0xce0a0) Previous write of size 8 at 0x00011a32f268 by main thread: #0 Common::File::close() file.cpp:103 (scummvm:arm64+0x1006b6adc) #1 Touche::ToucheEngine::res_closeDataFile() resource.cpp:86 (scummvm:arm64+0x10005f718) #2 Touche::ToucheEngine::run() touche.cpp:212 (scummvm:arm64+0x10006edfc) #3 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:311 (scummvm:arm64+0x1000216e8) #4 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #5 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #6 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Location is heap block of size 22776 at 0x00011a32a000 allocated by main thread: #0 operator new(unsigned long) :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x84210) #1 ToucheMetaEngine::createInstance(OSystem*, Engine**, ADGameDescription const*) const metaengine.cpp:72 (scummvm:arm64+0x1000565e8) #2 AdvancedMetaEngine::createInstance(OSystem*, Engine**, void const*) const advancedDetector.h:718 (scummvm:arm64+0x100057c98) #3 AdvancedMetaEngineBase::createInstance(OSystem*, Engine**, DetectedGame const&, void const*) advancedDetector.cpp:1180 (scummvm:arm64+0x100097ba0) #4 runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) main.cpp:217 (scummvm:arm64+0x100021044) #5 scummvm_main main.cpp:796 (scummvm:arm64+0x10001ec30) #6 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #7 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M0 (0x00010770c580) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Mutex M1 (0x00010772a1c0) created at: #0 pthread_mutex_init :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x3181c) #1 SDL_CreateMutex_REAL :106956544 (libSDL2-2.0.0.dylib:arm64+0xb98cc) #2 SdlMutexInternal::SdlMutexInternal() sdl-mutex.cpp:34 (scummvm:arm64+0x1002353a8) #3 createSdlMutexInternal() sdl-mutex.cpp:45 (scummvm:arm64+0x100235360) #4 OSystem_SDL::createMutex() sdl.cpp:749 (scummvm:arm64+0x10000a708) #5 virtual thunk to OSystem_SDL::createMutex() sdl.cpp (scummvm:arm64+0x10000a76c) #6 Common::Mutex::Mutex() mutex.cpp:30 (scummvm:arm64+0x1006d1ba4) #7 Common::Mutex::Mutex() mutex.cpp:28 (scummvm:arm64+0x1006d1c10) #8 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632b5c) #9 Audio::MixerImpl::MixerImpl(unsigned int, bool, unsigned int) mixer.cpp:200 (scummvm:arm64+0x100632ddc) #10 SdlMixerManager::init() sdl-mixer.cpp:122 (scummvm:arm64+0x100234430) #11 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #12 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #13 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #14 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #15 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #16 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #17 start :63964016 (dyld:arm64e+0xfffffffffff4d150) Thread T14 (tid=3440314, running) created by main thread at: #0 pthread_create :110107680 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x309d8) #1 SDL_SYS_CreateThread :106956544 (libSDL2-2.0.0.dylib:arm64+0xb9314) #2 OSystem_SDL::initBackend() sdl.cpp:331 (scummvm:arm64+0x1000077a0) #3 OSystem_POSIX::initBackend() posix.cpp:92 (scummvm:arm64+0x1000126cc) #4 OSystem_MacOSX::initBackend() macosx.cpp:121 (scummvm:arm64+0x100015834) #5 virtual thunk to OSystem_MacOSX::initBackend() macosx.cpp (scummvm:arm64+0x10001588c) #6 scummvm_main main.cpp:554 (scummvm:arm64+0x10001e498) #7 scummvm_main main.cpp:399 (scummvm:arm64+0x10001d30c) #8 start :63964016 (dyld:arm64e+0xfffffffffff4d150) SUMMARY: ThreadSanitizer: data race file.cpp:141 in Common::File::read(void*, unsigned int) ================== Assertion failed: (_handle), function read, file file.cpp, line 141. Abort trap: 6