AMD-OSX / bugtracker

AMD OS X Bugtracker
13 stars 2 forks source link

Crashes on com.apple.audio.IOThread.client for some apps. #29

Closed fhh200000 closed 4 years ago

fhh200000 commented 4 years ago

CPU: AMD A8-5600k APU . macOS version: 10.14.6 (18G87)& 10.15.1(19B88).
15h/16h or 17h: 15h/16h I am using and can reproduce on the latest patches: commit a071593092de8226329c904970dd0837c13eea87 .

Describe the bug Please forgive my poor English.
Hello there, I have a HD7750 1GB graphic card and I want to enable its HDMI Audio.
Both 10.14.6 and 10.15.1 can't support my HDMI Audio hardware natively(0x1002,0xAAB0),so I tried two methods:
1.Use AppleALC.kext to make it recognized by Mac.
2.Use the last working version of AppleHDA(from 10.13.3) to replace the original one entirely.
Both of the two methods work and I can get sound via HDMI.
However, when I open some music app (netease music from China), or open Quicktime Player to play some video, the whole application will crash and end with the same crash report:

Crashed Thread:        23  com.apple.audio.IOThread.client

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [24734]

.......

Thread 23 Crashed:: com.apple.audio.IOThread.client
0   libvDSP.dylib                   0x00007fff332f1d2d 0x7fff332d6000 + 113965
1   com.apple.audio.units.Components    0x0000000119924dfd 0x119800000 + 1199613
2   com.apple.audio.units.Components    0x0000000119924a43 0x119800000 + 1198659
3   com.apple.audio.units.Components    0x0000000119925c59 0x119800000 + 1203289
4   com.apple.audio.units.Components    0x000000011992435e 0x119800000 + 1196894
5   com.apple.audio.units.Components    0x0000000119923326 0x119800000 + 1192742
6   com.apple.audio.units.Components    0x000000011992196d 0x119800000 + 1186157
7   com.apple.audio.units.Components    0x000000011982ba13 0x119800000 + 178707
8   com.apple.audio.units.Components    0x00000001198dbe5e 0x119800000 + 900702
9   com.apple.audio.toolbox.AudioToolbox    0x00007fff348f6da2 XAudioUnit::Render(unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) + 52
10  com.apple.audio.toolbox.AudioToolbox    0x00007fff348f6a72 MEOutputStreamClient::IO_PerformOutput(int, AudioBufferList&, AudioTimeStamp const&) + 254
11  com.apple.audio.toolbox.AudioToolbox    0x00007fff348f38f7 AQMEIO_HAL::IOProc(AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*) + 5065
12  com.apple.audio.toolbox.AudioToolbox    0x00007fff348f251d AQMEIO_HAL::_IOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 99
13  com.apple.audio.CoreAudio       0x00007fff35bec00f invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 5666
14  com.apple.audio.CoreAudio       0x00007fff35d2161c HALB_IOThread::Entry(void*) + 72
15  libsystem_pthread.dylib         0x00007fff6dba7d36 _pthread_start + 125
16  libsystem_pthread.dylib         0x00007fff6dba458f thread_start + 15

But surprisingly in some applications like Google Chrome, it works fine.
In VLC media player the audio just stuck every 5 seconds or so. The AppleHDA itself is left unpatched.And since I can get pretty good sound using modified XNU kernel in 10.13.3, I think it might be the kernel's problem.
Thank you! Screenshots 截屏2020-01-14下午10 42 58

dhinakg commented 4 years ago

Do you have VoodooHDA? Removing VoodooHDA reportedly fixes this issue.

fhh200000 commented 4 years ago

Do you have VoodooHDA? Removing VoodooHDA reportedly fixes this issue.

No I don't use VoodooHDA, just AppleALC+AppleHDA.
Plus, I tried playing video using ffplay(ffmpeg) from brew, and the audio is good.
Maybe it is only the hardware decoder's problem?

fhh200000 commented 4 years ago

Well I replaced the crashed libvDSP.dylib with the one from 10.13.3, and it now works fine.
(Only left the problem that the audio & video can't always keep in sync, but there are some solutions).
However, I still want to know why I keep receiving this error.
The error report indicates that the problem occurs at this position: 截屏2020-01-16下午6 26 23 Is it because of some missing instruction sets from my CPU?

fhh200000 commented 4 years ago

Anyway after adjusting the bus frequency, The audio seems pretty good.
Apologies for my mistake!

rrroyal commented 4 years ago

libvDSP.dylib grabbed from 10.13 - replace in /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/