Boost logo

Boost Users :

Subject: [Boost-users] Threads - Access in invalid memory Boost 1.36.0 BCB 5.8.3
From: Stephen Kierzewski (sjkninester_at_[hidden])
Date: 2008-11-22 10:03:38


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) -
  Attempt to access 4 byte(s) at 0x00417084.
    0x00411056 - E:\development\boost_1_36_0\boost/thread/win32/once.hpp#125
    0x0041137B -
    0x00411A61 -

The memory that boost::call_once is accessing is
created earlier by boost::once_flag

I can see that this flag was created and initialized to zero.

Thank you for any insight.
Stephen Kierzewski

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at