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
11.39k stars 2.19k forks source link

Persona 3 Portable 5th block crash *fixed* #2846

Closed CrymsonZX closed 10 years ago

CrymsonZX commented 11 years ago

When I try to access the 5th block of Tartarus the game crashes with no explanation, I can still get to it via the 4th block but when I exit a battle 9 times out of 10 it'll crash as well, I'm using the default emulator settings and the game has been going smoothly till this point so I am really confused as to why this is happening. If anyone knows how to fix this, I'd be really glad to try it. Thank you in advance.

EDIT: Works with Hardware Transforming disabled, tested on version 0.8.1-648-g88685b0 Special thanks to @solarmystic and @vsub

EDIT 2: first of all, sorry for no updates, been trying to reach 5th block on my 2nd playthrough, but now that I'm there I can say that @sum2012 's build works with Hardware Transform ON, I can play perfectly without any crashes, but, I don't see a difference in speed as @solarmystic said, but that may be just me. In conclusion, this is closed for good, I'll just keep using this build until an actual official fixed version is released by the developers. Thank you @sum2012 for the build and @solarmystic for the trace that led to the build. And again, sorry for no updates in a while.

EDIT 3: Oops, guess I said that too soon... Tried to close the menu while in the block and it crashed on me... I'm gonna need to re-open this thread...

EDIT 4: Works without crashes on the newest version with default settings.

vsub commented 11 years ago

For XP is more than enough.

solarmystic commented 11 years ago

@CrymsonZX

Hmm.. so it is another NVIDIA vs AMD/Intel issue again. Interesting...

Well, basically speaking NVIDIA's cards have a rather superior implementation of OpenGL, which is what is used to render the graphics in PPSSPP.

There are often instances where games which wouldn't have any issues with NVIDIA's cards would have issues with AMDs and Intels cards. It seems like this is one of those many instances.

There are other games which demonstrate this issue on github that you can have a look here:- https://github.com/hrydgard/ppsspp/issues/2018

and this thread here:-

http://forums.ppsspp.org/showthread.php?tid=4383

None quite so severe as completely crashing the emulator though, they usually just manifest themselves with graphical anomalies and/or deficiencies.

CrymsonZX commented 11 years ago

