-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GS: MLB Power Pros crash #2686
Comments
Just a guess, but maybe we should delete m_env.CTXT[i].offset.tex before assigning something new to it? |
Test if changing pcsx2/plugins/GSdx/GSLocalMemory.cpp Line 497 in ca68ddd
to
works. The memory is allocated with pcsx2/plugins/GSdx/GSLocalMemory.cpp Lines 518 to 520 in ca68ddd
|
Unfortunately that change didn't work. Let me know if there's any other info I should post/look for. |
Maybe the problem is in the pcsx2/plugins/GSdx/GSLocalMemory.cpp Line 507 in ca68ddd
So maybe in the constructor at: pcsx2/plugins/GSdx/GSLocalMemory.cpp Line 2049 in ca68ddd
there is the root cause of the leak in that case. |
is this a memory leak like in destroy all humans and in street racing syndicate? |
@RinMaru Not sure. (There's a few different ways GSdx can hog memory) See if they leak with this test plugin. If they don't, it would be safe to say that those games are affected by this issue as well. (rename the extension to .dll. Also, make sure you give it some time to sit while testing. MLB Power Pros still tends to use a bit more memory then other games do but after a minute or so, the memory usage will hover around a fixed amount. |
hmm it might be a diff issue since it has no affect on either titles CPU and ram just start choking. don't have MLB to test |
@turtleli @AlessandroVetere Would this be a logical change? I replaced pcsx2/plugins/GSdx/GSLocalMemory.cpp Lines 2077 to 2081 in ca68ddd
|
I don't think that's correct. The memory there is allocated with _aligned_malloc, so using _aligned_free there should be correct. pcsx2/plugins/GSdx/GSLocalMemory.cpp Lines 2160 to 2162 in ca68ddd
|
@MrCK1 Maybe upload a blockdump with a savestate as well so others can help with solving the issue. |
Nvm; I confused an array with map. |
Is this ever deleted? pcsx2/plugins/GSdx/GSLocalMemory.cpp Line 2103 in ca68ddd
EDIT: this seems to affect only SW mode, and there the deletion of such allocation is managed by |
It doesn't look like it's deleted anywhere but fiddling around with that didn't have an effect. |
Here is a blockdump and savestate for anybody else who feels like testing. Unfortunately, the blockdump uncompressed is 1GB in size due to the memory leak I presume. (You'll have to press X 2-3 times to go-ingame where the leak occurs.) (rename to .7z) |
Couldn't it be that the pcsx2/plugins/GSdx/GSLocalMemory.cpp Lines 518 to 520 in ca68ddd
Maybe we should check if the cache has too many items and clear it before adding a new entry. EDIT: In fact, offsets allocated with |
Aaand the line calling pcsx2/plugins/GSdx/GSState.cpp Line 909 in 1498f53
In fact |
Is the "leak" that big ? The number of GSoffset should be limited as you have 1 by texture "format". |
I'd say so. In this instance, memory usage will reach 2GB in about 40 seconds. |
https://github.com/PCSX2/pcsx2/blob/master/plugins/GSdx/GSDrawingContext.h#L84 |
I'm going to go ahead and say this issue has been resolved, retested with dev-3205 in DX11/OGL and seems to have no spikes with VRAM usage, crashing, ect. (Sparse texture hack was disabled for these tests of course) This is likely due to the recent changes that have been made to texture cache by @AlessandroVetere and @gregory38 . If the issue pops up again, we'll go from there :) |
Game is spamming nonsense TEX0 writes which is filling up the GSOffset cache:
|
We can add Bouken Jidai Katsugeki Goemon to the list of games affected by this. |
le tour de france and le tour de france centenary edition seems to have the same issue. https://forums.pcsx2.net/Thread-Le-Tour-de-France-Centenary-Edition-SLES-51488-E?pid=616517#pid616517 |
Also affects "Remote Control Dandy SF" |
PCSX2 version:
v1.5.0-dev-2671-gca68ddd0d
PCSX2 options:
Defaults
Plugins used:
GSdx-AVX2, Defaults
Description of the issue:
This change introduced a memory leak for all renderers of GSdx in rare cases such as MLB Power Pros.
How to reproduce the issue:
Boot the game, find a section with 3D rendering.
Last known version to work:
r1548, introduced in r1549
PC specifications:
i5-6600K@4.7GHz, GTX 1070, Windows 10 64-Bit Home.
In GSState.cpp:
In the bottom if statement: commenting out
m_env.CTXT[i].offset.tex = m_mem.GetOffset(TEX0.TBP0, TEX0.TBW, TEX0.PSM);
will resolve the memory leak.The text was updated successfully, but these errors were encountered: