I'm running into a problem when trying to initialize multi-threading (code taken directly from the standalone console demo).
When my program reaches the line
multithreadingUtil = new hkpMultithreadingUtil(info);
an assertion occurs at
DebugUtilMultithreadingCheckhkMultiThreadCheck.cpp, line 177
MarkForRead MarkForWrite missing. Make sure HK_DEBUG_MULTI_THREADING is defined if mixing release and debug libs. See hkMultiThreadingCheck.h for more info.
I'm linking against the libraries from the "debug_multithreaded_dll" directory under "Libs..." (Visual Studio 2005 SP1 under Vista SP1).
When I try to set the simulation type to SIMULATION_TYPE_DISCRETE (single-threaded; would suffice for me for testing Havok), commenting out the initialization for the hkpMultithreadingUtil instance, the program starts correctly, but as soon as I start a simulation (calling stepAdvance(), the only function from hkpWorld that I found for advancing the simulation step apart from the multithreading variety with startStepWorld et al.), I get another assertion in the style "you can't call this function if the simulation type isn't SIMULATION_TYPE_MULTI_THREADED").
I'm obviously missing something here:
- What would I have to do to advance the time step under SIMULATION_TYPE_DISCRET?
- As the alternative, what am I doing wrong to get a multi-threaded simulation running?
A hint for where to look would be appreciated very much.