-
Notifications
You must be signed in to change notification settings - Fork 37
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
Excess ram usage after listing files. #395
Comments
I did manage to reproduce this on my Windows 7 VM, but I'm not sure what's causing it. MSVC doesn't seem to have as many useful memory leak tools as Linux environments (valgrind, heaptrack, etc). I tried out MSVCRT's built-in memory allocation reporting, and it did find one leak in AesCAPI_NG (only used when handling files that have encryption). I suspect that if the other leaks are in fact caused by rom-properties and aren't weird caching behavior in Explorer, it's likely a Windows resource leak and not something that can be detected by MSVCRT. Will look for resource leak tools next. |
Found something using WinDbg's !htrace command. https://ofekshilon.com/2014/07/08/debugging-handle-leaks/ Will post results once I'm done analyzing it. |
...and it seems I've hit a roadblock. What I thought were leaks was actually WinDbg logging both file open and close. Tried another tool and it showed many known memory leaks in Windows components, but nothing in rom-properties. I suspect it might be a problem with IExtractIcon using up too much memory, since Explorer isn't really designed for per-file icons. Disabling IExtractIcon will still allow for thumbnail previews. I'll look into doing this in rp-config and seeing if it helps with this problem. |
AesCAPI_NG leaks this in the destructor because it doesn't even attempt to free(pbKeyObject). Found while debugging #395: Excess ram usage after listing files. Reported by @MarkWolves.
…en if it wasn't opened. Otherwise, we end up leaking the RpFile. See issue #395: Excess ram usage after listing files.
By pressing F5 several times you can notice a non-returning increase in ram usage. The bug occurs in explorer. My Windows is 7 (updated since 2015-2023 - avoiding not using Windows 10).
The text was updated successfully, but these errors were encountered: