lua-users home
lua-l archive

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


Thanks for your advices, i fix it.
The issue was in fact easy to fix, but difficult to find, as it was "hidden" behind a lot of code lines/calls : at on point, we did a lua_getgobal() and nevers pop its return value.




Le 23/03/2011 14:36, Eike Decker a écrit :
2011/3/23 Sylvain Fabre<sylvain.fabre@inpixal.com>:
Le 23/03/2011 12:01, Mike Pall a écrit :
Sylvain Fabre wrote:
After approx. 6 hours of processing, i get the following lua error :
"Internal error - Stack overflow", but with no other specific clues.
The string "Internal error" appears nowhere in the source code of
LuaJIT. Also, a Lua stack overflow would show with a lower case
error message ("stack overflow").

I suggest you look for the component that generates the error.
Yes, sorry : "Internal error" is coming from our layer, and we get a "stack
overflow" from LuaJIT (ie  in lower case).
You could try to lower the available stack size (I think that's
possible somewhere...) to avoid 6hour+ runtime for debugging. And a
traceback would certainly help to pinpoint the problem in no time ;)
Also, it could be that you don't do tail recursions correctly in some loop, like

function frame()
   -- stuff
   return frame()+1 --<- +1 prevents successful tail recursion
end

Beyond that, I think to remember that some debug options disable tail
recursions and therefore can also lead to stack overflows where none
should happen. But could be wrong on that.

Cheers,
Eike



--
=================================
Sylvain FABRE
sylvain.fabre@inpixal.com
Fixe: 09 72 11 30 24
Mobile: 06 30 12 72 34
Fax : 09 72 11 10 71
=================================