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

Phantasy Star Portable 2 crash at start with PPSSPP 1.2 in D3D9 #8593

Closed
Robsoie opened this issue Feb 14, 2016 · 38 comments
Closed

Phantasy Star Portable 2 crash at start with PPSSPP 1.2 in D3D9 #8593

Robsoie opened this issue Feb 14, 2016 · 38 comments

Comments

@Robsoie
Copy link

Robsoie commented Feb 14, 2016

Hi, just tried PSP2 the new PPSSPP 1.2 release on x86 and during game load on its start up , PPSSPP crash with a "PPSSPP encountered a problem..." window error message.
I am using the Direct3D9 backend, in OpenGL that game does not seem to crash (or at least does not crash during the game load/startup as i have not played extensively with it in 1.2 ).
I tested a couple other games but they worked correctly, so i assume it's PSP2 specific.

I have been using 1.1.1 - 870 for x86 until then and PSP2 worked (and still work as i revert to this version to retest) greatly in Direct3D9 there.

I uploaded pictures of the console log to imgbox in case it may help to see what's going wrong
http://imgbox.com/R3wNo4GW
http://imgbox.com/4leJtZFW

@Robsoie Robsoie changed the title Phantasy Star Portable 2 crash at start with PPSSPP 1.2 Phantasy Star Portable 2 crash at start with PPSSPP 1.2 in D3D9 Feb 14, 2016
@Robsoie
Copy link
Author

Robsoie commented Feb 14, 2016

Just tested the latest build , v1.1.1-949-ge954768 , and while the game still crashed, the console log added more messages that may be useful
http://imgbox.com/NTfaS3By

@daniel229
Copy link
Collaborator

It looks fine for me,can you find out which is the first build start to crash,which is the last build working.

@Robsoie
Copy link
Author

Robsoie commented Feb 15, 2016

Note : it's only for D3D9 for that game, i don't see any problem with OpenGL

The last working version with PSP2 in D3D9
ppsspp-v1.1.1-880-gb68f2de-windows-x86.7z

The first "crash on load" version for the same game
ppsspp-v1.1.1-882-ga1ff899-windows-x86.7z

@unknownbrackets
Copy link
Collaborator

Works fine for me as well. I tried 32-bit and 64-bit Direct3D 9, and played through the intro until you can first swing your sword. Make sure you're not using (a) cheats, (b) "read framebuffers to memory", (c) a broken iso. Try with the default settings. Also try updating your graphics drivers.

Does it not crash if you check "disable slow framebuffer effects"?

What video card are you using? It shows in System Info. Also, which version of Windows?

There are pretty careful guards, I thought, to bail in that code if you don't have INTZ support. That's the only thing I can think would be crashing there.

-[Unknown]

@Robsoie
Copy link
Author

Robsoie commented Feb 16, 2016

Hi, the iso is correct, no cheat enabled, default settings. I'm using an Intel "card" (oddly, it's more OpenGL that has dodgy drivers than D3D ones on Intel, and surprisingly in OpenGL the game load correctly).
Now as you suggested i ticked "Disable Slower Effect (Speedup)" before launching the game, and ... it worked without any single crash.

It's strange, as there does not seem to be any kind of special effect during the game loading. And the oddity is that this crash on load does not happen for any other game i tried and didn't happened either on version of PPSSPP before ppsspp-v1.1.1-882-ga1ff899-windows-x86 .

Anyways, with "disable slower effect" it can confirm it works perfectly again with D3D9 , i don't even notice anything missing from the game visual once i am in actual gameplay, as i even played a full mission and defeated the boss of it before returning to the main base.

@daniel229
Copy link
Collaborator

With "disable slower effect",it get graphic artifact in some area in both OpenGLand D3D.
01

@Robsoie
Copy link
Author

Robsoie commented Feb 17, 2016

Just saw that one, it's on the missions taking place in the abandonned coal mine on planet Moatoob
Oddly this does not happen in mission using other maps that i re-tried so far.
Re-enabling while ingame the "slower effect" crash instantly ppsspp as expected if i use 882 and up, so it does not seem to be something that can happen only at the loading .
http://imgbox.com/2dLJAGxc

I guess i'll stick with my previous 870 version as there was no such problem :
http://imgbox.com/Zfubpkio

@sum2012
Copy link
Collaborator

sum2012 commented Feb 19, 2016

It seems to driver problem
@Robsoie what is your GPU ?
Can you try to update driver ?
edit:mark #8535

@Robsoie
Copy link
Author

Robsoie commented Feb 25, 2016

It's an old Intel G41, using the latest available drivers, no more new drivers are made unfortunately for this "card" so if that's a driver problem it can't be solved, fortunately for me v1.1.1-880 run it perfectly so far so i'll just stick with it.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 25, 2016

