Jump to content

TBC - stack overflow (table too big to unpack)


Recommended Posts

I'm refactoring my inventory plugin from the grounds up and there's still one lasting issue that I can't seem to figure out after days of investigating. 

For context, I'm testing in dungeons, with high drop rates and I occasionally get a LUA error "stack overflow (table too big to unpack)". I can't trace back to its origin. I have only 3 LUA calls that unpack tables on return in the entire plugin. I'm positive they're not the issue, so something else is happening. I've noticed that it happens mostly on group rolls (but not only) and not on all characters. My only way to confirm this is by using BugGrabber and BugSack to get the time stamp of the LUA error, and outputting the time stamp in the chat before each LUA call, but even that is not very reliable since you don't get milliseconds precision, only seconds.

The LUA call I make when rolling is the following:

Lua.LuaDoString($"ConfirmLootRoll({rollId}, 2)");

It's exactly the same as before the rework (which was working flawlessly). As you can see, it's extremely simple. the rollId parameter is always checked in the log and always correct.

I've never had this issue before, so any input is appreciated. Have you ever seen this issue? What could cause it? Is there any way at all to reliably detect which LUA call in the plugin is faulty?

Link to comment
Share on other sites


The bot uses unpack Lua function only to extract Lua events.

When you catch LuaEvent does your code take time ? (maybe try to lock one thread to try to reproduce the problem, if it's the problem try to run the slow code in a new thread. In dungeons, he has probably more events that in open world).

You can also try to put lower value at :


(~150 by default)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...