WeakAuras

WeakAuras

206M Downloads

Memory leak on custom trigger created progress bar?

hetaoaoao opened this issue ยท 3 comments

commented

What steps will reproduce the problem?
I've write a quite simple demo to show how this happens.
Import the script, for every time you cast any spell, it will create a progress bar which expires in 10 secs (autoHide set to true).
Cast 3 or more spells, then wait for the first one to disappear.
.The point is, the first bar (region) was hide and put back to region pool as expected,
BUT, when do ApplyStatesToRegions,
https://github.com/WeakAuras/WeakAuras2/blob/master/WeakAuras/WeakAuras.lua#L4589
local region = WeakAuras.GetRegion(id, cloneId);
this line is outside of the state.show judgement, then it do a EnsureRegion for a expected-to-be deleted state, get the just-in-pool region out again!

So, keep doing some casts, you guys will find that it's keeping doing createframe because there's no cache in region pool. I've confirmed that by adding debug info on
https://github.com/WeakAuras/WeakAuras2/blob/master/WeakAuras/WeakAuras.lua#L3200

What is the expected output? What do you see instead?

Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?
Yes.

Which version of WeakAuras are you using?
2.10.11
Was it working in a previous version? If yes, which was the last good one?
Didn't try.

Do you have an error log of what happened?
No.

Please provide any additional information below:

If you do not know which aura is causing issues for you, please attach a ZIP archive of your WeakAuras SavedVariables file.

In case you do know which aura is problematic, please export the string and paste it below.

!9IvEVTnUs8VlbybA2DtILZf6dO)HptCEU2PM2TBpwztjrlZgzkbkQe7S45p7VziPoSJZXU)XcxOqo8hhoCUzDDCh7ssDj1p2P2XooUKLUKa8Fa5qz8dUK2d)YaxYQHZNNYuUdQ5swxzmv4ViwEBmxOCjT6myCNra)sO(m3b1DjEu)7a2KjaEoiwWGn4R4XIu9XQOsfma2jxWTJMddtxOhdZusEyitIWhOfvlbCyaZlB(8XRtaUEDN(32DsFyD9uAMKwhLdwuuVGudNtZ8y3ZekcSl(kxY0wniJNsg3yeWSmuaijr01aZlGERKPHsUTtFG5AAWHXOrQfUebDjlnxsZeLIMYqQ8Y3tuQV4lPOgOQcWk1cTckaKDeWudXuMFSaUca)ws5I3o6cf5BdpSdAepuuAfLXkJ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FqJrjZGR9ZIZFbveYcElqtKXHswAk6FQXFaATdo4f2sE)oA4o1EbKqheCdwubOXxOm(TxCNcQf)byVeVK0GHmxdEIVLllCrH(BEjK)VNsQiI47Of(p17UWG90J6MNEOqoqH5elxLb(E3SlK50OuaddBTF7gT1(YqdgTg(XMngpT)WRM25Zqz5Ptg0TxFO6CN2qW8cM)DfjbWSd68fnFL(0X0teWZAiKilv)3gqUG7z7RfCm93p15kUhluiwxKQ0aRFCiwlSiDI6WNElvF35pTxsQMr29QtIzYqV328(xQpFtxZRTfxGIjn0d1DPRRT4vu(PMfrtnI1AcRkjFvjpgvoSlOBGYmwLsHMkpqeYMjDGpH4hp8df)iRJ0WpE4hA9DYMKRCLoBM9BBMvWUnZ(vyMS(MzhHlE4HAwVpmHgmHgmE7fJNbJNbdDVyOgmuaZEC3TVbIvQLgBlZjP8Wf2Y3gBWkR3WF)NDH9ehiJt6j6kXEi8m9gGHcMEVTVEeFDo0bI)DRBB5wrVO4GTFDZ5UK7T(JKllA8)zBrr3btzRmvFGG(DnZzFQtYI1J68TpBpYMqlRb6OasJ2T3Tpn6Q8RH5Dio137l)lkPdAO4P2jE6jqv8uAi2bz5)9apd8T06phevUX0050GHd68cVVlxXBSifwIs9CNaq2SAi8vkLySx4lS6jiDFadmcdGuGJSVOjLJQT(D6ooFtnT(aL9Sc2L4yOJ5KT6IBe62bTXLKZDMMWGtRzjmY(ODRLzY4H2f(cpa6YY8euTZWBO3tTZqPbm3r9n9wq0RXllCkwsChzthoT7tTFWkFNdRTWERCop)L259mYfOxT(DfpgdwwKtXsouTWWzY1dh17BdhmUr)N(C698ODTC96AcT7Z9W4ZQJtD))

commented

If I'm right, the fix can be quite simple, just put
local region = WeakAuras.GetRegion(id, cloneId);
inside if state.show block.

commented

That appears to be correct analysis. Your suggested fix is not entirely complete since the rest of the function needs the region.

I'll test that for a bit.

commented

So appreciate that you made the fix so quick. The true story is that I wrote a WA script to help to track wild imps of my demonology warlock, the logic is quite the same..
Now I can just wait for the official fix:-)