Assertion `std::this_thread::get_id() == mMainThreadId' failed.

NatNet, VRPN, TrackD, and Plugins
Post Reply
NathanielTagg
Posts: 4
Joined: Wed Dec 21, 2022 8:42 am

Assertion `std::this_thread::get_id() == mMainThreadId' failed.

Post by NathanielTagg »

NatNet is throwing this exception:
/home/mrbuild/npoint/apps/NatNet/NatNetLib/src/ClientCore.cpp:2084: void ClientCore::ClearCommandConfirmation(): Assertion `std::this_thread::get_id() == mMainThreadId' failed.

It is true that I am setting up the system in one thread, then starting the callback loop from another thread. This works fine.
This error seems to crop up if NatNet reports the 'models changed' bit is flagged (data->params & 0x02).
In that case, I call GetDataDescriptionList() again from the callback function, but this seems to trigger the assertion.

My application CANNOT access the main thread at runtime for various reasons, and I want to rebuild rigid body data when it changes. Is there any workaround for this?

Or, maybe source code could be released so that I could disable this assertion on my own?
Post Reply