RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[Vulkan] Freezes when Taking Screenshots

Open Dogway opened this issue 6 years ago • 11 comments

Description

RetroArch Freezes when a screenshot is taken (or a Save State with a screenshot) when the rendered image surpasses the display resolution (or offset to out-of-bounds) on the Vulkan backend.

Steps to reproduce the bug

-Load Vulkan video backend -Load a compatible core (tested on parallel and beetle-psx-hw) -Load game -Set custom_viewport_width or and height bigger than your display limits -Take Screenshot

Bisect Results

This started when implementing personal code to frontend's side to remove letterboxing in games, by means of above settings (together with offsets settings). Strangely enough, rewind and fast forward works.

Environment

Win7 SP1 x64, 4670K, GTX 1070 Retroarch 1.7.6 x64 (latest cores)

Dogway avatar May 12 '19 19:05 Dogway

Just an update to the report. It still happens on Retroarch 1.7.7 x64 (what I use) and latest cores.

The game still seems to play and I can hear the gaming audio so it might be an error on flushing the framebuffer.

Dogway avatar Mar 02 '20 18:03 Dogway

Still happening with the current 1.8.5 nightly, exactly as described by dogway.

ghost avatar Mar 09 '20 14:03 ghost

By the way, I wanted to comment that today I was reading the crt-guest shader README, and the idea of scaling to next integer (as opposed to previous) is also implemented there. What this means is that whoever runs crt-guest on vulkan is going to run into the same issues, so not a corner case by any means.

Dogway avatar Mar 09 '20 14:03 Dogway

Posting to confirm that as of 1.9.4, it's still crashing as expected with a custom viewport.

ghost avatar Jun 02 '21 16:06 ghost

Still happening in 1.9.7, I originally thought it was caused by the new "Integer Scale Overscale" option and opened an issue for it, but nope looks like it's not a new issue at all 😅 Crash log (because it crashes on close content after the freeze): https://pastebin.com/sB0by050

bslenul avatar Jul 28 '21 23:07 bslenul

A temporary workaround for this issue is to disable the retroarch screenshot notification in the settings. This seem to prevent the crash from occurring.

hjw163 avatar Jul 29 '21 10:07 hjw163

@Dogway I have this issue and I found why. I set "Custom" aspect ratio in Settings > Video > Scaling but the ratio width and height default resolution exceeded the resolution of my screen. If i lower them so that they fit my screen, I have no crash anymore.

andiandi13 avatar Aug 01 '21 18:08 andiandi13

@Dogway I have this issue and I found why. I set "Custom" aspect ratio in Settings > Video > Scaling but the ratio width and height default resolution exceeded the resolution of my screen. If i lower them so that they fit my screen, I have no crash anymore.

I can confirm, reproduced the issue exactly as described

cchulo avatar Nov 04 '21 13:11 cchulo

Can you guys test if this merged PR fixes the issue?

https://github.com/libretro/RetroArch/pull/14475

It fixed several related issues already.

LibretroAdmin avatar Oct 05 '22 01:10 LibretroAdmin

Still freezes with 6447c6c, logs are crazy big so I can't put it on pastebin, but here it is: logs.zip

Almost 5k lines of validation errors, and that's just after a few seconds...

bslenul avatar Oct 05 '22 09:10 bslenul