Post not yet marked as solved
Post marked as unsolved with 1 replies, 623 views
My users are reporting crashes with my macOS audiounit. The crash seems related to colorspaces (log at bottom).
Recently I added the following code to change the windows colorspace in 'viewDidMoveToWindow' like so...
						colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear);
						nsColorSpace = [[NSColorSpace alloc] initWithCGColorSpace:colorSpace];
						[window setColorSpace:nsColorSpace];
My intention with using a linear colorspace is to achieve nice gradients and alpha-blending with gamma-correct results.
I suspect that this colorspace might not be supported on the older versions of macOS? or maybe the problem is with particular graphics hardware? but I'm not sure. I don't mind too much if I have to fallback to a less nice option on older OS's.
Any suggestions on how to fix this appreciated.
crash log...
Process:
Hosting AU [1180]
Path:
/Applications/Hosting AU.app/Contents/MacOS/Hosting AU
Identifier:
com.ju-x.Hosting-AU
Version: .0 (???)
Code
Type:
X86-64 (Native)
Parent Process: ??? [1]
Responsible:
Hosting AU [1180]
User
ID:
501
Date/Time:
2021-01-17 17:27:52.002 +1100
OS Version:
Mac OS X 10.13.6 (17G11023)
Report Version: 12
Anonymous UUID: 179E637B-DFF1-4648-6107-37F34D372CE1
Time Awake Since Boot: 1100 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch
queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000,
0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
Assertion failed: (CGColorSpaceGetIdentifier(space) == id), function
add_color_space, file
/BuildRoot/Library/Caches/com.apple.xbs/Sources/SkyLight/SkyLight-312.103.11/SkyLight/Services/Connection/CGSColorSpaceRegistry.cc,
line 86.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib
0x00007fff736a7b66 __pthread_kill + 10
1 libsystem_pthread.dylib
0x00007fff73872080 pthread_kill + 333
2
libsystem_c.dylib
0x00007fff736031ae abort + 127
3
libsystem_c.dylib
0x00007fff735cb1ac __assert_rtn + 320
4
com.apple.SkyLight
0x00007fff6d311248 CGSColorSpaceRegistryAddColorSpace 776
5
com.apple.SkyLight
0x00007fff6d39aa27 SLSSetSurfaceColorSpace + 87
6
com.apple.AppKit
0x00007fff48cf2473
NSCGSWindowLayerSurfaceMarkblock_invoke + 411
7
com.apple.AppKit
0x00007fff48cbbeed
NSCGSTransactionRunPreCommitActionsForOrder_ + 280
8
com.apple.AppKit
0x00007fff48cbbdc2
NSCGSTransactionRunPreCommitActions_ + 31
9
com.apple.AppKit
0x00007fff48cbbd97 __39+[_NSCGSTransaction
currentTransaction]_block_invoke + 34
10 com.apple.QuartzCore
0x00007fff5696c877
CA::Transaction::run_commit_handlers(CATransactionPhase) + 49
11 com.apple.QuartzCore
0x00007fff5696bd3b
CA::Context::commit_transaction(CA::Transaction*) + 1449
12 com.apple.QuartzCore
0x00007fff5696b475 CA::Transaction::commit() + 487
13
com.apple.AppKit
0x00007fff4947fa72
__65+[CATransaction(NSCATransaction)
NS_setFlushesWithDisplayRefresh]_block_invoke + 283
14 com.apple.CoreFoundation
0x00007fff4b60f257
CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
15 com.apple.CoreFoundation
0x00007fff4b60f17f __CFRunLoopDoObservers + 527
16 com.apple.CoreFoundation
0x00007fff4b5f16f8 __CFRunLoopRun + 1240
17 com.apple.CoreFoundation
0x00007fff4b5f0f93 CFRunLoopRunSpecific + 483
18
com.apple.HIToolbox
0x00007fff4a8dbd96 RunCurrentEventLoopInMode + 286
19
com.apple.HIToolbox
0x00007fff4a8dba0f ReceiveNextEventCommon + 366
20
com.apple.HIToolbox
0x00007fff4a8db884
_BlockUntilNextEventMatchingListInModeWithFilter + 64
21
com.apple.AppKit
0x00007fff48b88a3b _DPSNextEvent + 2085
22
com.apple.AppKit
0x00007fff4931ee34 -[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
23
com.apple.AppKit
0x00007fff48b7d84d -[NSApplication run] + 764
24
com.apple.AppKit
0x00007fff48b4ca3a NSApplicationMain + 804
25
com.ju-x.Hosting-AU
0x00000001000015f0 0x100000000 + 5616