[all][lua] Crash on action release [SOLVED]

Hi,
I’ve ran into an issue with adding some scripted UI in our game, but this happens only when I create an action from LUA. Nodes get created ok but when I add an action to it, upon action finish the destructor crashes saying ‘0xC0000005: Access violation reading location 0x00000000.’ and gets me to CCObject::release method, delete this statement.

I am using Cocos2d-X 2.1.0b3

The rest of the bindings both from cocos2d and the custom ones using tolua++ work ok. Also while developing another project started from HelloLUA I have not encountered any issues like this.

Any ideas?

Thank you very much

Solved.

Because I instantiate the scripting engine for different scenes I did not register them to the shared manager CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);
This solved the problem.