@unknownbrackets
We try to avoid crash to that code or blacklist the gpu ?

@unknownbrackets
Copy link
Collaborator

I suppose. I'm thinking maybe it doesn't support INTZ, which means other old GPUs might be affected too, but I can't tell why the check wouldn't work...

I'd rather not blacklist explicitly because there's probably a whole class of GPUs that have this problem, just not super common since they're all on the older side.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Feb 28, 2016

@sum2012
Copy link
Collaborator

sum2012 commented Feb 28, 2016

@Robsoie
My sister netbook require this directx update to run it.(D3DX9_24 to D3DX9_29)
Can you also try to install it ? Thanks.
http://www.shdon.com/files/D3DX9_dll_update.zip

@Robsoie
Copy link
Author

Robsoie commented Feb 29, 2016

I already had the D3DX9_29 dll, it was part of the last DX9 update from microsoft (june 2010).

I tried your build and same problem, it crash during PSP2 is loading.
the console log at the time of the crash on your build show something similar in red to the other build
http://imgbox.com/MuXopSq5

Similarly as the ppsspp-v1.1.1-882-ga1ff899-windows-x86 and later builds too that crash in same condition, in OpenGL there's no crash with your build too.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 29, 2016

How about this ?
https://drive.google.com/file/d/0B3OaSdeV0L8kdlZyYWtud0JRMEE/view?usp=sharing
This should pop up more information when crash

@unknownbrackets
Copy link
Collaborator

Where are you logging? What I'd be interested in is what's happening here:

supportsINTZ = SUCCEEDED(intzFormat);

Does forcing supportsINTZ = false; fix this crash? Is supportsINTZ even getting set to true on this card, and if so what is the value of intzFormat? Maybe the driver is reporting it supports it, but it actually doesn't.

Looking at this more, though, maybe I should've checked also the D3DFMT_A8R8G8B8 format. What happens if you change this:

HRESULT intzFormat = d3d->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, displayMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_INTZ);
supportsINTZ = SUCCEEDED(intzFormat);

To:

HRESULT displayINTZ = d3d->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, displayMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_INTZ);
HRESULT fboINTZ = d3d->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_INTZ);
supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ);

It may be that it only supports INTZ in combination with a 16-bit display buffer or D3DFMT_X8B8G8R8 or something. I actually wonder if it's even necessary to check if it supports it for the display format... hmm.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 1, 2016

@unknownbrackets ,I gave him debug build,I test other computer that do not need debug version of vs2013 runtime,It is interest that pop up what error message,
Anyway,I would give him your suggestion to compile to test after I come back home in 7 hours.

@sum2012
Copy link
Collaborator

sum2012 commented Mar 1, 2016

@unknownbrackets I don't mean that "Is supportsINTZ even getting set to true on this card, and if so what is the value of intzFormat?"

@Robsoie
Copy link
Author

Robsoie commented Mar 3, 2016

Hello, sorry i didn't noticed you uploaded a debug build, so here's the console log from this debug build at the time it is crashing
http://imgbox.com/ElpDVkib

and as the last 2 lines are cut by the window size, here's the cut part of them
http://imgbox.com/4adCTIQJ

@sum2012
Copy link
Collaborator

sum2012 commented Mar 3, 2016

@Robsoie Did ppsspp pop up useful error message when crash ? (I don't mean console log)

@Robsoie
Copy link
Author

Robsoie commented Mar 4, 2016

It's only the generic window message "PPSSPP has encounted an error"... etc during that game loading, so i don't think it's helpful
The additional information it gives is
AppName: ppssppdebug.exe AppVer: 1.2.1.31 ModName: ppssppdebug.exe
ModVer: 1.2.1.31 Offset: 004438fe

And if i look in the "more" details at that kind of memory offset, there's just nothing listed
http://imgbox.com/0h3E6sjQ

@sum2012
Copy link
Collaborator

sum2012 commented Mar 14, 2016

@Robsoie
Try this build
It try to disable supportsINTZ
https://drive.google.com/file/d/0B3OaSdeV0L8kNmR3VTdEZWJKWlU/view?usp=sharing

@Robsoie
Copy link
Author

Robsoie commented Mar 21, 2016

Hello,
Thanks for the test build.
I just tested your new build and this time it does not crash in D3D9 during loading , it probably confirm that there's some kind of problem between my card driver and this INTZ thing , it looks to be working the same as the version of PPSSPP i use currently (ppsspp-v1.1.1-880-gb68f2de-windows-x86)
http://imgbox.com/jtstP7yg
http://imgbox.com/CQKbgzgO

@sum2012
Copy link
Collaborator

sum2012 commented Mar 21, 2016

@Robsoie Try this build
It may be that it only supports INTZ in combination with a 16-bit display buffer or D3DFMT_X8B8G8R8 or something

https://drive.google.com/file/d/0B3OaSdeV0L8kOVZPNkVKcGpta3c/view?usp=sharing

@Robsoie
Copy link
Author

Robsoie commented Mar 22, 2016

Hello,
This new build is working too, i could load the game in D3D9 and play around a bit without crashes too.
http://imgbox.com/d0VV4gu2
http://imgbox.com/eCalpjR5

But i noticed something, i don't know if it's related or if it's a completely different new problem but in the mission selection previews (to the upper right of the screenshot), the image is wrong
http://imgbox.com/N9A4LxBi.

This didn't happened on the previous build you uploaded, the preview image was correct

@unknownbrackets
Copy link
Collaborator

I think the image being wrong is related to 8a39794. I don't thin it's related to these changes.

So is supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); the version that worked? That seems safe enough.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 23, 2016

