Changing content crashes Retroarch

I can open Retroarch and play my games. However If I close a game and try to launch another it frequently (but not always) leads to crash.

Here’s log:

PS C:\Program Files (Custom)\RetroArch> .\retroarch.exe --menu --verbose --log-file log.txt PS C:\Program Files (Custom)\RetroArch> [INFO]: Enabling instance extension: VK_KHR_get_physical_device_properties2. [INFO]: Enabling instance extension: VK_KHR_external_memory_capabilities. [INFO]: Enabling instance extension: VK_KHR_external_semaphore_capabilities. [INFO]: Enabling instance extension: VK_EXT_debug_utils. [INFO]: Found Vulkan GPU: GeForce GTX 1070 Ti [INFO]: API: 1.1.126 [INFO]: Driver: 445.348.0 [INFO]: Selected Vulkan GPU: GeForce GTX 1070 Ti [INFO]: GPU supports Vulkan 1.1. [INFO]: Enabling device extension: VK_KHR_swapchain. [INFO]: Enabling device extension: VK_KHR_get_memory_requirements2. [INFO]: Enabling device extension: VK_KHR_dedicated_allocation. [INFO]: Enabling device extension: VK_KHR_image_format_list. [INFO]: Enabling device extension: VK_KHR_sampler_mirror_clamp_to_edge. [INFO]: Enabling device extension: VK_KHR_external_semaphore. [INFO]: Enabling device extension: VK_KHR_external_memory. [INFO]: Enabling device extension: VK_KHR_external_semaphore_win32. [INFO]: Enabling device extension: VK_KHR_external_memory_win32. [INFO]: Enabling device extension: VK_KHR_descriptor_update_template. [INFO]: Enabling device extension: VK_KHR_maintenance1. [INFO]: Enabling device extension: VK_KHR_maintenance2. [INFO]: Enabling device extension: VK_KHR_maintenance3. [INFO]: Enabling device extension: VK_KHR_bind_memory2. [INFO]: Enabling device extension: VK_KHR_draw_indirect_count. [INFO]: Enabling device extension: VK_KHR_shader_draw_parameters. [INFO]: Enabling device extension: VK_KHR_storage_buffer_storage_class. [INFO]: Enabling device extension: VK_EXT_conservative_rasterization. [INFO]: Enabling device extension: VK_KHR_8bit_storage. [INFO]: Enabling device extension: VK_KHR_16bit_storage. [INFO]: Enabling device extension: VK_KHR_shader_float16_int8. [INFO]: Enabling device extension: VK_KHR_multiview. [INFO]: Enabling device extension: VK_EXT_subgroup_size_control. [INFO]: Enabling device extension: VK_EXT_host_query_reset. [INFO]: Enabling device extension: VK_EXT_shader_demote_to_helper_invocation. [INFO]: Enabling device extension: VK_EXT_scalar_block_layout. [INFO]: Enabling device extension: VK_KHR_uniform_buffer_standard_layout. [INFO]: Enabling device extension: VK_KHR_timeline_semaphore. [INFO]: Enabling device extension: VK_KHR_sampler_ycbcr_conversion. [INFO]: Enabling device extension: VK_EXT_external_memory_host. [INFO]: Enabling device extension: VK_KHR_driver_properties. plugin_start_gfx success. Gfx RomOpen. [INFO]: Enabling 8 and 16-bit integer arithmetic support for more efficient shaders! unhandled setting UI: psx.input.port1.gun_chairs unhandled setting UI: psx.input.port2.gun_chairs unhandled setting UI: psx.input.port3.gun_chairs unhandled setting UI: psx.input.port4.gun_chairs unhandled setting UI: psx.input.port5.gun_chairs unhandled setting UI: psx.input.port6.gun_chairs unhandled setting UI: psx.input.port7.gun_chairs unhandled setting UI: psx.input.port8.gun_chairs Exception code=0xc0000005 flags=0x0 at 0x00007FFAFE7B3EA5. Access violation - attempting to write data at address 0x0000000000000020

1 Like

This also happens with me. I think the problem is exacerbated by slang shaders, but I haven’t done a ton of testing yet.

Can anybody help with this?

Same to me. I also think it’s related to slang shaders. It happens with all of them (I mean I’ve not tried all of them, of course, but I’ve tried easy and more complex shaders).

However, I’ve discovered that turning off achievements avoids the crash. Also, if you enable GLSL shaders seems to prevent the crash but then you can’t use Vulkan.

Can confirm turning off achievements fixes the problem for me too.

My use case is I use presets for every core and when closing and starting new content I get a crash 9/10 times when achievements are turned on.

Hmm, an interaction between glslang and achievements would be weird, but stranger things have happened. We’ll look into it!

EDIT: Jamiras looked into it and seems to have a fix ready. It should be in the nightly builds soon: https://github.com/libretro/RetroArch/pull/11188

I’ve found a workaround to solve this (at least in my case): go to Settings -> Video -> Auto-Shader Delay and set the value to 350. This will delay 350 ms the loading of shaders each time you launch a game. This way I can use slang shaders and achievements with no crashes.

And no, I’m not using any video capture software, which I think this is the main reason this feature was made for.

EDIT: NVM, I’m using the last nightly build and it seems the issue has been solved. Thanks.

1 Like

This is back again. Having to use shader delay workaround to stop it.

Expected Behavour - Be able to close content and open new content with no problems. Actual Behavior - Retroarch crashes when closing content and opening new content.