Threads - Access in invalid memory Boost 1.36.0 BCB 5.8.3
Hello, I have a simple OpenGL program that is using Boost Threads and I had it working fine under Boost 1.34. I have switched to 1.36 for some of the newer mutex locking functionality and everything works fine, but.. I keep getting an invalid memory access error. My program will run fine if i skip past the offending call. Wondering if anyone has any ideas? The offending call happens when the rendering thread is created. The call stack is as follows: Access in invalid memory in process: solarsystemT.exe(4056) - :\development\boost_1_36_0\boost/thread/win32/once.hpp#125 Attempt to access 4 byte(s) at 0x00417084. 0x00411056 - E:\development\boost_1_36_0\boost/thread/win32/once.hpp#125 0x0041137B - E:\development\boost_1_36_0\libs\thread\src\win32\thread.cpp#44 0x00411A61 - E:\development\boost_1_36_0\libs\thread\src\win32\thread.cpp#151 The memory that boost::call_once is accessing is current_thread_tls_init_flag created earlier by boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT; I can see that this flag was created and initialized to zero. Thank you for any insight. Stephen Kierzewski
Stephen Kierzewski
I have a simple OpenGL program that is using Boost Threads and I had it working fine under Boost 1.34. I have switched to 1.36 for some of the newer mutex locking functionality and everything works fine, but.. I keep getting an invalid memory access error. My program will run fine if i skip past the offending call.
Wondering if anyone has any ideas?
Are you using the DLL build of Boost.Thread? At what point in your program's execution are you getting this error? On Startup? Normal running? During shutdown?
The offending call happens when the rendering thread is created. The call stack is as follows:
Access in invalid memory in process: solarsystemT.exe(4056) - :\development\boost_1_36_0\boost/thread/win32/once.hpp#125 Attempt to access 4 byte(s) at 0x00417084.
Is this the address of current_thread_tls_init_flag? Anthony -- Anthony Williams Author of C++ Concurrency in Action | http://www.manning.com/williams Custom Software Development | http://www.justsoftwaresolutions.co.uk Just Software Solutions Ltd, Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK
participants (2)
-
Anthony Williams
-
Stephen Kierzewski