ppsspp icon indicating copy to clipboard operation
ppsspp copied to clipboard

Metal Gear Acid 2 Special Card Videos Can Crash PPSSPP

Open TideGear opened this issue 6 years ago • 40 comments

I'm playing GIT v1.5.4-889-g26f5b5b93 on a Galaxy S9+. This problem appears in both Vulkan and OpenGL modes. The videos that play when special cards are used can crash PPSSPP.

ulus10077_1 00_1

If you use the Cyborg Ninja card (and let the video play), then use The Fury card, PPSSPP will crash when it tries to play the second video. You can do it in reverse order (use Fury then Ninja), and it will still crash on the second card video.

I think I've also seen this happen with the first play of a card video, but I can't 100% recall.

Here's the savestate where you can replicate this... MGA2 Card Videos Crash.zip

TideGear avatar Apr 12 '18 09:04 TideGear

That change fixed a little issue where we could forget to set stencil state but use it anyway. I can imagine that it could cause crashes here, and loading the savestate it doesn't seem to happen for me anymore. Can you test on your S9?

Although.. that wouldn't explain the OpenGL crash.

hrydgard avatar Apr 12 '18 19:04 hrydgard

invalid access, turn off fast memory will ignore error. Interpreter error, too.

40:32:566 Main         E[G3D]: GPUCommon.cpp:651 sceGeListEnqueue: can't enqueue, stack address 08A8858C already used
40:32:567 Main         W[MEMMAP]: MemmapFunctions.cpp:91 ReadFromHardware: Invalid address 00000008
40:32:567 Main         W[MEMMAP]: MemmapFunctions.cpp:127 WriteToHardware: Invalid address 00000000
40:32:567 Main         W[MEMMAP]: MemmapFunctions.cpp:127 WriteToHardware: Invalid address 00000008
40:32:567 Main         W[MEMMAP]: MemmapFunctions.cpp:127 WriteToHardware: Invalid address 00000004
40:32:567 Main         W[MEMMAP]: MemmapFunctions.cpp:127 WriteToHardware: Invalid address 00000008

weihuoya avatar Apr 13 '18 05:04 weihuoya

Huh. If that kind of error happens, it feels like it's on the CPU side rather than the GPU side. Maybe another ARM64 JIT bug...

hrydgard avatar Apr 13 '18 05:04 hrydgard

I just tested v1.5.4-893-gf4d8bfdf1 on my S9+ and turned off fast memory. Now it manages to play both videos but crashes PPSSPP after the second one. Vulkan and OpenGL both do it.

TideGear avatar Apr 13 '18 07:04 TideGear

By the way, is the super brief graphical glitch before the videos load a known issue?

TideGear avatar Apr 13 '18 07:04 TideGear

Weird. The error that's being logged should have nothing to do with the little vulkan problem I fixed so there may have been two different crashes here?

Dunno about the glitch.

hrydgard avatar Apr 13 '18 07:04 hrydgard

Debugging crashes is super boring so I fixed the performance instead: https://github.com/hrydgard/ppsspp/pull/10911 It makes a pretty major change to the Vulkan stuff so not sure about merging before 1.6.

hrydgard avatar Apr 13 '18 16:04 hrydgard

Oh wow, so does it no longer crash then? In OpenGL too?

TideGear avatar Apr 13 '18 18:04 TideGear

No, I just said that I worked on perf instead :P haven't fixed any crash bugs

hrydgard avatar Apr 13 '18 18:04 hrydgard

You guys should try the latest build now, let me know what performance you get on your devices :) The speedup is Vulkan-only for now.

Now, the crash.. I'll try to look into it later but it looks tricky :(

hrydgard avatar Apr 13 '18 20:04 hrydgard

Oh ok, I haven't tried it yet, but I will later. However, I actually haven't had any slowdown except for needing to turn splines down to medium.

By the way, I appreciate you trying to fix my MGA2 issues. The crashes are annoying. Did you happen to see this issue too? https://github.com/hrydgard/ppsspp/issues/10814

I'm not used to devs being as on the ball as you all have been. I'll be donating soon!

TideGear avatar Apr 14 '18 01:04 TideGear

If you got acceptable performance out of this game, you had "slow buffer effects" disabled, didn't you? No (or less) need for that now!

hrydgard avatar Apr 14 '18 06:04 hrydgard

screenshot_20180414-001915_ppsspp

