Decoda 1.15 does not work with Lua assertions enabled

ignacioignacio Join Date: 2011-08-22 Member: 117991Members
Hi. I have Lua 5.1.4 compiled with LUA_USE_APICHECK so it warns me of any misuse.

Given a simple script like this:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->require "decoda.test"

print(decoda)<!--c2--></div><!--ec2-->

When debugging, if I hover with the mouse over <i>decoda</i> (after the module "decoda.test" has been require'd), the following assertion fails:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: c:\luarocks\1.0\lua5.1.exe
File: D:\trunk\packages\Lua5.1\src\lapi.c
Line: 231

Expression: L->top < L->ci->top

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
---------------------------
Abort   Retry   Ignore  
---------------------------<!--c2--></div><!--ec2-->


If I break with a debugger, I see that the assert is triggered by a call to lua_pushvalue issued by LuaInject.dll. The stack top at that point is 22. Considering that
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#define LUA_MINSTACK      20<!--c2--></div><!--ec2-->

I guess that some calls to luaL_checkstack are needed.

I can provide binaries, minidumps or whatever is needed to reproduce this.

Regards,
Ignacio

Comments

Sign In or Register to comment.