Pixel Perfect Align

Pixel Perfect Align

420k Downloads

Addon conflict with minimap button

Gethe opened this issue ยท 2 comments

commented

I recently installed this addon, and have since been getting a very odd error when I get teleported somewhere.

x1  nibRealUI\Modules\MinimapAdv.lua:468: Wrong object type for function
Stack: [string "=[C]"]: ?
[string "@nibRealUI\Modules\MinimapAdv.lua"]:468: in function <nibRealUI\Modules\MinimapAdv.lua:464>
[string "@nibRealUI\Modules\MinimapAdv.lua"]:508: in function 'UpdateButtonCollection'
[string "@nibRealUI\Modules\MinimapAdv.lua"]:952: in function 'Update'
[string "@nibRealUI\Modules\MinimapAdv.lua"]:965: in function 'Toggle'
[string "@nibRealUI\Modules\MinimapAdv.lua"]:995: in function 'UpdateShownState'
[string "@nibRealUI\Modules\MinimapAdv.lua"]:1386: in function '?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function 'Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
Time: 2020/01/17 14:23:26 Index: 1/1
RealUI Version: 2.1.3
Locals:
None

After a bunch of testing, I've narrowed it down to the minimap button that your addon creates. The issue is that my addon, RealUI, collects all minimap frames in one place to reduce visual clutter.

Specifically, once PPA creates the button, RealUI will collect. Then when a teleport somewhere, PPA recycles that existing button and creates a new one. The problem is that when my code runs again, it hits the now empty table and generates the above error.

My main question here is why does this button need to be recycled at all?

commented

the code erases the button when the UI scale changes and that event can trigger on zone transfers

I suppose I could try to not do that

commented

Maybe add an option to hide the minimap button? Pretty please :)