No, but I do tend to render and display at the original PSP res. Will I need splines at medium still?

TideGear avatar Apr 14 '18 07:04 TideGear

Seriously? I got like 10 fps on S8 before my fixes. Do you have a US S9 (Adreno) or a international (Mali)?

My S8 now is full frame rate with hw splines.

hrydgard avatar Apr 14 '18 07:04 hrydgard

A US S9+ from Verizon.

TideGear avatar Apr 14 '18 07:04 TideGear

I found a weird graphics glitch almost immediately in v1.5.4-905-g21b2cbc81. it happens when I fire the AKM at the boss...

ulus10077_1 00_2

MGA2 Weird Graphics Glitch On Bullet Hit.zip

Note: I changed splines back to high.

EDIT: It only happens in Vulkan, not OpenGL.

TideGear avatar Apr 14 '18 07:04 TideGear

OK, maybe the old method isn't as slow on Adreno as on Mali. Because it was barely playable.

Huh, that's a weird one...

hrydgard avatar Apr 14 '18 08:04 hrydgard

Fixed it.

hrydgard avatar Apr 14 '18 08:04 hrydgard

Yup, thanks! Crashes remain for now.

TideGear avatar Apr 14 '18 10:04 TideGear

Just donated as promised!

TideGear avatar Apr 19 '18 18:04 TideGear

Here's something that might help diagnose the crashing. I unlocked a card movie viewer and the crash still happens in that after two views... Card Movie Viewer.zip

TideGear avatar Apr 23 '18 09:04 TideGear

I don't know if this is of any help (it probably isn't) but I had the same problem using the latest dev on macOS. After turning off "fast memory" (which I remembered helped dealing with crashes in MGA 1) PPSSPP doesn't seem to crash anymore, though now I sometimes have graphical glitches after using certain cards/videos, which stay on the screen as green lines, forcing me to quit (though the games seems to keep running, I hear the sound notifications of commands I choose etc., though I can't see what happens anymore).

ghost avatar Apr 29 '18 00:04 ghost

@chiffon-rouge Thanks, CR, but at least on Android, the crashes still happen with fast memory disabled.

Still, it might be a clue for the devs?

TideGear avatar Apr 29 '18 07:04 TideGear

To be more precise, whenever I use a special card that triggers a video sequence for a second time (it doesn't need to be the same card, it seems) I get the graphical glitches, with the screen turning into green lines, while the game continues to play. So for example this happens when I play the Cyborg Ninja card first and then the same card again or the Fury. Before switching off 'Fast Memory' PPSSPP, following the same scenario, would crash. A workaround would be disabling videos (which, as I believe, is an in game option) I guess, but I haven't tested this yet.

ghost avatar Apr 29 '18 12:04 ghost

Just tested in v1.6.3-536-g7b34eaa1f, and this issue remains.

TideGear avatar Oct 05 '18 02:10 TideGear

Having the same issue on 1.6.3 (whatever newest version on Play is), disabling Fast Memory fixes the crashes but usually after a character card video plays i get some sort of flickering screen, usually red/green glitched graphics or the loading screen. Game continues to run in background but nothing seems to revert the screen to normal.

hookaffy avatar Oct 05 '18 07:10 hookaffy

What happens if you turn off fast memory but uncheck ignore invalid read/writes.

JMC47 avatar Oct 05 '18 08:10 JMC47

I can't seem to find the option for 'ignore invalid read/writes,' is it in the nightly version?

hookaffy avatar Oct 05 '18 08:10 hookaffy

There's no UI for that outside desktop.

On Android, you can change the setting by editing the ini file and looking for "IgnoreBadMemAccess = True".

-[Unknown]

unknownbrackets avatar Oct 06 '18 03:10 unknownbrackets

Thanks for the feedback and suggestions thus far guys. I tried changing IgnoreBadMemAccess to 'False', but the screen glitching problem persists. Here's some screens to show exactly what's happening:

image

screenshot_2018-10-06-14-14-59-705_org ppsspp ppsspp screenshot_2018-10-06-14-14-55-850_org ppsspp ppsspp

After the card cinematic plays, which only has a very brief minor graphical glitch at the beginning, the screen begins flashing between screens 2 and 3 every half a second or so. This seems to occur roughly 50-80% of the time a character card cinematic is played. Game continues to run and be controllable but the screen never reverts to normal.

hookaffy avatar Oct 06 '18 06:10 hookaffy