Guest User

CrossOver Bug Report — intermittent `c000001d` abort in winecoreaudio audio-unit init

a guest
May 31st, 2026
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.97 KB | None | 0 0
  1. # CrossOver Bug Report — intermittent `c000001d` abort in winecoreaudio audio-unit init (Apple Silicon / macOS 26)
  2.  
  3. ## Summary
  4.  
  5. A 32-bit Windows game (GTA: San Andreas + SA-MP/open.mp) intermittently aborts
  6. the whole process (CRT `abort()`, exit code 3) the moment its audio engine
  7. creates a render audio unit. The crash is an **illegal instruction
  8. (`EXCEPTION_ILLEGAL_INSTRUCTION`, `c000001d`) raised inside the native macOS
  9. CoreAudio/AudioToolbox shared-cache code** that `winecoreaudio.drv` calls into,
  10. which Wine's `mmdevapi` then turns into `assert(!status)` →
  11. `_wassert(..., "mmdevapi_private.h", 120)` → `abort()`.
  12.  
  13. It is **intermittent and timing-dependent**: with the exact same machine,
  14. output device, and negotiated audio format, the same launch succeeds roughly
  15. half the time and aborts the other half. Running Wine with verbose `WINEDEBUG`
  16. logging (which slows execution) makes it succeed far more often, which is the
  17. classic signature of a race / timing-sensitive fault in the emulated CoreAudio
  18. path rather than a format- or device-specific bug.
  19.  
  20. ## Environment
  21.  
  22. | | |
  23. |---|---|
  24. | CrossOver | 26.1.0.39808 |
  25. | macOS | 26.5 (build 25F71) — "Tahoe" |
  26. | Hardware | Apple M1 (arm64) |
  27. | Bottle Windows version | (Rockstar Games Launcher bottle) |
  28. | Game process | 32-bit (i386) — uses `i386-windows/winecoreaudio.drv` |
  29. | App | GTA: San Andreas + SA-MP 0.3.7-R5 / open.mp client |
  30. | Audio driver | `HKCU\Software\Wine\Drivers\Audio = coreaudio` |
  31. | Default output device | USB EarPods, 44100 Hz, stereo |
  32.  
  33. The crash reproduces with both built-in speakers and external USB/Bluetooth
  34. output devices, so it is **not** specific to the built-in audio device.
  35.  
  36. ## The fault
  37.  
  38. The faulting instruction is at a **fixed shared-cache address inside Apple's
  39. audio frameworks**:
  40.  
  41. ```
  42. handle_syscall_fault code=c000001d flags=0 addr=0x7ff81253a0ed ip=7ff81253a0ed tid=0a14
  43. rax=0000000217cf3060 rbx=00007ff84611d9a0 rcx=ffffffffffffefa0 rdx=0000000000001040
  44. rsi=0000000217cf2000 rdi=00007ff84611d9a0 rbp=00000001000ff830 rsp=00000001000ff830
  45. r8=0000000000000000 r9=0000000000000000 r10=0000000000002081 r11=00000000000007fb
  46. r12=0000000000001040 r13=0000000217cf2000 r14=0000600001d9c5c0 r15=00007ff84611d840
  47. handle_syscall_fault returning to user mode ip=000000007bdf1287 ret=c000001d
  48. err:msvcrt:_wassert (L"!status",L"../../wine/dlls/mmdevapi/mmdevapi_private.h",120)
  49. ```
  50.  
  51. Observations about the register state at the fault:
  52.  
  53. - `ip = 0x7ff81253a0ed` is in the dyld **shared cache** (Apple system library
  54. region), i.e. native CoreAudio/AudioToolbox code, **not** Wine code.
  55. - `rsi/r13 = 0x217cf2000` and `rdi/rbx = 0x7ff84611d9a0` look like source and
  56. destination buffer pointers; `rdx = r12 = 0x1040` (4160) looks like a byte
  57. count. This is consistent with a **vectorized (SIMD/AVX) buffer-processing /
  58. resampling instruction** in Apple's audio code that the emulation layer fails
  59. to execute on this particular invocation.
  60. - `ret = c000001d` confirms the kernel/host delivered an illegal-instruction
  61. signal, which Wine surfaced as `EXCEPTION_ILLEGAL_INSTRUCTION`.
  62.  
  63. The `assert(!status)` then fires in `mmdevapi_private.h:120`, the SEH unwind
  64. propagates as a `c0000005` through the game's own DLL frames, and the CRT calls
  65. `abort()`.
  66.  
  67. ## Call sequence immediately before the fault
  68.  
  69. ```
  70. coreaudio:unix_get_mix_format Got channel layout: {tag: 0x0, bitmap: 0x0, num_descs: 2}
  71. coreaudio:dump_adesc final: mSampleRate: 44100.000000
  72. coreaudio:dump_adesc final: mBytesPerPacket: 8
  73. coreaudio:dump_adesc final: mFramesPerPacket: 1
  74. coreaudio:dump_adesc final: mBytesPerFrame: 8
  75. coreaudio:dump_adesc final: mChannelsPerFrame: 2
  76. coreaudio:dump_adesc final: mBitsPerChannel: 32 <-- 32-bit float, 44.1 kHz, stereo
  77. ... 18 ms later ...
  78. seh:handle_syscall_fault code=c000001d ... ip=7ff81253a0ed <-- illegal instruction in native CoreAudio
  79. msvcrt:_wassert (L"!status", mmdevapi_private.h, 120) <-- Wine asserts, process aborts
  80. ```
  81.  
  82. The fault happens during the **creation/initialization of the render audio
  83. unit** (right after `unix_get_mix_format` produced the 32-bit-float descriptor),
  84. **before** `unix_set_volumes` runs.
  85.  
  86. ## Why we believe it is a race, not a format/device bug
  87.  
  88. We captured a **successful** session and a **crashing** session from the same
  89. machine minutes apart, with identical hardware and audio config:
  90.  
  91. | | Successful run (exit 0) | Crashing run (exit 3) |
  92. |---|---|---|
  93. | Output device | EarPods (USB, 44100) | EarPods (USB, 44100) — identical |
  94. | Negotiated format | 44100 / 32-bit float / stereo | 44100 / 32-bit float / stereo — identical |
  95. | `unix_get_mix_format` adesc | same values | same values |
  96. | Outcome | audio unit created, game runs | `c000001d` in CoreAudio → abort |
  97.  
  98. The successful run even builds the audio unit **twice** (initial + a
  99. re-negotiation ~3 s later) and survives both. The only material difference is
  100. **timing** — and verbose `WINEDEBUG` logging (which adds latency around the
  101. audio-unit init) dramatically reduces the crash rate. This strongly points to a
  102. **non-deterministic fault in the emulated execution of Apple's CoreAudio SIMD
  103. code** under specific buffer/timing conditions.
  104.  
  105. ## Reproduction
  106.  
  107. 1. macOS 26.x on Apple Silicon, CrossOver 26.1.
  108. 2. Install GTA: San Andreas + SA-MP/open.mp in a bottle; `Drivers\Audio =
  109. coreaudio`.
  110. 3. Launch the game and connect to a server (audio unit gets created on first
  111. sound playback) — this usually succeeds.
  112. 4. Disconnect and reconnect (forces the audio engine to tear down and
  113. re-create the render audio unit). This re-rolls the dice; it aborts with
  114. exit code 3 a large fraction of the time.
  115.  
  116. Running with `WINEDEBUG=+coreaudio,+mmdevapi,+seh` makes step 4 succeed much
  117. more often, confirming the timing sensitivity.
  118.  
  119. ## What does NOT work around it
  120.  
  121. - Forcing `HKCU\Software\Wine\DirectSound` to `HardwareAcceleration=Emulation`,
  122. `DefaultSampleRate=48000`, `DefaultBitsPerSample=16` — the game's audio still
  123. goes through `mmdevapi`/`coreaudio` and negotiates 44100/32-bit float anyway.
  124. - Switching the default output device (built-in speakers → USB EarPods →
  125. Bluetooth) — the fault is device-independent.
  126. - Setting a different nominal sample rate on the device.
  127.  
  128. ## What would help
  129.  
  130. - A fix in `winecoreaudio.drv` (or the emulation layer) so the native CoreAudio
  131. buffer-processing call at the audio-unit-init path cannot raise an illegal
  132. instruction under emulation, or is retried/guarded.
  133. - Alternatively, having `mmdevapi` treat this CoreAudio failure as a recoverable
  134. error (return a failing `HRESULT` to the caller) instead of `assert(!status)`
  135. → `abort()`, so a single audio-init hiccup does not kill the entire game
  136. process.
  137.  
  138. ## Attached logs
  139.  
  140. Full `WINEDEBUG=+timestamp,+pid,+seh,+unwind,+process,+module,+loaddll,+threadname,+mmdevapi,+coreaudio,err+all,fixme+all`
  141. session logs (one successful, one crashing) are available on request. The
  142. crashing session's relevant excerpt is reproduced above.
  143.  
Advertisement
Add Comment
Please, Sign In to add comment