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

Gran Turismo series PCSX2 Crashes #1313

Closed
MarcoEstevez opened this issue Apr 26, 2016 · 99 comments
Closed

Gran Turismo series PCSX2 Crashes #1313

MarcoEstevez opened this issue Apr 26, 2016 · 99 comments

Comments

@MarcoEstevez
Copy link
Contributor

PCSX2 Crashes when going in races, no issues while on menus.

PCSX2 1.5.0-20160426190932 - compiled on Apr 26 2016
Operating System = Microsoft Windows 10 Home (build 10586), 64-bit
Physical RAM = 7986 MB
CPU name = Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz

OpenGL information. GPU: GeForce GT 755M/PCIe/SSE2. Vendor: NVIDIA Corporation. Driver: NVIDIA 364.72


I did several tests, and I managed to reproduce only on IR greater than Native.

image

If I start the game with Native res. then it works fine, while on game If I change IR to 2x game works during few seconds at full speed until it crashes after few seconds.


Im not sure if that is a general issue or its only me due a weak GPU, but I remember being able to play it a 3x on previous builds.


Im not sure if that related or not but PCSX2 Console get spammed with thousands of messages.

SummerTime=0
Timezone=60
SummerTime=0
Timezone=60
SummerTime=0
Timezone=60
SummerTime=0
Timezone=60

@willkuer
Copy link
Contributor

Can you please post the full emulog after the crash? (can be found in logs/emulog.txt in the directory of pcsx2.exe)

@FlatOutPS2
Copy link
Contributor

Related to this: http://forums.pcsx2.net/Thread-Gran-Turismo-4-crash-in-OpenGL-Mode?page=2
And #1314: There was a regression in git builds 650/651, that made it more likely to crash than usual.

The log messages are because you probably haven't been to the bios(boot with no disc selected) to set the time(zone).

@gregory38
Copy link
Contributor

Yes, it is expected. And it will remain like that until I (or someone that beat me) properly fix the handling of the bad effect.

@MarcoEstevez
Copy link
Contributor Author

MarcoEstevez commented Apr 27, 2016

Great, I'll try to set up bios as you said, I just tried different ones yesterday, so most probably is that.

I will also re-test with @gregory38 fix as soon as I get home.

@MarcoEstevez
Copy link
Contributor Author

@willkuer
Copy link
Contributor

Can you please try without gzip?

@MarcoEstevez
Copy link
Contributor Author

@gregory38
Copy link
Contributor

The crash is normal. There are too much memory allocation in GSdx. Until it is properly fixed, you need to reduce the upscaling or use a custom resolution.

@MarcoEstevez
Copy link
Contributor Author

However no crashes on Native or Custom, that surprised me cause I've set custom to HD (1920x1080) what I believe its greater resolution than 2x.

@MarcoEstevez
Copy link
Contributor Author

3 secs faster than me :-)

I just heard than integer scales were better than Custom ones.

@ssakash
Copy link
Member

ssakash commented Apr 27, 2016

Custom uses RT buffer size equivalent to the scaled value (lower buffer size) whereas native scaling resolution use a bigger buffer size which increases the memory consumption.

@MarcoEstevez
Copy link
Contributor Author

Thanks, for your time and explanations. I don't think this is an issue or regression, anymore. I did use Custom Res before until @willkuer told me one day Native scaling is much accurate than custom, and then my confusion.

So both fashions, Custom and Native has benefits and counterparts :-D.

@gregory38
Copy link
Contributor

Native scaling is better, however it highlight bugs in texture management. You still have it in custom resolution (monitor you vram and you will see a huge allocation).

@willkuer
Copy link
Contributor

It needs to be like that. Native scaling is naturally an automorphism. Custom resolution needs rounding. Additionally scaling is always less 'accurate' or just not the same as native resolution. The effect you see is - if i understood correctly - rather related to a wrong or lets say inacurate implementation.

@gregory38
Copy link
Contributor

The bug is the renderer allocating hundreds of framebuffer instead of 1. Integer upscaling requires 5-20 MB by framebuffer. Due to the useless allocated fb, it becomes 500-2000MB of extra memory. When I will fix the bug, memory will be small even at 8x

@gregory38
Copy link
Contributor

If you want to play the game, use the stable release. (Until I fix the git version)

@MarcoEstevez
Copy link
Contributor Author

