To add more info, TF_Cleanup crashes with the message../../../boost_current/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed.
Could it be that TF_CLEANUP() is buggy? It crashes on me about every 30th run. For concreteness, I have a function, shown below, which is called just before the app quits. A core dump occurs in TF_Cleanup() in about 1/30 of the runs. If I comment out the TF_Cleanup line then the crashes go away.
void tfs_exit (CTXTdecl){ uint32_t tfHandle = TF_GetHandle(.......); HRESULT hr, haslease;
haslease = TF_HasLease(tfHandle); if (haslease == TF_OK) hr = TF_DropLease(tfHandle); else hr = TF_FAIL;
if (haslease == TF_OK && hr == TF_OK ) hr = TF_Cleanup(); // crashes about once in every 30 runs}
To add more info, TF_Cleanup crashes with the message../../../boost_current/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed.
This will be fixed in TF 4.1 which will be out soon.
Great, thank you very much!That crush was on Linux.On Windows this call simply hangs on me.
This is fixed in the latest version of the TF (4.1.3). Get it here: https://wyday.com/limelm/api/#turbofloat