GatherLite

GatherLite

1M Downloads

v3.0.0 and SquareMiniMap buttons

xIGBClutchIx opened this issue · 16 comments

commented

I seem to get a weird issue on how the new gatherlite renders minimap nodes and ProjectAzilroka minmap buttons and it seems to break because of the new rendering. Not sure who would be best to fix this. It causes a stack overflow on this line local object = select(i, Frame:GetChildren()).

Here is a bigger example part of the code

for _, Frame in pairs({ Minimap, _G.MinimapBackdrop, _G.MinimapCluster }) do
		local NumChildren = Frame:GetNumChildren()
		if NumChildren > (Frame.SMBNumChildren or 0) then
			for i = 1, NumChildren do
				local object = select(i, Frame:GetChildren())
commented

a screenshot or error code would be good...

commented

Yep this is the full error. Basically the new GatherLite breaks this call Minimap:GetChildren()

1x ...Ons\ProjectAzilroka\Modules\SquareMinimapButtons.lua:484: Minimap:GetChildren(): Stack overflow
[C]: in function `GetChildren'
...Ons\ProjectAzilroka\Modules\SquareMinimapButtons.lua:484: in function `?'
...s\AddOnSkins\Libs\Ace3\AceTimer-3.0\AceTimer-3.0-17.lua:55: in function <...s\AddOnSkins\Libs\Ace3\AceTimer-3.0\AceTimer-3.0.lua:50>

Locals:
(*temporary) = Minimap {
 0 = <userdata>
 timer = 0
 location = <unnamed> {
 }
 backdrop = <unnamed> {
 }
 SetZoom = <function> defined =[C]:-1
}

commented

Wierd, i didnt change the way we add the minimap button...

commented

Yeah I think the issue is more along the lines of adding the icon nodes to the minimap because if you call Minimap:GetNumChildren() then you get like 11k or something insane

commented

So how would we go about and fix this... i've no idea.
We could check the distance to the node so that we dont add all of them, altho thats a huge performance hit...

commented

we could check the instance id and only add those with the same instance id...

commented

Yeah that was what I was thinking or adding them to another frame that is in the minimap instead of directly on it

commented

I would probably go with the instance id systems probably a bit harder cause you would need to detect zone changes and such but it will also save memory and frames a lot it seems. Just removing the minimap nodes to see if I could fix it saved me about 20mbs of addon memory.

commented

Tried it and it wasnt as good as i was hoping...
It still loaded around 10k nodes in Eastern Kingdoms.
Im trying somthing else, now im checking all the nodes and checks the distance if it's closer then 1000 yards it will be loaded, if not unloaded. and the frame recycled... altho it's making the game hickup every time it checks the nodes...

dont know how to solve it yet. altho with this fix it only loaded 500 nodes when in redridge...

commented

Yeah I got that too I think by just adding the node map check from LoadWorldmap to LoadMinimap

commented

Alright, i have a potential fix. uploading now

commented

Please download and try the 3.0.4-alpha version.

commented

Awesome yeah pulled it off github seems to be working pretty well so far and a huge reduction of memory.
Another issue I been having too when testing, it is seems like certain zones mostly the bigger ones the world map has big frame loss. Like I am in Stranglethorn Vale the frames are really bad with the map open. Not sure if that is able to be fixed tho because I think that is because of all the nodes there.

commented

there are alot of nodes in stv :)
but ill have a look at it...
Now that we have the recycling system i could remove the frames your not tracking etc from the world map instead of just hiding them, saving resources...

commented

Yeah that is what I just did to help frames turn off all the ores I have not needed. And found a little flash bug which that is what you might have been talking about. Opened the PR #140 about it.

commented

Just release more performance fixes in 3.0.5, i'm now closing this issue as it's considered as solved.