~/wiki / novosti / codex-fixed-frostpunk-crash-macos-openal-patch

I asked Codex to fix ForstPunk on MacOs Tahoe. He compiled the library from the source books and patched the binary

◷ 8 min read 6/3/2026

Main chat

A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.

$ cd section/ $ join vibe dev
I asked Codex to fix ForstPunk on MacOs Tahoe. He compiled the library from the source books and patched the binary - обложка

Frostpunk fell with every loss. I didn't hang out, I didn't make a mistake, I just flew out instantly when the city was about to collapse. Every time. On macOS Tahoe Beta 26.5, on Apple Silicon, via Rosetta.

Standard advice from the Internet did not help. Support for the game was silent. I opened up Codex and wrote, ‘The game is always making makeup, figure it out.’.

Within hours, the game was working. Codex collected the desired library from the source codes and patched the binary. That's how it was.

Diagnosis: where exactly falls

Codex first read the crash report. It’s no longer trivial – a stack trace system crash looks like a wall of text, and most people don’t know what to do with it.

code
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Crashed Thread: Audio Thread
  SoundEngine::Update()
    OpenAL / AudioToolbox
      alSourceQueueBuffers
      alDeleteSources

Agent's verdict: The game doesn't fall in graphics, memory, or saves. Falls in the audio stack – exactly in the system implementation of OpenAL from Apple, when trying to queue the sound of loss. Old game (2018), new macOS (Tahoe Beta), incompatibility.

The specific reason for the search, which Codex formulated himself:

Frostpunk 1.1.1 GOG Mac crashes on game over in SoundEngine / OpenAL / AudioToolbox, EXC BAD INSTRUCTION SIGILL, triggered by sequences/sequence gameover.ogg on macOS 26.5 Tahoe beta under Rosetta.

Attempt 1: Virtual audio device

The first hypothesis is the incompatibility of the sampling frequency. The system OpenAL may have fallen due to the game trying to give 16kHz audio to a stack tuned to 44.1kHz.

Codex has installed BlackHole, a virtual audio driver that can be forced to set any frequency:

bash копировать
brew install blackhole-2ch
# after the reboot
SwitchAudioSource - BlackHole 2ch
sudo defaults write /Library/Preferences/Audio/com.apple.audio.SystemSettings \
"Default Sample Rate" -float 16000

BlackHole is up, the frequency is set at 16000 Hz, Frostpunk is launched. The game fell at exactly the same moment.

The hypothesis was not confirmed. It’s not about frequency, it’s about the implementation of Apple OpenAL on the new macOS.

Attempt 2: Replace OpenAL altogether

OpenAL is an open standard. In addition to the system implementation of Apple, there is OpenAL Soft - a cross-platform open-source alternative that is used by thousands of games for compatibility.

The idea: get Frostpunk to load OpenAL Soft instead of Apple OpenAL. If the fall in systemic implementation, it will go away.

bash копировать
brew install openal-soft

Codex put and immediately checked the architecture:

bash копировать
file /opt/homebrew/lib/libopenal.dylib
# libopenal.dylib: Mach-O 64-bit dynamically linked shared library arm64

Problem: Homebrew on Apple Silicon installs arm64 libraries. Frostpunk is an old game, x86 64, launched via Rosetta. Arm64 library can't be physically downloaded - different architectures.

Key step: assembling x86 64 from source materials

There is no ready x86 64 package. Codex decided to build OpenAL Soft itself – from the source code, with an explicit indication of the target architecture.

bash копировать
git clone --depth 1 --branch 1.25.2 \
  https://github.com/kcat/openal-soft.git /tmp/openal-soft-frostpunk

cmake -S /tmp/openal-soft-frostpunk \
  -B /tmp/openal-soft-frostpunk/build-x86 \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_OSX_ARCHITECTURES=x86_64 \
  -DCMAKE_INSTALL_PREFIX=/tmp/openal-soft-frostpunk/install-x86 \
  -DALSOFT_UTILS=OFF -DALSOFT_EXAMPLES=OFF -DALSOFT_TESTS=OFF

The assembly fell by mistake. Xcode in Tahoe turns the -Wfunction-effects warning into a compilation error - a new rigor of the new compiler that OpenAL Soft's creators simply didn't know about when 1.25.2 was released.

