lua-users home
lua-l archive

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


On 10/24/2012 7:27 PM, Anthony S wrote:
have a program that loads lua file containing multidimensional table
and sequentially reads values from this table in a loop using C API
functions.
Everything is ok when this table is relatively small, but
when number of entries becomes about several thousands, program crashes.
[snip]
On my machine bug is triggered on 2634 iteration of the loop:
...

MANIFEST[2633][1] = texlive-module-HA-prosper.doc-2011.tar.xz
MANIFEST[2633][2] = 205064
MANIFEST[2633][3] = e3615a136c769fc708d1cffcebf0fc91
lua_gettop() = 1
MANIFEST[2634][1] = .texlive-module-aurical-2010.tar.xz.portage_lockfile
MANIFEST[2634][2] = No permission to read
lua_tolstring() returned NULL!
type on stack top is nil

And your problem is exactly there.

The file has been locked. The script can't open it.
See the error message at MANIFEST[2634][2]?
Therefore,
MANIFEST[2634][2] = <nil>

Nothing wrong with Lua.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia