macOS 26 (Tahoe) on Apple Silicon: deterministic crash in OpenAL/AudioToolbox — workaround via OpenAL Soft

Make all T-Engine/ToME 4 bug reports here

Moderator: Moderator

Post Reply
Message
Author
HelloThere
Posts: 1
Joined: Tue Apr 28, 2026 10:12 am

macOS 26 (Tahoe) on Apple Silicon: deterministic crash in OpenAL/AudioToolbox — workaround via OpenAL Soft

#1 Post by HelloThere »

Hello everyone, after digging with Claude Opus 4.7, I was able to play the game without new crashes, here is Claude's report (yes it's AI generated, but thought it was nicer to be transparent with you all, and thanks for the game :D) :

---

Posting this in case other Mac users hit the same crash, and to flag it for fixing in a future build.

Setup
ToME 1.7.6 (Steam build)
MacBook Pro (M1 Pro, Apple Silicon)
macOS 26.4.1 (Tahoe)
Game runs via Rosetta 2 (x86_64 binary translated to arm64)

Symptom
The game crashes deterministically after a few minutes of gameplay. Reproduces on a clean save with no addons. Disabling sound in the in-game options menu does not stop the crashes. Setting audio.enable = false in ~/Library/Application Support/T-Engine/4.0/settings/audio.cfg also does not stop it — sound source objects still get created in Lua and the crash happens during their cleanup.

Crash signature
Always the same stack trace, inside Apple's deprecated OpenAL framework calling into AudioToolbox:
sourceCollectLua (t-engine)
→ alDeleteSources (OpenAL)
→ OALContext::RemoveSource
→ OALContext::CleanUpDeadSourceList
→ OALSource::~OALSource
→ ACMap::RemoveAllConverters
→ AudioConverterDispose (AudioToolboxCore)
→ ... → ExtendedAudioBufferList_Destroy
→ CRASH (EXC_BAD_INSTRUCTION)
The first crashes I had hit on soundNewSource (the source creation path). Once a source has been created, crashes also happen on sourceCollectLua (Lua GC finalizing the source via alDeleteSources). Both paths bottom out in the same AudioToolbox bug.

Cause
Apple's system OpenAL framework is broken under Rosetta on macOS 26. OpenAL has been deprecated by Apple since 2018 and barely maintained since; recent CoreAudio/AudioToolbox internal changes in Tahoe appear to have made it fully non-functional for translated x86_64 processes.

Workaround
Patching the t-engine binary to load OpenAL Soft (the standard cross-platform OpenAL implementation) instead of Apple's framework fully resolves the crashes. Audio works normally afterwards.
bashcd /path/to/T-Engine.app/Contents/MacOS/

# Backup the original binary first
cp t-engine t-engine.backup

# Rewrite the OpenAL framework reference to point at OpenAL Soft
install_name_tool -change \
/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL \
/usr/local/opt/openal-soft/lib/libopenal.1.dylib \
t-engine

# Re-sign (install_name_tool invalidates the existing code signature)
codesign --force --sign - t-engine

Important: OpenAL Soft must be installed via x86_64 Homebrew (at /usr/local/, not /opt/homebrew/), because t-engine is an x86_64 binary running under Rosetta. The arm64 OpenAL Soft from native Apple Silicon Homebrew will fail to load with an architecture mismatch error.

If you don't already have x86_64 Homebrew, install it with:
basharch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homeb ... install.sh)"
arch -x86_64 /usr/local/bin/brew install openal-soft

Note that Steam's "Verify integrity of game files" will undo the patch (Steam re-downloads the original binary), as will any game update. Keeping the two install_name_tool and codesign commands as a quick re-apply script is convenient.

Suggested upstream fix
Bundling OpenAL Soft inside T-Engine.app/Contents/Frameworks/ and linking against it (instead of Apple's deprecated system OpenAL framework) would fix this for all Mac users. OpenAL Soft is LGPL, actively maintained, and a clean drop-in. Shipping as a Universal binary (arm64 + x86_64) would additionally let the game run natively on Apple Silicon and avoid the Rosetta path entirely.

This is the path most modern Mac games have taken since Apple deprecated OpenAL.

---

Happy to provide the full crash reports or test a candidate build if that helps.

Post Reply