EEEEK!!! The dreaded pcall error!
This is a tough one to debug for sure. I’ve had it and it greyed me.
My problem was being generated from an external lib.
It took me a FULL day to figure out what was causing it to be kicked on Device. There is very little info about the pcall error available as I’m sure you know.
I agree with the poster above to start removing external libs until the error disappears. I did not know this when I was debugging the error, although through trial and elimination I eventually adopted this method.
Unfortunately for me, I started by commenting out blocks of my code until I basically had none left, thinking it MUST be my code causing the problem, surely not one of the readily available and popular libs that many others use.
Well, when I had nothing left of my code, I started removing the external libs and discovered my pcall error was being kicked by json.lua. Ya, how about that. There wasn’t a single reference tying the pcall error to json anywhere.
Moving on, when I tracked the problem to json.lua, it atleast game me an avenue to begin researching and found a thread describing how json.lua is being depricated and replaced by dkjson.lua. Do a Google search to get the file.
Replacing json.lua with the newer version solved my issue. I’m sure I’m not the only noob that has experienced a very frustrating day discovering the culprit kicking the pcall error.
If you require json.lua, I would start there. If not, I’d start eliminating external libs until the error disappears.
If you don’t require any external libs, I’m don’t know what to say. I guess it must be your code, but who knows.
Hope this helps anyone experiencing a pcall error on device, the simulator and none of the debuggers at the time caught this btw.
GL [import]uid: 106779 topic_id: 19973 reply_id: 108214[/import]