Well... to me the game looks great even at Native resolution, custom one does not seem to have any graphical problems acording to my eyes. I just opened this issue cause I though it was a new introduced bug.

Out of curiosity, what makes stable ones works?, does stable use less memory?

@gregory38
Copy link
Contributor

Stable is stable by definition

Stable has some hack to avoid the issue but it break some rendering. Git is work in progress with the intended goal to fix most issue correctly.

@MarcoEstevez
Copy link
Contributor Author

Thanks @gregory38, I'm looking forward your upcoming memory improvement fix.

@gregory38
Copy link
Contributor

I'm looking into it. Some stat number from Metal Gears Solid 3 (but I suspect the same effect is used for GT4). Done with a scaling of 4x

Before (2994MB):

T:Perf  ID:41251    S:Info  => MEM: RO Tex 12MB. RW Tex 48MB. Target 2680MB. Depth 160MB
T:Perf  ID:41251    S:Info  => MEM: Surface Pool 94MB

After (total 460MB):

T:Perf  ID:40495    S:Info  => MEM: RO Tex 14MB. RW Tex 48MB. Target 160MB. Depth 160MB
T:Perf  ID:40495    S:Info  => MEM: Surface Pool 78MB

So far the draw call is only skip but I hope to emulate it properly.

@gregory38
Copy link
Contributor

Actually I pushed my change to master. So could you test the impact on GT4? Thanks you.

@FlatOutPS2
Copy link
Contributor

I tried it on Killzone(another game with RAM spike issues) , it uses 1.5GB less now. :)

I'll try it with GT4 too.

@gregory38
Copy link
Contributor

