Can anyone help with this haxe/c++ problem?
I’m using OpenFL (hxCpp) and a c++ library (phidgets) that uses threading.
Now If i try to create a thread in haxe using Thread.create then everything crashes. Debugging using visual studio and hxcpp ends up with a nullptr exception.
**"this was nullptr."**
myapp.exe!hx::StackContext::pushFrame(hx::StackFrame * inFrame) Line 420 C++
myapp.exe!hx::StackFrame::StackFrame(const hx::StackPosition * inPosition) Line 594 C++
Is there some kind of thread collision here? The c++ lib runs fine if i dont try to create a thread using haxe.
Not sure how to fix this, does anyone have some insight?
Does it crash just by calling Thread.create, or is anything else required to cause the crash? OpenFL uses threads already for a few different things, are those causing a crash? (for example, URLLoader or Assets.load* calls)
Now, this HX_STACKFRAME is creating the nullptr crash. And this does not happen if Thread.create is not started elsewhere. Now, looking further into the stackframe code it seems the error comes from this: