Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.17k stars 85 forks source link

Crash on game start Steam G2:NotR, Intel Mac #643

Open matmeller opened 6 months ago

matmeller commented 6 months ago

Hello, I’ve installed G2:NotR from steam and downloaded current version of OpenGothic 63b8d77. When I start a new game, it crashes right after the intro video. I have tried running the game with -ms 0 -rt 0 as well, but no luck.

OS: macOS Sonoma 14.5 Graphics: Intel Iris Plus Graphics 1536MB

Log:

OpenGothic v1.0 dev
GPU = Intel(R) Iris(TM) Plus Graphics
Depth format = Depth32F Shadow format = Depth16
[zenkit] Parsing object [MeshAndBsp % 0 0]
[zenkit] Parsing chunk c000
[zenkit] Parsing chunk c010
[zenkit] Parsing chunk c040
[zenkit] Parsing chunk c045
[zenkit] Parsing chunk c050
[zenkit] Parsing chunk c0ff
[zenkit] 1 bytes remaining in section b020
[zenkit] Parsing object [VobTree % 0 0]
[zenkit] Parsing object [WayNet % 0 0]
[zenkit] Parsing object [EndMarker % 0 0]
invalid particle system: "INVISIBLE_VOBBOX.3DS"
unable to load sound fx: ENV_NIGHT_TONSOFINSECTS
unable to load sound fx: OW_BIRD11
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] Unexpected value for MdsEventType: "       "
[zenkit] 4 bytes remaining in section f5a3
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set

---crashlog(std::terminate)---
GPU: Intel(R) Iris(TM) Plus Graphics
#1: std::terminate() - 4   libc++abi.dylib                     0x00007ff810213d36 _ZSt9terminatev + 54
#2: _dispatch_client_callout - 5   libdispatch.dylib                   0x00007ff8100badd0 _dispatch_client_callout + 28
#3: _dispatch_main_queue_drain - 6   libdispatch.dylib                   0x00007ff8100c71df _dispatch_main_queue_drain + 984
#4: _dispatch_main_queue_callback_4CF - 7   libdispatch.dylib                   0x00007ff8100c6df9 _dispatch_main_queue_callback_4CF + 31
#5: __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ - 8   CoreFoundation                      0x00007ff810378e46 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
#6: __CFRunLoopRun - 9   CoreFoundation                      0x00007ff810338075 __CFRunLoopRun + 2459
#7: CFRunLoopRunSpecific - 10  CoreFoundation                      0x00007ff810337112 CFRunLoopRunSpecific + 557
#8: RunCurrentEventLoopInMode - 11  HIToolbox                           0x00007ff81ad50a09 RunCurrentEventLoopInMode + 292
#9: ReceiveNextEventCommon - 12  HIToolbox                           0x00007ff81ad50646 ReceiveNextEventCommon + 201
#10: _BlockUntilNextEventMatchingListInModeWithFilter - 13  HIToolbox                           0x00007ff81ad50561 _BlockUntilNextEventMatchingListInModeWithFilter + 66
#11: _DPSNextEvent - 14  AppKit                              0x00007ff8139a7c61 _DPSNextEvent + 880
#12: -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] - 15  AppKit                              0x00007ff8142bbdc0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
#13: Tempest::MacOSApi::implProcessEvents(Tempest::SystemApi::AppCallBack&) - 16  libTempest.dylib                    0x0000000107b647b2 _ZN7Tempest8MacOSApi17implProcessEventsERNS_9SystemApi11AppCallBackE + 66
#14: Tempest::MacOSApi::implExec(Tempest::SystemApi::AppCallBack&) - 17  libTempest.dylib                    0x0000000107b64750 _ZN7Tempest8MacOSApi8implExecERNS_9SystemApi11AppCallBackE + 48
#15: main - 18  Gothic2Notr                         0x000000010617785e main + 558

zsh: abort      ./Gothic2Notr.sh -ms 0 -rt 0
Try commented 6 months ago

Hi @mmeIIer !

While working on another topic I run into gpu-crash in intel. Can you please check 919f5d47 if it helps with your problem? Thanks!

matmeller commented 6 months ago

Hi @Try, thanks for getting back to me. Unfortunately, 919f5d4 didn't help. The crash log is almost the same. crash.log

