LuaStack::init() EXC_BAD_ACCESS in iOS Simulator

Hi Guys,

I’m new to iOS & cocos2dx development so I’m likely doing something silly but Lua based projects crash for me on load with EXC_BAD_ACCESS here

_state = lua_open(); 

in the LuaStack::init() method

It happens to me with both the LuaTests project and if I create a new Lua project and try run that in the Simulator. I can run the CPP Test project without issue

This is with cocos2dx 4 and the latest version of xcode and happens if I build/run via cmake or xcode

I did see an older issue about it (https://github.com/cocos2d/cocos2d-x/issues/17043) but it’s for cocos2d 3.1. Not sure it applies to the latest cocos2d?

Thanks for any help