Decursive

Decursive

26M Downloads

Memory Leak

zaphon opened this issue ยท 7 comments

commented

I have been troubleshooting another issue when I noticed that Decursive about every 20-30 seconds grows to about 200+ MB of memory usage before Garbage Collection kicks in and it drops back down off the list. And than I watch it grow back up to 200+ MB again over and over. Obviously GC takes care of the leaked memory, but it's not free, and might be something worth looking at. I've honestly never noticed it before, but I also don't watch my addon memory usage that often either. So not sure how long it's been doing this.

commented

Thanks for this, I'm traveling for work but will be back tomorrow and will test it ASAP.

commented

Thanks for reporting this, can you give me more details on the conditions for this memory leak to occur, is it constant or only in certain conditions? I suppose you are using the latest version?
What version of WoW are you using? (classic, wrath or retail)

Can you try with Decursive alone? or reinstall Decursive with libraries installed separately? (you will need to use the -nolib files provided here https://github.com/2072/Decursive/releases and install the libraries separately in the Curse Client - right click on Decursive -> install settings -> install libraries separately) because this can be caused by another add-on using one of Decursive's shared libraries...

Note that I could not reproduce this issue.

commented

Oops, yeah I can provide the details.

This was on retail, I was in a 40 man raid (doing the Superbloom event), and I am on the latest version. I will attempt to isolate this issue further as suggested (no other addons, and using the -nolib version). I will report back my findings after I do so. I will have to wait until the day time (US) as right now none of the events will get anywhere near a 40 man group.

commented

I think I found the problem, unfortunately it's on Blizzard's side. It has to do with their new C_UnitAuras APIs which are creating garbage internally every time they return a buff and debuff data....
The new API should allow me to limit the number of calls and useless data return (which should limit the leaking only when a unit has active buff/debuff of interest) but it's a Blizzard issue they have to fix on their side...

For now what you can do to limit the damage when there is no buff/debuff on units is to disable the "Show Stealth Status" in the Micro Unit Frame option panel. This will stop Decursive scanning for stealth buffs.

commented

Fun, gotta love these patches / improvements. :-)

I did actually manage to get to test it with no other addons than Decursive (I see the same issue, but it goes from like 8MB to 30MB before it get's GC'd), same with no other addons with the nolibs version (similar to above, still see the climb, but get's GC'd even earlier), and finally with all my AddOns and nolibs version of Decursive (I already have every single lib dependency via other AddOns), and it was similar to the original. I'll look at the option above, but I honestly don't think GC is the issue I'm running into. I have another addon doing something it's not supposed to, just haven't narrowed it down yet (when I found the issue I reported, I disabled decursive all together to try and isolate the issue, there was no difference in behavior)

commented

The memory garbage leak you see is definitely caused by C_UnitAuras.GetDebuffData* functions. These return a new Lua table each time and this is this table that is creating the garbage data you see. Decursive will call these functions once every second for each debuff on each unit, and each buff (if you have the stealth detection option enabled)... So the more units Decursive manages and the more these units have buffs/debuffs the more garbage data will be generated...
I'm not sure why Decursive needs to scan all the units every second (I don't remember why I can't just rely on aura events) but I remember there was a use case... (there is even internal debug in Decursive to detect when the every second scan sees something that was not reported by an aura event)

commented

I've released a new alpha version to fix the most serious memory leak:

https://www.wowace.com/projects/decursive/files

can you test it and tell me the result?