I've tried building with Apple clang-1500.3.9.4 and LLVM clang 17.0.6 and I get the same crash.

I have also checked and build from Mac Source Ports works just fine.

Try commented 6 months ago

Thanks for testing.

For now , unfortunately, I don't have any good solution can only suggest to switch off graphics settings in extended menu.

I've added issue(https://github.com/Try/Tempest/issues/65) to engine repo, to check, if there are any solutions to get crash-information for gpu.

I have also checked and build from Mac Source Ports works just fine.

This one is several years old by now and hard to compare.

Try commented 4 months ago

I've added an extended gpu-crash logger for mac. Now we can have state of metal-encoders and crash reason. Here is example of simulated page-fault error:


---crashlog(DeviceLostException(Error Domain=MTLCommandBufferErrorDomain Code=3 "Caused GPU Address Fault Error (0000000b:kIOGPUCommandBuff)---
GPU: Apple M1

---gpulog begin---
<errorState: MTLCommandEncoderErrorStateCompleted, label: Visibility, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: (null), debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: (null), debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: (null), debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: HiZ-occluders, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: HiZ-mip, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: Visibility, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateFaulted, label: (null), debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateFaulted, label: ShadowMap #0, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateFaulted, label: ShadowMap #1, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: Exposure, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: DirectSunLight, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: Stash scene, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateAffected, label: GWater, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateAffected, label: Sun&Moon, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: Reflections, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: Tonemapping, debugSignposts: (null)>
<errorState: MTLCommandEncoderErrorStateCompleted, label: UI, debugSignposts: (null)>
---gpulog end  ---

Please give it a run, when you have a time :)

vicegold commented 4 months ago

Also getting crashes on the latest nightly (1.0.2756) on macOS, but the error is slightly different:

➜ ./Gothic2Notr.sh
OpenGothic v
[ALSOFT] (EE) Failed to get audio device type: 2003332927
no "Gothic.ini" file in path - using default settings

---crashlog(std::system_error(program_source:130:26: error: no member named 'atomic_fetch_add' in 'metal::texture2d<unsigned int, metal::ac)---
GPU: Apple M1 Max
#1: __cxa_get_exception_ptr - 4   libc++abi.dylib                     0x00007ff807c8a907 __cxa_get_exception_ptr + 0
#2: __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) - 5   libc++abi.dylib                     0x00007ff807c8a8ce _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
#3: Tempest::Detail::MtShader::MtShader(Tempest::Detail::MtDevice&, void const*, unsigned long) - 6   libTempest.dylib                    0x000000010d361311 _ZN7Tempest6Detail8MtShaderC2ERNS0_8MtDeviceEPKvm + 2161
#4: Tempest::MetalApi::createShader(Tempest::AbstractGraphicsApi::Device*, void const*, unsigned long) - 7   libTempest.dylib                    0x000000010d366878 _ZN7Tempest8MetalApi12createShaderEPNS_19AbstractGraphicsApi6DeviceEPKvm + 56
#5: Tempest::Device::shader(void const*, unsigned long) - 8   libTempest.dylib                    0x000000010d382cbb _ZN7Tempest6Device6shaderEPKvm + 43
#6: Shaders::Shaders() - 9   Gothic2Notr                         0x0000000102a33f80 _ZN7ShadersC2Ev + 7520
#7: Renderer::Renderer(Tempest::Swapchain&) - 10  Gothic2Notr                         0x0000000102a28dce _ZN8RendererC2ERN7Tempest9SwapchainE + 862
#8: MainWindow::MainWindow(Tempest::Device&) - 11  Gothic2Notr                         0x0000000102a498ad _ZN10MainWindowC2ERN7Tempest6DeviceE + 141
#9: main - 12  Gothic2Notr                         0x0000000102a490ec main + 508

[1]    76618 abort      ./Gothic2Notr.sh
Try commented 4 months ago

@vicegold

On, nice, that we have a progress now! no member named 'atomic_fetch_add' - metal compiler complains that image-atomics are bot there, M1 must support them. Can you check MacOS/Metal version on you machine - presumably just outdated metal-driver?

vicegold commented 4 months ago

I'm on Sonoma 14.5 so the latest version and System Info says Metal 3. Not sure if there's any way to get more detailed version info for Metal.

Try commented 4 months ago

atomic_fetch_add

Issues was in inconsistent handling of MSL versions: you, presumable on 3.0 and engine been assuming 3.1. Should be fixed now

vicegold commented 4 months ago

Can confirm this fixed my crashes, thank you :)

matmeller commented 4 months ago

Hi @Try thanks for the updates. I only had some time now to test the changes. Unfortunately it still crashes with log below. I also have metal 3 and Sonoma 14.5

OpenGothic v1.0 dev
GPU = Intel(R) Iris(TM) Plus Graphics
Depth format = Depth32F Shadow format = Depth16
[zenkit] Parsing object [MeshAndBsp % 0 0]
[zenkit] Parsing chunk c000
[zenkit] Parsing chunk c010
[zenkit] Parsing chunk c040
[zenkit] Parsing chunk c045
[zenkit] Parsing chunk c050
[zenkit] Parsing chunk c0ff
[zenkit] 1 bytes remaining in section b020
[zenkit] Parsing object [VobTree % 0 0]
[zenkit] Parsing object [WayNet % 0 0]
[zenkit] Parsing object [EndMarker % 0 0]
invalid particle system: "INVISIBLE_VOBBOX.3DS"
unable to load sound fx: ENV_NIGHT_TONSOFINSECTS
unable to load sound fx: OW_BIRD11
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] Unexpected value for MdsEventType: "       "
[zenkit] 4 bytes remaining in section f5a3
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
[zenkit] 1 bytes overflowed in section f590
unable to recognize mobsi{MOBNAME_PRISON, }
unable to recognize mobsi{MOBNAME_MONASTERY2, }
unable to recognize mobsi{MOBNAME_MONASTERY, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_16, }
unable to recognize mobsi{MOBNAME_GRAVE_13, }
unable to recognize mobsi{MOBNAME_GRAVE_14, }
unable to recognize mobsi{MOBNAME_GRAVE_12, }
unable to recognize mobsi{MOBNAME_GRAVE_03, }
unable to recognize mobsi{MOBNAME_GRAVE_07, }
unable to recognize mobsi{MOBNAME_GRAVE_11, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_10, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_02, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_01, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_05, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_07, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_03, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_06, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_08, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_09, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_04, }
unable to recognize mobsi{MOBNAME_GR_PEASANT2, }
unable to recognize mobsi{MOBNAME_GR_PEASANT2, }
unable to recognize mobsi{MOBNAME_GR_PEASANT, }
unable to recognize mobsi{MOBNAME_GR_PEASANT2, }
unable to recognize mobsi{MOBNAME_GR_PEASANT, }
unable to recognize mobsi{MOBNAME_GR_PEASANT, }
unable to recognize mobsi{MOBNAME_PRISON, }
unable to recognize mobsi{MOBNAME_PRISON, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_11, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_12, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_14, }
unable to recognize mobsi{MOBNAME_GRAVETEAM_13, }
unable to recognize mobsi{MOBNAME_GRAVE_10, }
unable to recognize mobsi{MOBNAME_GRAVE_22, }
unable to recognize mobsi{MOBNAME_GRAVE_17, }
unable to recognize mobsi{MOBNAME_GRAVE_19, }
unable to recognize mobsi{MOBNAME_GRAVE_18, }
unable to recognize mobsi{MOBNAME_GRAVE_21, }
unable to recognize mobsi{MOBNAME_GRAVE_20, }
unable to recognize mobsi{MOBNAME_GRAVE_27, }
unable to recognize mobsi{MOBNAME_GRAVE_26, }
unable to recognize mobsi{MOBNAME_GRAVE_25, }
unable to recognize mobsi{MOBNAME_GRAVE_24, }
unable to recognize mobsi{MOBNAME_GRAVE_23, }
unable to recognize mobsi{MOBNAME_GRAVE_04, }
unable to recognize mobsi{MOBNAME_GRAVE_04, }
unable to recognize mobsi{MOBNAME_GRAVE_04, }
unable to recognize mobsi{MOBNAME_GRAVE_04, }
unable to recognize mobsi{MOBNAME_TAVERN_01, }
unable to recognize mobsi{MOBNAME_TAVERN, }
unable to recognize mobsi{MOBNAME_PASSOW, }
unable to recognize mobsi{MOBNAME_MONASTERY, }
unable to recognize mobsi{MOBNAME_GR_PEASANT, }
unable to recognize mobsi{MOBNAME_MONASTERY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_GR_PEASANT, }
unable to recognize mobsi{MOBNAME_LIGHTHOUSE, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_LIGHTHOUSE, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_LIGHTHOUSE, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_CITY2, }
unable to recognize mobsi{MOBNAME_GRAVE_28, }
unable to recognize mobsi{MOBNAME_GRAVE_29, }
unable to recognize mobsi{MOBNAME_GRAVE_30, }
unable to recognize mobsi{MOBNAME_GRAVE_31, }
unable to recognize mobsi{MOBNAME_GRAVE_32, }
unable to recognize mobsi{MOBNAME_GRAVE_33, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_CITY, }
unable to recognize mobsi{MOBNAME_INCITY02, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY02, }
unable to recognize mobsi{MOBNAME_INCITY03, }
unable to recognize mobsi{MOBNAME_INCITY01, }
unable to recognize mobsi{MOBNAME_Hotel_02, }
unable to recognize mobsi{MOBNAME_BAR_02, }
unable to recognize mobsi{MOBNAME_BAR_01, }
unable to recognize mobsi{MOBNAME_MIX_01, }
unable to recognize mobsi{MOBNAME_MIX_02, }
unable to recognize mobsi{MOBNAME_MIX_01, }
unable to recognize mobsi{MOBNAME_INCITY05, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY02, }
unable to recognize mobsi{MOBNAME_INCITY05, }
unable to recognize mobsi{MOBNAME_INCITY05, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY05, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY04, }
unable to recognize mobsi{MOBNAME_INCITY03, }
unable to recognize mobsi{MOBNAME_INCITY03, }
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set
[zenkit] Accessing member "C_NPC.AIVAR" without an instance set

---crashlog(std::terminate)---
GPU: Intel(R) Iris(TM) Plus Graphics
#1: std::terminate() - 4   libc++abi.dylib                     0x00007ff810213d36 _ZSt9terminatev + 54 #2: _dispatch_client_callout - 5   libdispatch.dylib                   0x00007ff8100badd0 _dispatch_client_callout + 28 #3: _dispatch_main_queue_drain - 6   libdispatch.dylib                   0x00007ff8100c71df _dispatch_main_queue_drain + 984 #4: _dispatch_main_queue_callback_4CF - 7   libdispatch.dylib                   0x00007ff8100c6df9 _dispatch_main_queue_callback_4CF + 31 #5: __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ - 8   CoreFoundation                      0x00007ff810378e46 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 #6: __CFRunLoopRun - 9   CoreFoundation                      0x00007ff810338075 __CFRunLoopRun + 2459 #7: CFRunLoopRunSpecific - 10  CoreFoundation                      0x00007ff810337112 CFRunLoopRunSpecific + 557
#8: RunCurrentEventLoopInMode - 11  HIToolbox                           0x00007ff81ad50a09 RunCurrentEventLoopInMode + 292
#9: ReceiveNextEventCommon - 12  HIToolbox                           0x00007ff81ad50816 ReceiveNextEventCommon + 665
#10: _BlockUntilNextEventMatchingListInModeWithFilter - 13  HIToolbox                           0x00007ff81ad50561 _BlockUntilNextEventMatchingListInModeWithFilter + 66
#11: _DPSNextEvent - 14  AppKit                              0x00007ff8139a7c61 _DPSNextEvent + 880
#12: -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] - 15  AppKit                              0x00007ff8142bbdc0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
#13: Tempest::MacOSApi::implProcessEvents(Tempest::SystemApi::AppCallBack&) - 16  libTempest.dylib                    0x00000001109c3c72 _ZN7Tempest8MacOSApi17implProcessEventsERNS_9SystemApi11AppCallBackE + 66
#14: Tempest::MacOSApi::implExec(Tempest::SystemApi::AppCallBack&) - 17  libTempest.dylib                    0x00000001109c3c10 _ZN7Tempest8MacOSApi8implExecERNS_9SystemApi11AppCallBackE + 48
#15: main - 18  Gothic2Notr                         0x000000010efe9a0e main + 558

zsh: abort      ./opengothic/Gothic2Notr.sh -ms 0 -rt 0