hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.81k stars 2.12k forks source link

Race Driver 2006, Simulate UMD delays crashes or hangs in Simulator Modes "Now Loading" screens (Windows) #7425

Open issuer opened 9 years ago

issuer commented 9 years ago

The game crashes PPSSPP 1.0 with FastMem after the loading screen just before each race in Simulator Modes and hangs with FastMem disabled. Oddly enough, the game gets past the loading screen and is playable on the Trans World Cup mode and since it's by the same developer of the DTM \ ToCa \ V8 Supercar games (CODEMASTERS) has the same issues as #7294.

Warning spam in said loading screen below. Also, no errors are logged, just warnings. rd2006_warning_spam

unknownbrackets commented 9 years ago

What's the log look like before the first invalid address error? The actual invalid addresses don't tell us much.

-[Unknown]

issuer commented 9 years ago

Im confus. Tested a couple of times and it seems completely random, sometimes it works sometimes it doesn't. I managed to get two full debug logs with FastMem.

CRASH: https://www.dropbox.com/s/jxgovpco5zuw3nl/ppsspplog_RD2006_CRASH.rar?dl=0 Got past the "Now Loading" screen due to wizardry: https://www.dropbox.com/s/2x4o39rk1adwdns/ppsspplog_RD2006_WORKED.rar?dl=0

daniel229 commented 9 years ago

I can't reproduce the invalid addresses.

Here is the artifact from Gedebugger 01 02 more tabs https://gist.github.com/daniel229/62e51403df59a762bac1

Bigpet commented 9 years ago

do the crashes happen without jit?

daniel229 commented 9 years ago

I can't reproduce the invalid addresses in Time Trial mode,and it alway happens,I tested many build since 0.8.1.disable jit not help.

issuer commented 9 years ago

@Bigpet, yes they do, it also must be some setting i'm using since i mess with my settings quite often but i still can't figure it out what it is that is causing it to hang or crash.

I went on and got the latest dev build from orphis v1.0-38-g05fc4cf to test daniel229's reply... To my surprise the game don't spam invalid addresses anymore and thus doesn't crash, i have just noticed a couple of SCE_KERNEL_NO_ASYNC but i guess that may be fine.

It's definitely some setting i'm using that's causing this, but i just don't know what can it be. Disabling JIT did not help and doesn't seem related to it. I'll do some more testing and report back when i get these and what's causing them if i do manage to replicate the issue.

issuer commented 9 years ago

Wow today must be my lucky day. Found the culprit on the second try:

I/O timing method: Simulate UMD Delays is causing the crashes (with FastMem) and the hangs (without FastMem).

I didn't know changing the I/O timing method could be this harmful. In fact, i believed Simulate UMD Delays was safer than Fast and Host.

unknownbrackets commented 9 years ago

Simulate UMD delays is new and not entirely stable. Currently, it fixes issues in a few games and creates new issues in a few other games. Even native fixes issues in some games, which is somewhat scary since that's the non-deterministic one.

It's possible that most of the affected issues are related to IO timing in general (not using the game's requested thread priorities to schedule it), or that they're all caused by a couple completely unrelated timing issues outside IO (possibly even the same issue, like even networking.)

-[Unknown]

issuer commented 9 years ago

Some more pieces to solve the puzzle in my brain, your explanation was really enlightening. So, the games request threads to be executed at specific times, if one gets in too early or too late then the whole thing falls apart. I understand now the purpose of the I/O timing.

Also, it is up to you to close this issue or not. I will not close it since it is indeed a bug with Race Driver 2006 and Simulate UMD delays but it was my fault in the first place changing from the default value Fast that has caused all of this misunderstanding.

unknownbrackets commented 4 years ago

Has this improved in the latest git builds? Some of IO timing has been made more accurate, at the thread level.

I'm hoping that may have improved "Simulate UMD Delays" for this game.

-[Unknown]

Panderner commented 4 years ago

Has this improved in the latest git builds? Some of IO timing has been made more accurate, at the thread level.

I'm hoping that may have improved "Simulate UMD Delays" for this game.

-[Unknown]

No. It doesn't improved. Crashes in simulator modes even in fast memory turned off

CookiePLMonster commented 3 months ago

This probably should be re-opened. As of 1.16.6 the game still crashes on loading screens.

hrydgard commented 3 months ago

Sure. Though, 16.6 is not the latest version.

CookiePLMonster commented 3 months ago

For completeness, I have re-tested on v1.17.1, and the same issue persists. image

Funnily enough, my initial test was actually incorrect as I had Host timings selected. However, this test was performed with Simulate UMD Delays, yet the issue manifests itself the same way anyway.