Codex found a line in CMakeLists.txt that added a flag and deleted it:

bash копировать
# Find a line in the CMake file
grep -n "Werror=function-effects"
/tmp/openal soft-frostpunk/CMakeLists.txt

# Delete it sed-om.
sed -i '/Werror=function-effects/d'
/tmp/openal soft-frostpunk/CMakeLists.txt

The reassembly was successful:

bash копировать
cmake --build /tmp/openal-soft-frostpunk/build-x86 --parallel 4
cmake --install /tmp/openal-soft-frostpunk/build-x86

file /tmp/openal-soft-frostpunk/install-x86/lib/libopenal.1.25.2.dylib
# libopenal.1.25.2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

**x86 64. That's right. **

Binary patch: substitution of dependence

Now you have to say to Frostpunk: do not load /System/Library/Frameworks/OpenAL.framework, load our library. To do this, there is a tool install_name_tool - it is built into macOS and allows you to change the paths to dynamic libraries directly in the binary.

Codex didn't touch the original game in /Applications - created a test copy and patched it:

bash копировать
app='/Users/a/Applications/Frostpunk-nosound.app'
exe="$app/Contents/MacOS/Frostpunk"
fw="$app/Contents/Frameworks"

# Save the original binary
cp -p "$exe" "$exe.apple-openal-backup-$(date +%Y%m%d-%H%M%S)"

# Copy our library inside the application
cp /tmp/openal-soft-frostpunk/install-x86/lib/libopenal. 1.25.2.dylib\
"$fw/libopenal. 1.25. 2.dylib
ln -sf libopenal. 1.25.2.dylib "$fw/libopenal. 1.dylib
ln -sf libopenal. 1.dylib "$fw/libopenal.dylib"

# Tell the library what it's called inside the bundle
install name tool -id \
'@executable path/.. /Frameworks/libopenal. 1.dylib'
"$fw/libopenal. 1.25. 2.dylib

# Say binary: instead of Apple OpenAL load our
install name tool -change \
'/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL'
'@executable path/.. /Frameworks/libopenal. 1.dylib'
"$exe."

Codex then re-signed the modified ad-hoc files (otherwise macOS would refuse to run):

bash копировать
codesign --force --sign - "$fw/libopenal.1.25.2.dylib"
codesign --force --deep --sign - "$app"

Check - the dependence has changed:

bash копировать
otool -L "$exe" | grep -i openal
# @executable_path/../Frameworks/libopenal.1.dylib

The Apple OpenAL system is no longer connected. Instead, it’s our OpenAL Soft 1.25.2.

The result

bash копировать
open -n '/Users/a/Applications/Frostpunk-nosound.app'
The trial is alive. No new crash report.

Frostpunk started. The moment of loss has passed – the one where I flew every time before. Didn't fall.

# What Codex did on its own

If you list the steps that the agent performed without human intervention:

  • Read the crash report and determine the exact component of the fall
  • Created a search query for diagnosis
  • Installed and tested BlackHole (Hypothesis 1)
  • Discovered incompatibility of architectures (arm64 vs x86 64)
  • Cloned OpenAL Soft repository and assembled x86 64 version
  • Found and fixed a compiler error in CMakeLists.txt
  • Created a test copy of the application (not touching the original)
  • Used install_name_tool to replace addiction
  • Re-signed the annex
  • Checked the results

No step required explanation or clarification. I just said "fell" and "ready.".

Why is it important

The dynamic library patch, install_name_tool, and CMake architecture-specific assembly are tasks that used to require either deep experience in system programming on macOS, or several hours of search on Stack Overflow and 4PDA. Most users would simply delete the game.

Codex went this way in one session, including debugging compiler errors in someone else’s code. It's not an assistant anymore, it's an agent who takes the task and goes all the way.

The same approach works for any old game or application that falls due to incompatibility of system libraries on the new macOS. Recipe:

  1. Find the name of the fallen library in the crash report.
  2. Find an open-source replacement.
  3. Put it under the right architecture.
  4. Replace with install_name_tool.

Codex will do it for you.


Related Case: Codex подключился к телевизору и починил мультики - how an agent found a closed WebSocket protocol and diagnosed a TV through it. *

$ cd ../ ← back to News