Rokiyo's thinkpad/stack overflow
I occasionally get these 4 errors appearing in my bugsack all in one go. Bugsack's call to print fails during an overflow, and I haven't yet noticed it straight away, so I don't know what series of events leads up to this occurence. The 4th traceback contains a reference to IceHUD.PlayerHealth's clickframes... So I dunno, potential clue?
http://paste.wowace.com/2815/
http://paste.wowace.com/2816/
http://paste.wowace.com/2817/
http://paste.wowace.com/2818/
This might be fixed by r819. I've seen it a lot but don't know how to consistently reproduce the error. We'll see...
Nope, still broke.
r821 gives it another shot; this time we're only creating the 'menu' function if there wasn't already one there and we're using the 'unit' passed in instead of trying to grab self.unit. I have no real idea what's causing the overflow, so I'm essentially shooting in the dark and waiting to see if the error stops coming up.
Nope, still seeing it. I'm out of ideas.
One of my users recently opened a ticket reporting this same error for my mod: http:wow.curseforge.com/addons/targetassist/tickets/6-c-stack-overflow-error/
I can see you're as perplexed as I am by it! It's a ping-pong between a wrapper and a wrapper factory for the secure OnLeave. I've actually never been able to recreate the error myself, either through normal use or simulation. targetAssist shares many of the same Ace3 libraries you're using in IceHUD, but only two get sent references to the unit buttons: LibKeyBound and Clique. Maybe the problem originates there?
Any insights you guys might have would be greatly appreciated, as I'm grasping at straws to try to even explain how the exception could ever get thrown! (a) targetAssist shouldn't execute any code OnLeave (and it looks like the same may be true for IceHUD) and (b) both of these functions end in tail calls. I thought Lua supported proper tail recursion. How then does a stack overflow happen, even if something triggers an infinite loop here? Or does the WoW implementation do some recursion depth checking, and throws this error as a result of passing some threshold?
(Also, apologies for the double post, but I wasn't sure if it would be better to catch you here or on wowinterface.com)