I got this error
Unhandled exception at 0x0049b946 in Program.exe: 0xC0000005: Access violation reading location 0x00000090.
and the error points to this line:
// thread.hpp ln 56
void run()
{
f(); // here <<
}
When trying to run this code:
void frameFunc()
{
for(;;)
{
//..........do something. it is too long to paste. (calculations)
}
}
int main()
{
boost::thread framethread(frameFunc);
framethread.join();
//........
}
The error will simply gone when I remove the loop in frameFunc.
Any kind of help would be appreciated :)
The code that you showed looks valid. I think the problem is inside the code that is not shown.
User contributions licensed under CC BY-SA 3.0