Weird memory leak issue with OpenGL - Printable Version

+- (
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: General Discussion and Announcements (/forumdisplay.php?fid=2)
+--- Thread: Weird memory leak issue with OpenGL (/showthread.php?tid=28135)

Weird memory leak issue with OpenGL - DrTails - 10-23-2021 06:11 PM

I'm having what appears to be a weird memory leak issue when using OpenGL on any PSP title. Both Vulcan and Direct3D are working fine without issue.

It keeps building up memory usage until reaching 14-15GB, and then crashes.
The weird thing is, that if I enable "Show debug statistics", the increase in memory stops. Disabling the statistics resumes the increase in memory usage.

Does anyone have a clue what could be causing this?


AMD Ryzen 9 3950X
32GB RAM, DDR4 3600MHz
RTX 2080 Ti

Please let me know if more info is needed, I would really like to solve this issue.

RE: Weird memory leak issue with OpenGL - [Unknown] - 10-24-2021 04:19 AM

Could you try enabling the setting in developer tools to log frame drops? It'd be useful to know if this stops the memory usage too, although that isn't a fix. That setting does some, but not all, of the things show debug statistics does.

If that doesn't help, it almost has to be something about UI. Does it matter if FPS is displayed or not? This could be somehow graphics driver related.

Otherwise, if it also helps, it would have to be related to tracking data which is strange.

It'd also help if you could try the latest git build, as well as a pretty old version like v1.3.x:

This will be buggier, but if it doesn't have these problems, at least we can tell it was introduced at some point. If it still has these problems, I'm really going to expect either a driver issue, or some sort of plugin like reshade/etc.


RE: Weird memory leak issue with OpenGL - DrTails - 10-24-2021 06:43 AM

I tested enabling the log frame drops, but it didn't change anything.

However, enabling the FPS counter does indeed stop the memory usage from increasing.

I was already running the latest build, 1.12.3, which has the issue.
But as suggested, I also downloaded the linked 1.3 version and tested things there. No increase in memory usage in that version.
I also tested the games in the latest build of Retroarch with OpenGL (no FPS counter enabled or anything else), no constant increase in memory usage happening there either.

So could this still be a graphics driver issue?

RE: Weird memory leak issue with OpenGL - [Unknown] - 10-25-2021 12:49 AM

Using an NVIDIA card and a recent git build, I tried the same settings (I almost always have the FPS counter enabled so I was worried maybe there was some glitch I didn't notice.) I played Persona 3 a bit with an HD texture pack installed. Memory usage didn't really go above 200 MB.

So I do think this might be some kind of driver issue, but it's interesting that v1.3 didn't have it.

If you could try a few older versions here (i.e. maybe 1.7, and then either one more newer or older depending on if that one has the issue), that might give more an idea when it happened:

Ultimately, even if it's a driver bug, if there's something we started doing that's triggering it... we may be able to stop doing that thing. Or at least do something else. That said, driver bugs can be tricky beasts.


RE: Weird memory leak issue with OpenGL - DrTails - 10-25-2021 05:11 AM

Having tested a few versions, here is what I found:

1.7/1.7.1/1.7.4 are all working perfectly fine without any issues.
1.8 and onward is where the issue appears and the memory usage keeps increasing, unless enabling debug statistics or the FPS counter.

RE: Weird memory leak issue with OpenGL - DrTails - 11-17-2021 02:59 PM

Update on this issue:

I ran DDU and reinstalled the Nvidia drivers, and the memory leak no longer happens.
Still not sure why the memory issue never happened in the older versions.

Anyway, issue resolved and everything works.