Hmm... I see... I, unfortunately, have no way of getting a new computer to get an NVIDIA card (really hope I don't have to right now), so I guess that card is just more compatible with the emulator... Oh well... @vsub can play games with less hassle than we can, I guess that's just how it is... Well, thanks for the analysis @solarmystic and also for the threads, that second one can be useful for later games I may want to play. My emulator seems to be working without crashes right now, but, as I said before, I wanna clear the first boss before I update this thread. Until then, I hope no crashes happen... I REALLY want this to be the fix I was looking for... Thank you @solarmystic and @vsub for your help, really hope I can update it.

CrymsonZX commented 11 years ago

Alright, about to challenge the boss... fingers crossed this works.

CrymsonZX commented 11 years ago

WOO! Awesome, it's working fantasticaly. The boss is dead and no crashes were had. Thank you guys @solarmystic and @vsub for everything, couldn't have done it without you. So now I need to edit the title and declare this thread as closed, right? I'll get on it right now, and, again, thanks!

CrymsonZX commented 11 years ago

Right... um... How do I close this issue now? Or does it just close itself after a certain period of time?

solarmystic commented 11 years ago

@CrymsonZX

There's a Close and Comment button right next to the Comment button at the bottom of the screen.

You're welcome.

solarmystic commented 11 years ago

@hrydgard

Actually I don't really think this is fully resolved yet.

Disabling Hardware Transfrom just to prevent a crash shouldn't be considered a solution.

There's still the matter of the stacktrace I posted earlier on.

hrydgard commented 11 years ago

Eh, okay. I didn't read the whole thread.

CrymsonZX commented 11 years ago

@solarmystic Are you sure? It's working fine now, I would actually call it fixed. If a crash is happening, it needs to be prevented, and we prevented it, right? So isn't it fixed? About the stacktrace... If you want to wait until someone gives it a readthrough and sends the developers the report so they could fix it in the next version that's okay with me.

CrymsonZX commented 11 years ago

BTW sorry it took so long to reply, been busy.

CrymsonZX commented 11 years ago

@solarmystic actually... Why don't you send the stacktrace to the developers yourself, I'm sure they'll understand what's the problem and fix it.

solarmystic commented 11 years ago

@CrymsonZX

The developers are here, amongst us, right on the site lol.

@hrydgard is one of them and he has noted this issue now.

It is also common practice not to close an issue around these parts until it is properly resolved via a developer's fix that is commited to the master.

CrymsonZX commented 11 years ago

@solarmystic Great then, hope a new version with a fix for this and those other games on that other thread you posted in regards to the drives, now that they have details on this one, other people or even us could start a check on the other games too, to find out if there's even a way to fix it.

sum2012 commented 11 years ago

@solarmystic @CrymsonZX
I have tried to avoid run line 1292 by change line1291 to if (ebo && glprim > 0) Please test work or not

(sorry I only build windows 32 bit) https://docs.google.com/file/d/0B3OaSdeV0L8kVGR0UTJIOWJIeDg/edit?usp=sharing

solarmystic commented 11 years ago

@sum2012

Your build seems to work. No crashes here for Persona 3 Portable after the Tziah block and I managed to head to the 171st floor to fight the boss with Hardware Transform ON the whole way.

Hardware Transform also seems to work as intended (getting more Speed with it ON, and less speed with it OFF)

I don't know whether your solution is correct for other games though. It might be a hack.

hrydgard commented 11 years ago

Hm, we probably have a bug if glprim is ever 0 or below... thanks for investigating. Will look at this more soon.

sum2012 commented 11 years ago

Should thanks to @solarmystic make MSVC 2010 crash picture

unknownbrackets commented 11 years ago

I'm confused, glprim is a pointer isn't it (to static memory)? What does glprim > 0 even mean?

-[Unknown]

sum2012 commented 11 years ago

@unknownbrackets
You see solarmystic crash picture. https://f.cloud.github.com/assets/4345150/827927/3918e27c-f0a7-11e2-88ee-f70082b5602d.JPG glprim value is 0 edit:there is two glprim .my fix would just a hack

unknownbrackets commented 11 years ago

Those variables can be incorrect when dealing with a release build though. It'd be better to reproduce this with #pragma optimize("", off) at the top of the TransformPipeline.cpp file and then see what the variables are.

It also says prim is some crazy high value. If that's true, that's a really bad thing, but it looks like it's probably also the optimizer's fault.

-[Unknown]

hrydgard commented 11 years ago

Oh I thought it was prim you tested, not glprim. glprim can't be < 0 ... but if prim is, you get an out of bounds access and a possible crash indeed.

hrydgard commented 11 years ago

Does this still happen on master? I added a sanity check and a variable initialization.

solarmystic commented 11 years ago

@hrydgard

I can confirm that this issue is now resolved for my AMD hardware at least since that commit was merged to master.

Crash does not occur even with HW Transform On at the affected area.

Close it if you wish, we can always reopen if reports come back in for Intel chipset owners.

CrymsonZX commented 11 years ago

@hrydgard could you please re-open the issue? It crashed again while on the block with @sum2012 's build. As I said on the third edit, it crashed when I tried to close the menu. Until we find what's wrong I'll keep on playing with HT OFF. If anyone who already has my save and the build like @solarmystic could try it out, it would help, if not, I'll gladly send my save to someone else for them to try with the build.

CrymsonZX commented 11 years ago

Thanks @hrydgard I'll keep an eye on my email for updates.

sum2012 commented 11 years ago

@CrymsonZX
You are better to install Microsoft Visual Studio. Picture the crash screen. Then we can easier to solve it.

CrymsonZX commented 11 years ago

@sum2012 Take a picture? Or do you mean the details? Also, what is MS Visual Studio and where can I get it?

sum2012 commented 11 years ago

@CrymsonZX see https://f.cloud.github.com/assets/4345150/827927/3918e27c-f0a7-11e2-88ee-f70082b5602d.JPG MS Visual C++ 2010 Express is free http://go.microsoft.com/?linkid=9709949 edit :MS Visual Studio is a program tool.

CrymsonZX commented 11 years ago

@sum2012 So, you want the details of the crash? Got it... just a minute... as for MS Visual, I'm pretty sure I already have it though... I'll try to install it anyway.

CrymsonZX commented 11 years ago

@sum2012 I'll get the details once it finishes installing.

sum2012 commented 11 years ago

Do not forget to get the source of PPSSPP (My method is fork first,Then use githhub for windows to download source)

CrymsonZX commented 11 years ago

@sum2012 What do you mean? I don't get it, fork? Get what source? I don't know how to do that.

CrymsonZX commented 11 years ago

@sum2012 Hmm... Don't really know about that crash... Like the random battles one before the Hardware Transform fix, it seems to be random...

CrymsonZX commented 11 years ago

@sum2012 Doesn't seem like it's crashing now, for whatever reason... Last time I opened the menu, did EDIT 2, returned to the game, attempted to close the menu and it crashed...

sum2012 commented 11 years ago

@CrymsonZX see the picture to know how to fork 2

CrymsonZX commented 11 years ago

@sum2012 And, honestly, what does that do?

CrymsonZX commented 11 years ago

@sum2012 Oh... the build part? Is that what you mean?

sum2012 commented 11 years ago

@CrymsonZX Press fork to get current ppsspp 's source. You also need install Github for window http://github-windows.s3.amazonaws.com/GitHubSetup.exe. Need run it after install

edit:Yes ,I mean build part.

CrymsonZX commented 11 years ago

@sum2012 k screencap of the crash: image and details: Problem signature: Problem Event Name: APPCRASH Application Name: PPSSPPWindows.exe Application Version: 1.0.0.0 Application Timestamp: 51ed29f3 Fault Module Name: ig4icd32.dll Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4fabcf7b Exception Code: c0000005 Exception Offset: 00003100 OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 2070 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline: C:\windows\system32\en-US\erofflps.txt

sum2012 commented 11 years ago

@CrymsonZX Need run ppsspp inside MS Visual C++

CrymsonZX commented 11 years ago

@sum2012 How do I do that?

CrymsonZX commented 11 years ago

@sum2012 forget it, I figured it... :p

sum2012 commented 11 years ago

Open the source example: C:\project\ppsspp\Windows\PPSSPP.vcxproj

CrymsonZX commented 11 years ago

@sum2012 k... how I figured from the first 2 times, I need to leave it open for like, 5 minutes or more (I think) for the crash to happen... So I'll just wait a few minutes...

CrymsonZX commented 11 years ago

@sum2012 So, I noticed the debug option in the top and I'd like to know if that's needed for something.

sum2012 commented 11 years ago

@CrymsonZX no need setting. PS:I need to go out 2 hours

CrymsonZX commented 11 years ago

@sum2012 Dang, man... It just doesn't want to crash on me... but if it doesn't crash we can't find out why it did in the first place... And about the PS... Don't worry about it, when you need to leave, tell me, I'll wait.

CrymsonZX commented 11 years ago

@sum2012 k this is what it said when it crashed: First-chance exception at 0x10003100 in PPSSPPWindows.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x77a615de in PPSSPPWindows.exe: 0xC0000005: Access violation reading location 0x00000000. Do you know what it was?

CrymsonZX commented 11 years ago

@sum2012 and this is the line where the unhandled exception happened:

-77A615DE add esp,4