LUA Segmentation fault after creating any object

When i execute lua script in this way:

_engine->executeString(_script.c_str());
auto luaState = _engine->getLuaStack()->getLuaState();

lua_getglobal(luaState, "onEnter");
tolua_pushusertype(luaState, node, "cc.Node");
lua_call(luaState, 1, 0);

In script

local function testCallback(sender)
	print("Hello after 5s")
end

function onEnter(sprite)

	sprite:runAction(cc.Sequence:create(
							cc.DelayTime:create(5),
							cc.CallFunc:create(testCallback)))

end

So when testCallback is called i get

cocos2d: [LUA-print] Hello after 5s
Segmentation fault
Error running command, return code: 139

Also when i want execute such script i get Sigsegv ;/ why?

function onEnter(sprite,mind)
	cc.Scene:create()

end

Ok the problem was that i don’t set script engine…

I add this to applicationDidFinishLaunching in AppDelegate

LuaEngine* engine = LuaEngine::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(engine);