Crash on macOS Sequoia
Game crashes at startup.
/Volumes/WORK_HDD/Gaming/Games/Testing/OpenGothic.command ; exit; tom@i9-9900K ~ % /Volumes/WORK_HDD/Gaming/Games/Testing/OpenGothic.command ; exit; OpenGothic v1.0 dev no "Gothic.ini" file in path - using default settings
---crashlog(DeviceLostException(device is lost))--- GPU: AMD Radeon RX 6900 XT #1: __cxa_get_exception_ptr - 4 libc++abi.dylib 0x00007ff809ee9237 __cxa_get_exception_ptr + 0 #2: __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) - 5 libc++abi.dylib 0x00007ff809ee921c _ZN10__cxxabiv1L12failed_throwEPNS_15__cxa_exceptionE + 0 #3: Tempest::Detail::MtDevice::handleError(NS::Error*) - 6 libTempest.dylib 0x000000010f6bd357 _ZN7Tempest6Detail8MtDevice11handleErrorEPN2NS5ErrorE + 71 #4: Tempest::Detail::MtCompPipeline::MtCompPipeline(Tempest::Detail::MtDevice&, Tempest::Detail::MtPipelineLay const&, Tempest::Detail::MtShader const&) - 7 libTempest.dylib 0x000000010f663dd1 _ZN7Tempest6Detail14MtCompPipelineC2ERNS0_8MtDeviceERKNS0_13MtPipelineLayERKNS0_8MtShaderE + 609 #5: Tempest::MetalApi::createComputePipeline(Tempest::AbstractGraphicsApi::Device*, Tempest::AbstractGraphicsApi::PipelineLay const&, Tempest::AbstractGraphicsApi::Shader*) - 8 libTempest.dylib 0x000000010f66b048 _ZN7Tempest8MetalApi21createComputePipelineEPNS_19AbstractGraphicsApi6DeviceERKNS1_11PipelineLayEPNS1_6ShaderE + 56 #6: Tempest::Device::pipeline(Tempest::Shader const&) - 9 libTempest.dylib 0x000000010f68ac09 _ZN7Tempest6Device8pipelineERKNS_6ShaderE + 89 #7: Shaders::Shaders() - 10 Gothic2Notr 0x000000010d88d645 _ZN7ShadersC2Ev + 2837 #8: Renderer::Renderer(Tempest::Swapchain&) - 11 Gothic2Notr 0x000000010d8817bd _ZN8RendererC2ERN7Tempest9SwapchainE + 1437 #9: MainWindow::MainWindow(Tempest::Device&) - 12 Gothic2Notr 0x000000010d8a413a _ZN10MainWindowC2ERN7Tempest6DeviceE + 154 #10: main - 13 Gothic2Notr 0x000000010d8a38fb main + 555
zsh: abort /Volumes/WORK_HDD/Gaming/Games/Testing/OpenGothic.command
Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.
Hi, @TomDev234 and thanks for report!
It seem one of the shaders failed to compile on your machine. Unfortunately, it's very hard to tell which one it was - so I've added extra data in error reporting, for Mac.
OpenGothic v1.0 dev
Hm, .dev means custom build - are you building the game from source yourself?
No, not compiled by myself. Here is another crash log with the latest OpenGothic build. opengothic_log.txt
@TomDev234
As mentioned before: unfortunately there is not enough information in crash. Basically all known so far, it that on of compute shaders, that works on M1, cannot be compiled on AMD.
If you can run build from ad81669 - that will be helpful, as not shader name is part of the crash-data.
Also if you still have XCode setup - it's possible to see in debugger, what been compiled as well.
I have build OpenGothic from source. I get this error message. How to run it from Xcode? There is no Xcode project file.
tom@i9-9900K Testing % ./opengothic/Gothic2Notr.sh -g Gothic\ II OpenGothic v1.0 dev no "Gothic.ini" file in path - using default settings unable to load archive: "Gothic II/Data/.DS_Store", reason: VFS disk signature not recognized: "Detected unsupported Union disk"
---crashlog(std::system_error("/Volumes/SRC_SSD/SRC/Build/OpenGothic/shader/ssao/ssao_blur.comp": Compiler encountered an internal error: I)--- GPU: AMD Radeon RX 6900 XT
Hi, @TomDev234 and thanks for update
Compiler encountered an internal error: I
Seem to be a driver bug.
I've reported this issue on apple developer forum, here: https://developer.apple.com/forums/thread/772346
How to run it from Xcode?
Ah, sorry, I've should have mention how to generate it: cmake -H. -Bout/xcode -G Xcode.
Here is a screen shot from Xcode.
Yeah, like I've mention before - driver bug. Filed here https://developer.apple.com/forums/thread/772346 and in Feedback-Assistant. Apple asked:
It would be very helpful if you could attach any MTLCompilerService crash
logs from an affected system, or better yet a sysdiagnose taken immediately after the crash.
and I've proveded shader source to them, so you dont have to.
Here are the MTLCompilerService crash logs. How do I submit the sysdiagnose? It is 311 mb in size. Only 25 mb are allowed here. MTLCompilerService.zip
Thanks for providing crash-logs. I've forwarded them to apple.
It is 311 mb in size.
Given that sysdiagnose is "nice to have" thing, let stick to only compiler logs for now. I has quick look into - it seem to have page-fault and call-stack, so should be enough.
Same problem here. I know nothing about shaders or 3D programming, but the diff below fixed the crash and got the game into playable state without any noticeable glitches:
--- a/shader/ssao/ssao_blur.comp
+++ b/shader/ssao/ssao_blur.comp
@@ -102,9 +102,9 @@ void main() {
}
barrier();
- vec2 vert = blurPass(ivec2(gl_LocalInvocationID.xy), res, ivec2(0,1));
- imageStore(result, ivec2(gl_GlobalInvocationID.xy), vec4(vert.x));
+ // vec2 vert = blurPass(ivec2(gl_LocalInvocationID.xy), res, ivec2(0,1));
+ // imageStore(result, ivec2(gl_GlobalInvocationID.xy), vec4(vert.x));
- // float c = textureLod(ssao, vec2(gl_GlobalInvocationID.xy+vec2(0.5))/vec2(res), 0).r;
- // imageStore(result, ivec2(gl_GlobalInvocationID.xy), vec4(c));
+ float c = textureLod(ssao, vec2(gl_GlobalInvocationID.xy+vec2(0.5))/vec2(res), 0).r;
+ imageStore(result, ivec2(gl_GlobalInvocationID.xy), vec4(c));
}
Similarly, reverting back to this state of the shader from before commit c4b71df also fixes game startup.
Intel MacBook 2019 with AMD Radeon Pro 5300M. Mac OS Sonoma 14.4
Actually thanks @dstelter for your comment - there was an out of bound write :D
Still doesn't explain compiler crash, tho..
Still crashing on the latest commit with this log :
---crashlog(SIGSEGV)---
GPU: AMD Radeon RX 6900 XT
#1: - 4 ??? 0x0000000000000007 0x0 + 7
#2: Tempest::Encoder<Tempest::CommandBuffer>::setPipeline(Tempest::ComputePipeline const&) - 5 libTempest.dylib 0x000000010bfc7f1a _ZN7Tempest7EncoderINS_13CommandBufferEE11setPipelineERKNS_15ComputePipelineE + 42
#3: Renderer::prepareSky(Tempest::Encoder<Tempest::CommandBuffer>&, WorldView&) - 6 Gothic2Notr 0x000000010a5f9f64 _ZN8Renderer10prepareSkyERN7Tempest7EncoderINS0_13CommandBufferEEER9WorldView + 292
#4: Renderer::draw(Tempest::Attachment&, Tempest::Encoder<Tempest::CommandBuffer>&, unsigned char) - 7 Gothic2Notr 0x000000010a5fa955 _ZN8Renderer4drawERN7Tempest10AttachmentERNS0_7EncoderINS0_13CommandBufferEEEh + 565
#5: Renderer::draw(Tempest::Encoder<Tempest::CommandBuffer>&, unsigned char, unsigned long, Tempest::VectorImage::Mesh&, Tempest::VectorImage::Mesh&, InventoryMenu&, VideoWidget&) - 8 Gothic2Notr 0x000000010a5fa591 _ZN8Renderer4drawERN7Tempest7EncoderINS0_13CommandBufferEEEhmRNS0_11VectorImage4MeshES7_R13InventoryMenuR11VideoWidget + 145
#6: MainWindow::render() - 9 Gothic2Notr 0x000000010a623519 _ZN10MainWindow6renderEv + 713
#7: -[TempestWindowDelegate dispatchRenderer] - 10 libTempest.dylib 0x000000010bff9ef1 -[TempestWindowDelegate dispatchRenderer] + 33
#8: _dispatch_call_block_and_release - 11 libdispatch.dylib 0x00007ff80e48a6b9 _dispatch_call_block_and_release + 12
#9: _dispatch_client_callout - 12 libdispatch.dylib 0x00007ff80e4a09fc _dispatch_client_callout + 6
#10: _dispatch_main_queue_drain.cold.5 - 13 libdispatch.dylib 0x00007ff80e4baf90 _dispatch_main_queue_drain.cold.5 + 828
#11: _dispatch_main_queue_drain - 14 libdispatch.dylib 0x00007ff80e496f66 _dispatch_main_queue_drain + 121
#12: _dispatch_main_queue_callback_4CF - 15 libdispatch.dylib 0x00007ff80e496edf _dispatch_main_queue_callback_4CF + 31
#13: __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ - 16 CoreFoundation 0x00007ff80e75bfc6 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
#14: __CFRunLoopRun - 17 CoreFoundation 0x00007ff80e71ea74 __CFRunLoopRun + 2507
#15: CFRunLoopRunSpecific - 18 CoreFoundation 0x00007ff80e71da72 CFRunLoopRunSpecific + 536
#16: RunCurrentEventLoopInMode - 19 HIToolbox 0x00007ff81a2100d4 RunCurrentEventLoopInMode + 281
#17: ReceiveNextEventCommon - 20 HIToolbox 0x00007ff81a212e60 ReceiveNextEventCommon + 188
#18: _BlockUntilNextEventMatchingListInModeWithFilter - 21 HIToolbox 0x00007ff81a39c19a _BlockUntilNextEventMatchingListInModeWithFilter + 63
#19: _DPSNextEvent - 22 AppKit 0x00007ff812182dc1 _DPSNextEvent + 912
#20: -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] - 23 AppKit 0x00007ff812c11097 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1263
#21: Tempest::MacOSApi::implProcessEvents(Tempest::SystemApi::AppCallBack&) - 24 libTempest.dylib 0x000000010bffa792 _ZN7Tempest8MacOSApi17implProcessEventsERNS_9SystemApi11AppCallBackE + 66
#22: Tempest::MacOSApi::implExec(Tempest::SystemApi::AppCallBack&) - 25 libTempest.dylib 0x000000010bffa720 _ZN7Tempest8MacOSApi8implExecERNS_9SystemApi11AppCallBackE + 48
#23: main - 26 Gothic2Notr 0x000000010a61c4d2 main + 562
zsh: segmentation fault Gothic2Notr
The fix from @dstelter still works fine (ssao_blur.comp is still the culprit…)
Hi, @WeedyWeedSmoker !
AFAIR apple hasn't come back to me, neither in public request or directly. I'm assuming they simply don't have enough man power working on legacy drivers.