@Robsoie
Copy link
Author

Robsoie commented Mar 23, 2016

Hello, i just gave a try to your new build, but the mission preview is still wrong
http://imgbox.com/CDykyWEX

@sum2012
Copy link
Collaborator

sum2012 commented Mar 24, 2016

@Robsoie how about this build ?
It is same as above ppsspp 's same git version but disable supportsINTZ
https://drive.google.com/file/d/0B3OaSdeV0L8kWkl4UEFCUVllemc/view?usp=sharing

@Robsoie
Copy link
Author

Robsoie commented Mar 24, 2016

Hello, this build display the mission preview correctly
http://imgbox.com/oLXnmiHm

Odd that it seemed to affect only that mission picture but not the background universe image that the planets are rotating in front of.

@sum2012
Copy link
Collaborator

sum2012 commented Mar 24, 2016

@unknownbrackets
So is supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); version not work correctly

@unknownbrackets
Copy link
Collaborator

So you're saying:

  1. The current master's supportsINTZ detection causes crashes.
  2. supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); presumably causes it to have supportsINTZ = false;, but causes glitches.
  3. supportsINTZ = false; works fine.

Is that right? You said you reverted 8a39794, which I don't understand. That commit would've probably fixed issues, so reverting it would bring them back. Did the first build you sent, which didn't crash, already have 8a39794 in it?

I feel like logically, supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); on the current master, without reverting anything, ought to work. If it doesn't work, I'd like to understand why it causes that weird corruption and supportsINTZ = false; doesn't. If that is the case, I guess it must mean supportsINTZ = true; still, but somehow without crashes.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 25, 2016

@unknownbrackets Yes 1,2,3 points are right
last test #8593 (comment) doesn't revert 8a39794

@unknownbrackets
Copy link
Collaborator

Right but #8593 (comment) you reverted it, I don't understand why?

And the one before that, #8593 (comment), was created after 1970d38, so probably has the bug that 8a39794 fixed.

So I think supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); DOES work, but one of the test builds simply included a totally separate Direct3D9 bug that has been since fixed on master.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 25, 2016

@unknownbrackets So do you let me give him v1.1.1-882-ga1ff899 with supportsINTZ = SUCCEEDED(displayINTZ) && SUCCEEDED(fboINTZ); version ?

@Robsoie
Copy link
Author

Robsoie commented Mar 28, 2016

Hello, after reading the " d3d9: Check actual FBO format for INTZ support #8665 " i gave a try to the latest build , ppsspp-v1.2.2-230-g4ad0af4 , and it seems to fix the crash and image preview
http://imgbox.com/oBKVOOwj
http://imgbox.com/KwwmZegP

So it seems the problem is fixed, at least for what concern my system as apparently it worked for other people

@hrydgard
Copy link
Owner

Great! I'm closing, let's reopen if we get any more reports.

@Robsoie
Copy link
Author

Robsoie commented Mar 28, 2016

Playing a bit with this version, i noticed a very old problem seems to have a resurfaced
http://imgbox.com/CV5z68kw

Sometime (as it's not constant), when you're moving/rotating the view, it can happen that you see some lights through walls, like in the case of that screenshot, some of the lights that were in the tunnel behind the rock.

I say very old problem, because i remember this could happen in older versions of PPSSPP, but you had fixed it at some point, as on the PPSSPP version i was actively playing with, v1.1.1-880-gb68f2de , this didn't happened anymore

I do not know if it's related to the whole ordeal between my chipset D3D9 drivers and the FBO/INTZ or if it is a new (at least since v1.1.1-880-gb68f2de as i couldn't test further version in D3D9 with that game due to the crash that got recently fixed) problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants