Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal Gear Acid 2 Special Card Videos Can Crash PPSSPP #10906

Open
TideGear opened this issue Apr 12, 2018 · 51 comments
Open

Metal Gear Acid 2 Special Card Videos Can Crash PPSSPP #10906

TideGear opened this issue Apr 12, 2018 · 51 comments
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Milestone

Comments

@TideGear
Copy link

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

@hrydgard
Copy link
Owner

hrydgard commented Apr 12, 2018

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.

@weihuoya
Copy link
Contributor

weihuoya commented Apr 13, 2018

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

@hrydgard
Copy link
Owner

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...

@TideGear
Copy link
Author

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
Copy link
Author

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

@hrydgard
Copy link
Owner

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
Copy link
Owner

Debugging crashes is super boring so I fixed the performance instead: #10911 It makes a pretty major change to the Vulkan stuff so not sure about merging before 1.6.

@TideGear
Copy link
Author

TideGear commented Apr 13, 2018

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

@hrydgard
Copy link
Owner

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

@hrydgard
Copy link
Owner

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 :(

@TideGear
Copy link
Author

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? #10814

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

@hrydgard
Copy link
Owner

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!

@TideGear
Copy link
Author

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?

@hrydgard
Copy link
Owner

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.

@TideGear
Copy link
Author

A US S9+ from Verizon.

@TideGear
Copy link
Author

TideGear commented Apr 14, 2018

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.

@hrydgard
Copy link
Owner

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
Copy link
Owner

Fixed it.

@TideGear
Copy link
Author

Yup, thanks! Crashes remain for now.

@TideGear
Copy link
Author

Just donated as promised!

@TideGear
Copy link
Author

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

@ghost
Copy link

ghost commented Apr 29, 2018

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).

@TideGear
Copy link
Author

@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?

@ghost
Copy link

ghost commented Apr 29, 2018

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.

@TideGear
Copy link
Author

TideGear commented Oct 5, 2018

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

@hookaffy
Copy link

hookaffy commented Oct 5, 2018

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.

@JMC47
Copy link

JMC47 commented Oct 5, 2018

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

@hookaffy
Copy link

hookaffy commented Oct 5, 2018

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

@unknownbrackets
Copy link
Collaborator

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]

@hrydgard hrydgard added this to the v1.10.0 milestone Aug 12, 2019
@hrydgard hrydgard added the PSMF / MPEG Issue involves scePsmf or sceMpeg video playback. label Aug 12, 2019
@TideGear
Copy link
Author

@chiffon-rouge Have you tried the latest build?

@spookyuser
Copy link

spookyuser commented Sep 1, 2019

This doesn't really fix the issue, but for other googlers you can disable card videos through the in game settings, which seems to stop the videos playing altogether and avoids the crashes.

image

@hookaffy
Copy link

hookaffy commented Sep 2, 2019

@spookyUnknownUser Indeed, disabling the card movies is the solution that I and probably most players of this game opted for, it's inelegant but works nonetheless. The card movies are a really cool part of the game imho, so finding a way to get them to play without crashing or soft locking the emulation would be pretty neat.

@spookyuser
Copy link

@hookaffy yeah totally agree. The card movies are awesome! Would be cool if this is fixed eventually 😎

@matoro
Copy link

matoro commented Apr 11, 2020

I would also like to tack on that I am still seeing this issue on both v1.9.4 tagged and v1.9.3-642-g7d3552ae3 on Linux x86_64, so it does not seem to be a platform-specific issue.

@hrydgard hrydgard modified the milestones: v1.10.0, v1.11.0 Apr 28, 2020
@Panderner
Copy link
Contributor

Still crashing on latest build?

@hrydgard hrydgard modified the milestones: v1.11.0, v1.12.0 Nov 23, 2020
@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Jul 11, 2021
@ghost
Copy link

ghost commented Oct 2, 2021

Anyone just try to add this game id to [MpegAvcWarmUp] compat.ini and see if it's help this issue.

@spookyuser
Copy link

Anyone just try to add this game id to [MpegAvcWarmUp] compat.ini and see if it's help this issue.

Just tried and it doesn't seem to have fixed it.

@sum2012
Copy link
Collaborator

sum2012 commented Oct 4, 2022

Anyone can retest the game with
v1.13.2-1366-g360eab321 or newer git version ?

@TideGear
Copy link
Author

Tested on both v1.13.2-1635 for Windows 64-bit and v1.13.2-1630 for Android. Both still crash.

Regardless, thank you for your continued efforts, everyone.

@sum2012
Copy link
Collaborator

sum2012 commented Oct 23, 2022

@TideGear Can you share the save states in here (zip first ,then upload in here) or https://www.mediafire.com ?

@sum2012
Copy link
Collaborator

sum2012 commented Oct 23, 2022

Using old save states in
#10906 (comment)
Crash when see two times of video
ppsspp-v1.13.2-1635-gbd81aa328 log:
https://gist.github.com/sum2012/7d320724b1457ea3e45b2201017752e9

@sum2012
Copy link
Collaborator

sum2012 commented Nov 13, 2022

Using old save states in #10906 (comment) Crash when see two times of video ppsspp-v1.13.2-1635-gbd81aa328 log: https://gist.github.com/sum2012/7d320724b1457ea3e45b2201017752e9
Game save
ULUS10077001.zip

@unknownbrackets
Copy link
Collaborator

Maybe this is a timing issue or something. It'd probably be useful to see all the sceGe* related calls right up to the crash. Maybe something is making it enqueue the next list earlier than it should?

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Interesting, what are the commands in the display list at 48a7c884 - 48a7c88c at that point? You'd think that after sceGeDrawSync() the display list would be done so there'd be no duplicate.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Nov 14, 2022

@unknownbrackets Do you mean it ? (In the bluescreen)
1

@hrydgard
Copy link
Owner

No you have to use the GE debugger to view the display list, viewing it as MIPS code isn't very meaningful as you can see (bunch of totally bogus branches...)

@sum2012
Copy link
Collaborator

sum2012 commented Nov 14, 2022

@hrydgard It is nothing in the bluescreen
2

@AleRosmo
Copy link

Still this issue, @hrydgard not sure how I can provide any valuable information on my crash? MacBook Pro 16" 32GB M1 Pro running Ventura 13.2.1 with latest MacOS PPSSPP version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Projects
None yet
Development

No branches or pull requests