Great. Note I open a meta issue for those games (#1318)

@FlatOutPS2
Copy link
Contributor

FlatOutPS2 commented Apr 28, 2016

No change on GT4. It's fine on native and 2x, with both pre-RAM fix and current master with fix. But on 3x native it rises by at least 2GB and crashes, even with the fix.

@gregory38
Copy link
Contributor

Too bad. Either it isn't the same effect or I don't catch it properly. It could be useful if you manage to generate me a gs dump at the ram spike.

@gregory38
Copy link
Contributor

gregory38 commented Apr 28, 2016

I have a ram spike on prince of persia. I will debug this one first (because I have the dump and know the rendering).

@MarcoEstevez
Copy link
Contributor Author

No changes on GT3 either. stops working at same point: IR 2X.

@MarcoEstevez
Copy link
Contributor Author

here you can find gs dump, if that helps

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

@FlatOutPS2
Copy link
Contributor

It reports 3840.

@gregory38
Copy link
Contributor

Ok doesn't work so. It is the default value. Feel free to play with the opengl code in last commit (GSDeviceOGL.cpp)

@FlatOutPS2
Copy link
Contributor

FlatOutPS2 commented Jul 7, 2016

GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX reports the wrong value, but GL_TEXTURE_FREE_MEMORY_ATI seems to report the correct VRAM size.

@gregory38
Copy link
Contributor

_NVX is for nvidia GPU normaly.

@gregory38
Copy link
Contributor

Maybe you could test the others enum
https://www.opengl.org/registry/specs/NVX/gpu_memory_info.txt

        GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX          0x9047
        GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX    0x9048
        GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX  0x9049

@FlatOutPS2
Copy link
Contributor

Yes, it seems it was just using the default when forcing _NVX.
else if (GLLoader::found_GL_ATI_meminfo) does not trigger though, but like I posted it does show the correct VRAM when I removed the if functions.

No extenstion supported to get available memory. Use default value was printed on the log, but it was hidden on the previous line. OpenGL renderer is slow on AMD GPU due to inefficient driver. Sorry. lacks the \n to move it to the next line.

@gregory38
Copy link
Contributor

So what is the value returned with AMD. I want to know if it is the full vram or only the remaining one.

@FlatOutPS2
Copy link
Contributor

It is the full vram.

@gregory38
Copy link
Contributor

Ok. Remain to see what happen when a lots of textures are allocated.

@FlatOutPS2
Copy link
Contributor

It modified the latest master so that it prints the VRAM deficit, it only crashes once memory usage is twice the available VRAM. Maybe close GS Window with a emergency warning before this happens?

@gregory38
Copy link
Contributor

Hum, it isn't twice, it is the 4GB limit of a process. In this case maybe we can keep the ~3800 default limit.

@gregory38
Copy link
Contributor

Need someone with 1GB card to test

@DonelBueno
Copy link

This still happens to me in HW mode. Even in OGL and with accurate options enabled.

@FlatOutPS2
Copy link
Contributor

This still happens to me in HW mode. Even in OGL and with accurate options enabled.

Are you using the NTSC version as well? I've never seen it in the PAL version. Can it happen during any event?

@MrCK1
Copy link
Member

MrCK1 commented Jul 10, 2016

I can actually shed some light on this. From what I remember, the issue popped up in February while we were adjusting RT sizing, depth, or memory management but I don't remember what exactly. Despite this fact, It's not a regression.

I tried to pin it down before, but I never found it related to a specific build. The only thing I was ever certain on was that it only happens on specific maps. I own the NTSC copy btw.

If you care to scroll up to May 6th (can't quote in ForkHub :P) I previously mentioned that this is hard to duplicate.

@DonelBueno
Copy link

Yes, mine is NTSC. It also happens in GT3 (which is also NTSC).

@Enverex
Copy link

Enverex commented Jul 9, 2017

I'm getting the earlier discussed memory issue in Gran Turismo 4 here as well. It's fine until the camera changes to look at your car at the start of the race, after a few seconds the framerate drops to <5fps.

Full console log from PCSX2 is here - https://www.hastebin.com/qahuhitajo.py

Lines of note are:

PCSX2 1.5.0-20170703192203 - compiled on Jul  8 2017
Savestate version: 0x9a0d0000

Host Machine Init:
	Operating System =  Linux 4.11.9-1-ARCH x86_64
	Physical RAM     =  7690 MB
	CPU name         =  Intel(R) Core(TM) i7-5775C CPU @ 3.30GHz
	Vendor/Model     =  GenuineIntel (stepping 01)
	CPU speed        =  3.296 ghz (8 logical threads)
	x86PType         =  Standard OEM
	x86Flags         =  bfebfbff 7ffafbbf
	x86EFlags        =  2c100000

x86 Features Detected:
	SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
Current Renderer: OpenGL (Hardware renderer)
Available VRAM/RAM:3840MB for textures
GSdx Lookup CRC:0

Note that it seems to detect the card as 3840MB, despite the fact it's a 6GB card (and I have nothing else open). The card is an Nvidia GTX 1060 (using the official drivers).

Unknown device 'dev9x'
Available VRAM is very low (-48811521), a crash is expected ! Disable Larger framebuffer or reduce upscaling!
GSDX OUT OF MEMORY

I can provide a video too if that would be helpful.

@MrCK1
Copy link
Member

MrCK1 commented Jul 9, 2017

3840 is always the reported memory available. Did you see the previous comments?

@Enverex
Copy link

Enverex commented Jul 9, 2017

I'd somehow missed that. Still, I assume the overall issue persists as I'm seeing the "GSDX OUT OF MEMORY" error when using only 4x and no large framebuffer.

@gregory38
Copy link
Contributor

4x is too much for this game. Otherwise, the only solution is to use custom resolution (but I removed it from the linux GUI, so you need to edit the ini file manually).

@mirh
Copy link

mirh commented Dec 31, 2017

Come to think - might latest nvidia driver have improved this?
...
Is this reproducible outside of nvidia?

@d4d385
Copy link

d4d385 commented Feb 5, 2018

Hello everybody,
when I am playing GT4, the view of the car changes randomly on its own, I should control the camera view with the select of my PS1 pad, but the system changes it for me every minutes. Does that happens to you guys as well?
Thank you

@MrCK1
Copy link
Member

MrCK1 commented Feb 5, 2018

@d4d385 This isn't the place for general support. Please redirect your question over to the PCSX2 forums Thanks!

@FlatOutPS2
Copy link
Contributor

@refractionpcsx2
Copy link
Member

Is this crash still happening?

@MarcoEstevez
Copy link
Contributor Author

MarcoEstevez commented May 9, 2022

These were my specs back when I opened this issue.

CPU name = Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
OpenGL information. GPU: GeForce GT 755M/PCIe/SSE2. Vendor: NVIDIA Corporation. Driver: NVIDIA 364.72

Since I upgraded my hardware:
CPU name = Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
NVIDIA GeForce RTX 2060

I haven't got that issue anymore. but I feel besides hardware, lot have improved on the emulation side, shader cache, x64 builds, vulkan, etc I think is safe to close this, or at least I can't reproduce myself

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

No branches or pull requests