shagu / pfUI

A User Interface Replacement for World of Warcraft: Vanilla & TBC
https://shagu.org/pfUI
MIT License
343 stars 116 forks source link

nameplates: potential memory leak in pfNameplates:OnUpdate() #1203

Closed BensonLiu1121 closed 4 months ago

BensonLiu1121 commented 1 year ago

**I installed Pfui, and I also installed quite a few other plugins. This causes my game to trigger a 'Next Memory Cleanup' every minute, and when it does, there's a noticeable lag on the page, and sometimes the game drops/or is abnormal. In the game's error directory, an error log is generated, An SMem3 error is displayed in the log: I play Turtle server, Chinese Hogg


Exe: K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 PM open service) \WoW.exe

Time: Sep 29, 2023 1:38:22.950 AM

User: admin

Computer: DESKTOP-QPV66F3


This application has encountered a critical error: ERROR #124 (0x8510007c) Memory Invalid Block Program: K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 p.m. Open service) \WoW.exe Object: SGroupPtr (.? AUSGroupPtr@@)

SMem3: Pointer does not refer to a valid allocated block of memory

WoWBuild: 5875


Stack Trace (Manual)

Address Frame Logical addr Module

006452BE 0019FE54 0001:002442BE K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 PM open service) \WoW.exe 0064623A 0019FE68 0001:0024523A K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 PM open service) \WoW.exe 006457C9 0019FE88 0001:002447C9K :\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 PM open service) \WoW.exe 00646449 0019FE9C 0001:00245449 K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, 11 PM open service) \WoW.exe 006BD0D8 0019FF74 0001:002BC0D8 K:\WoWTurtle\ Warcraft turtle service [Asian service \ Russian service] client download (open download, open at 11pm) \WoW.exe 77147BA9 0019FF84 0001:00007BA9 C:\WINDOWS\System32\KERNEL32.DLL 77BDB79B 0019FFDC 0001:0006A79B C:\WINDOWS\SYSTEM32\ntdll.dll 77BDB71F 0019FFEC 0001:0006A71F C:\WINDOWS\SYSTEM32\ntdll.dll


Stack Trace (Using DBGHELP.DLL)

BensonLiu1121 commented 1 year ago

My Email: 27769001@qq.com

BensonLiu1121 commented 1 year ago

It may be a network problem, the game client is not closed, but the network is down, need to log in again

shagu commented 1 year ago

Greetings, you could try to load pfDebug to see which of the addons are causing the increasing memory footprint. Clicking on the little box with memory info, will open the analyzer that lets you scan for frames and then show which of them are producing that much memory garbage.

BensonLiu1121 commented 1 year ago

1111

BensonLiu1121 commented 1 year ago

The 'Memory Usage' is 120MB, then 'Next Memory Cleanup' should be '140MB. 140-120 =20MB, Whether to support adjusting this value, whether to support adjusting this value, Because I want to clear the cache less often

BensonLiu1121 commented 1 year ago

Or I wonder if I can support the ability to cancel memory clearing, because every time memory is cleared, it may cause network disconnection. Maybe some other program cleaned up this part of memory, and then the plug-in cleaned up this part of memory, indicating that it did not clean successfully.

shagu commented 1 year ago

It is nothing that pfUI does. It's done by the game itself. You gotta find the addon that is causing the memory leak. Because using pfUI without any other addons has a stable memory footprint and does not trigger those cleanups.

BensonLiu1121 commented 1 year ago

oh... I see....I closed the other plugins and gave them a try

BensonLiu1121 commented 1 year ago

pfNameplates:onUpdate() Keep growing, Other plugins are not growing

BensonLiu1121 commented 1 year ago

I should try to open some plugins and listen for this

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity.

BensonLiu1121 commented 7 months ago

1111

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity.

BensonLiu1121 commented 6 months ago

1111

shagu commented 6 months ago

I'll double check the pfNameplates code to see if there's a potential leak inside. Do you have a clean way to reproduce it while only pfUI is running? Just to be sure it's not a conflict with another addon, and also giving me the option to review the potential changes I do.

BensonLiu1121 commented 6 months ago

1111

shagu commented 6 months ago

Once all nameplates are created, it remains stable at around ~350kb after it built like 20 nameplates. At this point, I can't get the pfNameplates:OnUpdate() function to grow any further. Been running around for 10 Minutes with all nameplates enabled now - It stays at 350kb.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 30 days with no activity.

BensonLiu1121 commented 4 months ago

1111

shagu commented 4 months ago

As you don't participate in the discussion, don't answer the open questions and just write "1111". I will now close this. That shit gets annoying here. I will no longer waste my time for you.