crash on table.insert call in virtual Lua function called from C++

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

crash on table.insert call in virtual Lua function called from C++

Willi Schinmeyer
  Hello,

I just tracked down a crash in my program and was able to reproduce it
in a simple test program.

I inherit from a C++ class via Lua and overwrite a virtual function. In
there I call table.insert. If the function is called directly via Lua,
everything works, but if it is called from C++, i.e. via
luabind::wrap_base::call(), it crashes. Source code is included.
A workaround is using "myTable[#myTable] = value", I'm going to do that
for now. (Of course that's not the exact behaviour of table.insert, but
close enough for my needs.)

So long,
Willi "Mr. Wonko" Schinmeyer

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user

main.cpp (2K) Download Attachment