boost::thread liker error in Release mode

I am write a program that use boost::thread like below class RPCClientManagment { boost::thread *pThread_; void RunSendRequestStatus() { boost::posix_time::seconds interval(30); while (bRunSendRequestStatus_) { SendRequestStatus(); boost::this_thread::sleep(interval); } } void StartRequestStatus() { bRunSendRequestStatus_ = true; pThread_ = new boost::thread(&RPCClientManagment::RunSendRequestStatus, this); } }; when I compile it in rlease mode I receive bleow error: 1>c:\program files (x86)\boost\boost_1_44\boost\asio\placeholders.hpp(91) : fatal error C1001: `An internal error has occurred in the compiler.` 1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x62542D7F:0x00000028]', line 182) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1>Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information 1>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage 1> Version 9.00.21022.08 1> E when I comment this row error message hide //pThread_ = new boost::thread(&RPCClientManagment::RunSendRequestStatus, this); in debug mode I don't see this problem at all. I use vc++ 9

when I compile it in rlease mode I receive bleow error: 1>c:\program files (x86)\boost\boost_1_44\boost\asio\placeholders.hpp(91) : fatal error C1001: `An internal error has occurred in the compiler.` 1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x62542D7F:0x00000028]', line 182)
FWIW, VC9 usually crashes on bind args mismatch. So double-check if everything is ok with your bind expression.

ok when I check my function is member function and don't rec any parameter I chenge the prolematic row to below. void StartThread() { . . . pThread_ = new boost::thread(boost::bind(&RPCClientManagment::RunSendRequestStatus,this)); . } and this is function defintion void RunSendRequestStatus() { . . . } this must work this so simple I can't found where is my mistake mybe in other place and this appear here ? On Sun, Dec 18, 2011 at 6:06 PM, Igor Rwrote: > > when I compile it in rlease mode I receive bleow error: > > 1>c:\program files > > (x86)\boost\boost_1_44\boost\asio\placeholders.hpp(91) : fatal error > C1001: > > `An internal error has occurred in the compiler.` > > 1>(compiler file > > 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x62542D7F:0x00000028]', line > 182) > > > FWIW, VC9 usually crashes on bind args mismatch. So double-check if > everything is ok with your bind expression. > _______________________________________________ > Boost-users mailing list > Boost-users@lists.boost.org > http://lists.boost.org/mailman/listinfo.cgi/boost-users

ok when I check my function is member function and don't rec any parameter I chenge the prolematic row to below. void StartThread() { pThread_ = new boost::thread(boost::bind(&RPCClientManagment::RunSendRequestStatus,this)); } and this is function defintion void RunSendRequestStatus() { }
this must work this so simple I can't found where is my mistake mybe in other place and this appear here ?
You wrote VC crashed in release mode only -- if you compile/link with /LTCG flag, try to remove it. Also ensure that all your libs and the main application are compiled with consistent compiler flags (particularly, _SECURE_SCL).
participants (2)
-
herzl&revital sham
-
Igor R