
What I can imagine in regards of this failure is that you have in your watch expressions some pointer dereference. And this ptr is not valid... I had this error once in VC 6.0 and spent almost 3 hours looking for this kind of problem... Please analyse your watch expressions carefully. May be you have argv[1] in your watch or some other context valid name, which is not initialized. As I can remember this was fixed in VC 2002, but can come up in VC 8 again. Best Regards, Ovanes -----Ursprüngliche Nachricht----- Von: Rush Manbert [mailto:rush@manbert.com] Gesendet: Thursday, April 27, 2006 22:44 An: boost-users@lists.boost.org Betreff: Re: [Boost-users] Visual C++ 8 - Example Crashes with Access Violation Brown Gabe wrote:
I tried commenting out the std::cout call and it still crashes for some reason. I'm trying to track down the problem to the uninitialized memory but I can't seem to locate it for some reason. I tried implementing a slight simplier version to try and track down the fault.
Can anyone reproduce this error on a vanilla install of Visual Studio 2005? I'm wondering if this is a VC8 flaw for Boost or just some weird libraries that I'm using with boost.
Here is the sample code:
==============[Sample Code]=====================
void ThreadTest() {
return;
};
int main(int argc, char* argv[]) {
boost::thread thrd(ThreadTest); thrd.join();
return 0; }
==============[Sample Code]=====================
I tried this code, then a variant of this code, then the code you supplied in your first post, and they all ran without error in both Debug and Release build configurations. I made a Win32 console app using static Boost libraries and the static runtime. My Visual Studio 2005 installation is very new and totally vanilla. I guess this helps point you at some other library. I still wonder, can't you set a breakpoint to trigger when the exception is thrown? If you break at that point, the offender should be on the stack. - Rush