[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Upgrading Lua 5.4.2 to 5.4.3+ in a C++ project leads to PANIC
- From: bil til <biltil52@...>
- Date: Fri, 2 Dec 2022 06:42:31 +0100
So if you set a breakpoint in the lua panic function and look at your
call stack, you do not get some hint, where this originates from?
... Lua will also use this panic functions for quite a bit of
warnings, if no warn function is installed to my experience last week.
(I finally "short-circuited" this warn function approach by
overwriting luaB_warn and not using lua_warnign in my code...).
But after looking through the links you gave, if nil is called, I
think it presumably very well could be the improved "closed" handling
described by Andrew... . (but I am in no way Lua specialist... e. g.
never used upvalues so far ....).
Am Do., 1. Dez. 2022 um 20:43 Uhr schrieb Aleksandr Zenkov
<webmaster@feardc.net>:
>
> 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.