lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello.

I currently run a project called Verlihub, it's a C++ server application for Linux. It includes a plugin that allows to load and run Lua scripts with registered callbacks and helper functions at runtime ( https://github.com/Verlihub/verlihub/blob/master/plugins/lua/cluainterpreter.cpp ).

Sadly I have no idea what I have missed between Lua versions 5.4.2 and 5.4.3+, that makes my C++ code to always fail in "PANIC: unprotected error in call to Lua API (attempt to call a nil value)" error and crash the application. The only thing I could dig up is this comment ( http://lua-users.org/lists/lua-l/2021-03/msg00042.html ). I could find similar case in this issue ( https://github.com/hexchat/hexchat/issues/2558 ), but I don't really understand what the actual problem is.

It seems that you made a great change to the Lua API, which barely few people are affected by. I should say that I'm one of those people, and I have absolutely no idea what has gone wrong either on my side, or on your side. I have been fighting this issue for over a year since Lu 5.4.3 was released, but without success. I should mention that this C++ code has been running smooth since Lua release 5.0 in 2003, the only thing I had to adopt since then was the "LUA_GLOBALSINDEX" that disappeared in Lua 5.2.

Please suggest me what is wrong with this code, because I'm really not able to find the issue myself. Google doesn't produce many results on this issue, I guess because this is too recent issue.

Regards.