Apr 25, 2011 at 6:29 PM
Edited Apr 26, 2011 at 10:17 AM
I have a ridiculous issue that I appear to be unable to isolate into a simple repro case. Please forgive me for not providing one; it's not for the want of trying, believe me.
I have a .vcproj as part of a wider solution with a single .cpp file consisting of the following:
int main(int argc, char **argv)
This is crashing with a stack overflow at exit, in VLD 1.9h and 2.1, unless I either:
- Remove the #include <vld.h>, thus removing leak detection
- Change the Output File in the vcproj properties from $(OutDir)\Debug-$(ProjectName).exe back to the default
- Rename the generated .exe in Explorer from Debug-MyProject.exe to simply MyProject.exe.
I don't understand why the filename of the executable is making such a big difference. I can take the crashing version and make it not crash by renaming the executable, and vice versa. I've even tried deleting .pdb files (as well as ensuring they match)
but this seems to make no difference. I've tried to repro this in a test solution with a fresh vcproj but it works fine, even when copying the vcproj settings from the "broken" project to the test one. No repro.
I'm at my wit's end here. The vcproj doesn't have any dependencies on any external libs or other projects in the solution. All the settings - including the directory structure (bar renames) - are the same between the crashing solution and the test case that
fails to repro. I've even tried removing all other projects from the solution that crashes, to no avail.
I could post the callstack but since I don't have symbols for VLD I'm not sure if this would be any use. Would it be worth recompiling VLD from source in order to give better details? Or perhaps the problem is obvious to a more trained eye, in which case
I'd be very grateful for any advice.
I'm on VS2005, Win7 x64, compiling for x86.