Does this only repro with DXR enabled? Does this repro on latest master? I only get warning spam about swapchain latency fences, but that's a known game issue.
I just tried with those variables unset (so dxr not overriden and radv ray tracing not enabled), and these errors still spam the log.
Current vkd3d-proton master, Mesa main, kernel 6.1-rc7, game version: 1.61 with cyberengine tweaks enabled.
with cyberengine tweaks enabled
What about plain 1.61?
OK, I tried removing the plugin, overrides for version and set d3dcompiler_47 to builtin. It's still spamming those errors.
Hm, I should have added more info on my set up - I'm using upstream Wine 7.22 with vkd3d-proton added in the prefix. May be there is some difference between Wine versions like Proton and upstream that prevents those errors?
Same spam on Proton Experimental(bleeding-edge), no cyberengine tweaks, no raytracing enabled, only using RADV_PERFTEST=sam rx 6800, mesa-git, 6.0.10 kernel
vkd3d-proton.log
Btw, didn't RADV_PERFTEST=sam become the default now? I think I've seen something about it.
UPDATE:
I.e. I think in general sam is enabled even without the variable, if radv thinks you have enough VRAM, but setting RADV_PERFTEST=sam just forces using it without any check.
happens on 1650ti also, lutris wine -ge & tkg no dxr, game ver 1.61 no mod FSR enabled
I still cannot reproduce this. With warn logging on, I get:
0228:warn:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).
0228:warn:dxgi_vk_swap_chain_wait_worker: Failed to increment swapchain semaphore. Did application forget to acquire?
0148:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0158:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0158:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0228:warn:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).
0228:warn:dxgi_vk_swap_chain_wait_worker: Failed to increment swapchain semaphore. Did application forget to acquire?
0138:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0138:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0138:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0228:warn:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).
0228:warn:dxgi_vk_swap_chain_wait_worker: Failed to increment swapchain semaphore. Did application forget to acquire?
0144:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0140:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0140:warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
0228:warn:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).
These warnings as expected at least.
Just a thought - may be it's triggered by specific setting in the game being enabled. I think I have everything on max (except Screen Space Reflection Quality = Ultra), ray tracing disabled, 2560x1440. No special log level set.
I have everything on max except Screen Space Reflections Quality, which is on high and everything in "Basic" is off and FOV is set to 90, 1080p. Also, it looks like it appears with err enabled in the logging, not just warn.
Still happens with latest master. Message that's being spammed mostly is this (at least in the loading screen):
0188:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
0188:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
0188:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
Naming looks different from before, but same code - #80004005.
I generally suppress it with VKD3D_DEBUG="none" but it probably indicates something is not correct.
It's being spammed with VKD3D_DEBUG not being set at all. Setting it to warn still spams it.
I'm still getting this spammed:
78793.225:0020:01ac:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
78793.229:0020:01ac:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
78793.235:0020:01ac:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
Same problem with vkd3d-proton b7fb41b running on Bottles, but I run game on almost lowest settings
System:
Kernel: 5.19.0-31-generic arch: x86_64 bits: 64
compiler: N/A Desktop: GNOME v: 43.1 Distro: Ubuntu 22.10 (Kinetic Kudu)
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Sapphire driver: amdgpu v: kernel arch: GCN-4 bus-ID: 01:00.0
Display: x11 server: X.Org v: 1.21.1.4 with: Xwayland v: 22.1.3 driver:
X: loaded: amdgpu unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu
resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
OpenGL: renderer: AMD Radeon RX 570 Series (polaris10 LLVM 15.0.7 DRM
3.47 5.19.0-31-generic) v: 4.6 Mesa 22.3.5 (git-78ef633056)
direct render: Yes
Here is my log. I have omitted 100K lines of repeating text.
GOG version. DXVK 2.1, VKD3D 2.8, nvAPI 0.6.2, Nvidia RTX 2060s
ARGS: VKD3D_DEBUG=trace VKD3D_SHADER_DEBUG=trace PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 VKD3D_CONFIG=dxr %command%
Crash happens on "flush_waiters"
00d0:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2176, may be inaccurate.
00d0:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
00d0:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
01a0:info:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
01a0:info:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
01a0:info:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 1.333 ms.
01a0:info:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.293 ms.
01a0:info:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 2.013 ms.
01a0:info:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
00d0:fixme:d3d12_device_SetResidencyPriority: iface 0000000068000030, object_count 1, objects 000000000021f0f0, priorities 000000000021f0f8 stub!
00d0:info:dxgi_vk_swap_chain_init: Creating swapchain (1920 x 1080), BufferCount = 3.
00d0:info:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
01a8:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 4 swapchain images.
01a8:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 4 swapchain images.
01a0:info:vkd3d_pipeline_library_disk_thread_main: Flushing disk cache (wakeup counter since last flush = 6). It seems like application has stopped creating new PSOs for the time being.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a0:info:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a0:info:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a4:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
01a8:err:vkd3d_queue_flush_waiters: Failed to submit queue(s), vr -4.
01b8:err:d3d12_command_queue_execute: Failed to submit queue(s), vr -4.
Edit: Finally i was able to generate .dmp, but i dont know how to analyze it.
Cyberpunk2077v1.6.2_hotfix.dmp.zip
Edit2: I have downloaded v1.50 and those errors are gone and its no longer crashing.
I wonder if GOG version differs from Steam one in some way that this happens only in it?
Current latest version constantly spams such error:
...
141224.433:0020:01c4:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
141224.439:0020:01c4:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
141224.444:0020:01c4:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
...
FWIW, I'm getting this error with the 1.62_PT_Hotfix build (I don't have PT enabled in my config) and vkd3d-proton up to commit f52e6482bc63d907054025c5eaf8c0d71a7a9f28. I've been able to play with RT enabled before, I think the last functional version for me was 1.61_DLSS3. I don't know how reliable lgogdownloader rollbacks are but I'll try if it's worth anything.
@ToddAWalter: Sorry for slight off-topic, but do you have an RDNA3 (or RDNA 2) card by chance? If yes, can you please take a look at these:
I have hard time finding someone with GOG version and RDNA 3 / RDNA 2 to confirm it.
@shmerl I'm sorry to say I have an Nvidia card (Quadro RTX 4000, similar to a 2060 as above) so I cannot help you with that.
Same problem here . From 1.62 , the game crashes , and my logs contains usually :
01bc:err:vkd3d_queue_flush_waiters: Failed to submit queue(s), vr -4.
What I also noticed , is that the game reaches this state :
1587.755:0104:0118:fixme:oleacc:find_class_data unhandled window class: L"[#32769](/issue/HansKristian-Work/vkd3d-proton/32769)" 1587.755:0104:0118:fixme:uiautomation:uia_get_providers_for_hwnd Override provider callback currently unimplemented. 1587.755:0104:0118:fixme:uiautomation:msaa_provider_GetPropertyValue Unimplemented propertyId 30024 1587.759:0104:0118:fixme:uiautomation:uia_element_GetCurrentPropertyValueEx Default property values currently unimplemented 1587.759:0104:0118:fixme:uiautomation:uia_element_GetCurrentPropertyValueEx Default property values currently unimplemented 1587.759:0104:0118:fixme:uiautomation:msaa_provider_GetPatternProvider Unimplemented patternId 10002 1587.759:0104:0118:fixme:uiautomation:nc_provider_GetPatternProvider 00000000003A0580, 10002, 00000000025FECB0: stub 1587.759:0104:0118:fixme:uiautomation:base_hwnd_provider_GetPatternProvider 00000000003A04F0, 10002, 00000000025FECB0: stub
It freezes ... then after few moments I get a :
1692.405:0130:0188:warn:seh:OutputDebugStringA "!!! EngineWatchdog timeout!"
Then it prints a stack related to the REDEngineErrorReporter.exe
No version of proton modifies this behavior , crashes are always there no matter what option I turn on or off , and no matter what launch command I add.
On 1.61 , it had no issues
steam-1091500.log
This bug is about a log spamming message. So may be open a new one for the crash? The ray tracing crash mentioned above was already addressed (it was a rogue nvapi library lingering from Wine staging). See bug #1556.
@HamilcarR Like shmerl said, please open a new bug report.
01bc:err:vkd3d_queue_flush_waiters: Failed to submit queue(s), vr -4.
This is not the same problem at all.
Having the same problem on 1.63 hotfix without mods. Tried building the latest version, but I have found that the spam occurs on 2.8 as well.
o/
Having the same issue, specifically,
"01ac:err:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005" spam and crash after a few seconds of gameplay. 1.63+hotfix(latest version), All graphics off or low, Nvidia v: 535.104.05, VKD3D 2.8, WineHQ Staging 8.15
And I just bought Phantom Liberty sadge T_T
Made a more detailed report on reddit: https://www.reddit.com/r/linux_gaming/comments/16hl2r1/cyberpunk_2077_crashes_after_a_few_seconds/?sort=new
Nvidia Mesa llvmpipe (LLVM 15.0.7)
LLVMPipe is a software renderer, so it doesnt use your GPU. Make sure you have a recent version of the Nvidia GPU driver installed.
It seems like I made a mistake, I checked hw info from steam and that shows the mesa llvmpipe, I am using the latest Nvidia driver
$ inxi -bxxz
System:
Kernel: 5.15.0-83-lowlatency x86_64 bits: 64 compiler: gcc v: 11.4.0
Desktop: MATE 1.26.0 wm: marco dm: LightDM Distro: Linux Mint 21.2 Victoria
base: Ubuntu 22.04 jammy
Machine:
Type: Desktop System: Gigabyte product: X570 GAMING X v: N/A
serial:
Mobo: Gigabyte model: X570 GAMING X serial:
UEFI: American Megatrends LLC. v: F36 date: 01/04/2022
CPU:
Info: 8-core AMD Ryzen 7 3700X [MT MCP] arch: Zen 2 speed (MHz): avg: 3756
min/max: 2200/3600
Graphics:
Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: eVga.com.
driver: nvidia v: 535.104.05 pcie: speed: 5 GT/s lanes: 16 ports:
active: none off: DP-2,DP-3,HDMI-A-1 empty: DP-1,Unknown-1
bus-ID: 09:00.0 chip-ID: 10de:1e84
Display: x11 server: X.Org v: 1.21.1.4 compositor: marco v: 1.26.0
driver: X: loaded: nvidia gpu: nvidia resolution: 1: 1920x1080~60Hz
2: 1920x1080~60Hz 3: 1920x1080~60Hz
OpenGL: renderer: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
v: 4.6.0 NVIDIA 535.104.05 direct render: Yes
I just installed update 2.0 and I am still having this issue. Without any modification or environment variables, the problem still persists. I tried Proton GE 7-55, 8-1, 8-6, 8-16, Proton 7, 8, Experimental. I tried disabling settings or nvidia specific features and different graphical presets. I'm still getting bombarded with thousands of these errors. Better yet, when I set VKD3D_DEBUG to "none", the game crashes within a minute or so.
Also I would like to clarify that I'm getting:
vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
not
d3d12_fence_signal_external_events_locked: Failed to signal event, hr #80004005.
I'm experiencing this same problem, my copy is from GOG.
System info:
GFX: Nvidia GTX 1060 6GB
Distro: Arch Linux
Package: HGL, Lutris, Steam (Flatpak and repos. Same result)
My game launches. Most of the time it crashes at the cdpr logo, or any of the other sponsors/warning screens. Spamming the same vkd3d waiting event errors for a while, then printing Alpha swizzle is not supported. I have experienced far less crashing using Steam+Proton7, but it does crash a lot of times -during startup-.
Logs:
19536.085:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.091:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.096:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.108:0114:0140:fixme:vkd3d-proton:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
I don't get why it's not reproducible for @HansKristian-Work. Seems like it happens to a lot of people in general.
I'm experiencing this same problem, my copy is from GOG.
System info: GFX: Nvidia GTX 1060 6GB Distro: Arch Linux Package: HGL, Lutris, Steam (Flatpak and repos. Same result)
My game launches. Most of the time it crashes at the cdpr logo, or any of the other sponsors/warning screens. Spamming the same vkd3d waiting event errors for a while, then printing
Alpha swizzle is not supported. I have experienced far less crashing using Steam+Proton7, but it does crash a lot of times -during startup-.Logs:
19536.085:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.091:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.096:0114:0198:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005. 19536.108:0114:0140:fixme:vkd3d-proton:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
I have similar issue, my game is crashing on the red intro video. All previous game version used to work (I played cyberpunk since the launch). Unfortunately I deleted my 1.63 install before installing 2.0 so I can't check if that is still working, though it did few weeks ago. I do not have your errors though, just about the alpha swizzle
0128:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
01e8:info:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
0158:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0150:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
01e8:info:vkd3d_pipeline_library_disk_thread_main: Flushing disk cache (wakeup counter since last flush = 547). It seems like application has stopped creating new PSOs for the time being.
My hardware is AMD rx590 and I am using GOG version and wine-ge 8.17 (from lutris)
GOG version crash has nothing to do with this issue. It's some bug in their galaxy integration.
You can work around it by deleting or renaming GameServicesGOG.dll, but it will also make the new expansion unplayable. It needs a fix from CDPR.
tried the GameServicesGOG.dll fix(renamed it to have a .bak) described above but still get the issues with alpha swizzle at logos with audio still playing.
game: 2.0 GOG
wine: GE-wine 8-17
dxvk: 2.3
d3d-proton: 2.10
graphics: 980ti
Distro: manjaro
running in lutris
2760444.359:00d4:01d0:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
2760444.364:00d4:01d0:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.
2760444.384:00d4:00e8:fixme:vkd3d-proton:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
2760444.994:00d4:01d4:err:vkd3d-proton:vkd3d_queue_flush_waiters: Failed to submit queue(s), vr -4.
Yeah, as I said, GameServicesGOG.dll and related crash have nothing to do with these log errors is this bug report.
Even though it's not supposed to be here but with 2.0.0, the DLC can be accessed by doing this https://www.gog.com/forum/cyberpunk_2077/a_fix_for_the_crashing/page1 (UPDATE part)
tried that fix but still getting a hard crash at logos with swizzle eror
0228:warn:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).
These warnings as expected at least.
I think it's the same error spam, weird that you only get this message and not the following one. The error is printed here because it gets hr < 0 from vkd3d_native_sync_handle_signal here, which returns the error from vkd3d_native_sync_handle_release, and that happens because if fails to release the semaphore here with code 0x12A that means, according to Microsoft docs, "Too many posts were made to a semaphore.".
Downgrading to vkd3d 2.8 fixed this issue for me on AMD Radeon 7800 XT with Lutris GOG version.
In my case, the game constantly spammed with logs vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005 until the RAM was completely full and the OOM killer killed the process.
Setting environment flags did not help me. Neither downgrading the Vulkan version.
But I found a temporary workaround: go into the game settings and activate VSync in the Graphics tab.
same problem (Cyberpunk 2077, 2.0, PL, no mods)
But I found a temporary workaround: go into the game settings and activate VSync in the Graphics tab.
that worked thank you :)
Still the same problem with version 2.11. Enabling vsync workaround works however.
Is that a workaround because of v-sync specifically, or just because generically you are limiting your framerate?
Also (I'm not sure I have been following properly though.. aside of crashes due to the GOG client, are there people with a nvidia card here?) in #1712 they suggest this might be a regression in 5.19.
Is that a workaround because of v-sync specifically, or just because generically you are limiting your framerate?
It's specifically VSync. If I leave VSync off but enable Maximum FPS, the spam still occurs. With VSync on, it's fixed.
Good catch, I also keep vsync setting off and use the max fps limit. @HansKristian-Work: is it reproducible for you in such scenario?
I've always been able to reproduce it, but it's not causing a real problem, is it? It's a clear app bug. No idea what I can even do here, apart from just not logging it.
I've always been able to reproduce it, but it's not causing a real problem, is it?
These logs fill the RAM until the OOM-killer kills the process and the game crashes
VKD3D_DEBUG=none and it's "fixed"
Logging to file is not default behavior though. Proton by default uses VKD3D_DEBUG=none.
That's probably why all the complaints are from the GoG version.
Logs causing OOM is news to me. I always thought someone complained about the error happening at all.
These logs fill the RAM
RAM !?
Well, that (VKD3D_DEBUG=none) environment variable does not work for me :confused: It is still spamming these errors
RAM !?
Maybe Lutris/Heroic/user config redirects log files to /tmp or something
Well, that (VKD3D_DEBUG=none) environment variable does not work for me 😕 It is still spamming these errors
that can also mean that you didn't set it correctly or whatever tool/launcher you're using is overwriting it again.
that can also mean that you didn't set it correctly or whatever tool/launcher you're using is overwriting it again.
Yeah, I think lutris overwrites it or something.
Maybe Lutris/Heroic/user config redirects log files to /tmp or something
That may be possible. I can see RAM usage increasing in htop while playing cyberpunk until the game finally crashes and the RAM is released
I'm not very happy masking out errors that could be catastrophic in other contexts. Seems pretty odd if Lutris or whatever is forcing a debug log to be generated.
VKD3D_DEBUG=none works and I've been always using it as default, but when you need to look at the debug, these messages are just too noisy. If it's a legit error in the game - then sure.
@SandResidence You should set it in the game parameters in Lutris like this:
I don't see this error anymore after upgrading to Plasma 6.1.4 from Plasma 5.x. Not sure if that change is related or something else changed in between now and last time I checked. Lot's of other things are newer too (radv, amdgpu etc.).
May be we can close it unless anyone is still getting these errors with recent set ups.
Some details on my test:
Hi, I'm getting this warning being spammed (looks like once per frame by the timestamps), and I wonder if it's causing some mild in-game stuttering
I'm running Cyberpunk through Lutris with RTX3070 GPU, nvidia driver 565.57.01, vkd3d-proton 2.13, wine vanilla 9.21 (X11), KDE Plasma 6.1.5
It does seem like there's rather less stuttering in the game with VKD3D_DEBUG=none
proton 2.13x1 2024-11proton experimentalx1 2022-12VKD3D_DEBUG=nonex2 2024-11VKD3D_DEBUG=none`x1 2023-12VKD3D_DEBUG=none)x2 2023-12VKD3D_DEBUG=none.x1 2023-12VKD3D_DEBUGx2 2023-09PROTON_ENABLE_NVAPI=1x1 2023-05PROTON_HIDE_NVIDIA_GPU=0x1 2023-05VKD3D_CONFIG=dxrx1 2023-05VKD3D_DEBUG=tracex1 2023-05VKD3D_SHADER_CACHEx1 2023-05VKD3D_SHADER_DEBUG=tracex1 2023-05VKD3D_DEBUG="none"x1 2023-01RADV_PERFTEST=sam`x2 2022-12RADV_PERFTEST='rt,gpl,ext_ms'x1 2022-11VKD3D_CONFIG='dxr11'x1 2022-11gameservicesgog.dllx3 2023-10
I noticed that Cyberpunk 2077 is spamming this in the log:
Using it with radv and such settings enabled (Mesa main, kernel 6.1-rc6+ with patches that prevent the game from crashing):