Visual Studio confusing exception
For a robotics class I'm taking, we have to download the code开发者_运维技巧 from http://www.cs.okstate.edu/~katchou/vboost.cpp and place it into a project of the same name. When I debugged the program (by navigating to Debug>StartDebugging in Release mode) I got an error saying :
First-chance exception at 0x6eedfb59 (msvcr100.dll) in vboost.exe: 0xC0000005:
Access violation reading location 0x415c3a43.
Unhandled exception at 0x6eedfb59 (msvcr100.dll) in vboost.exe: 0xC0000005:
Access violation reading location 0x415c3a43.
After stopping the debugging process and a window pops up saying:
Unhandled exception at 0x6eedfb59 (msvcr100.dll) in vboost.exe: 0xC0000005:
Access violation reading location 0x415c3a43.
During the debugging without an option to ignore and pressing continue just makes the same window appear again.
Then another c file opens up titled strtol.c and in the "auto" window I notice that the pointer nptr (which is a parameter of the function strtoxl) is given some value and then it says [bad ptr] which I'm assuming means the pointer is bad. Underneath this is an error stating:Error: expression cannot be evaluated
. The value is not 0 so it isn't NULL. The program stops debugging at line 99 of strol.c.
When I do the same thing in debug mode, the program runs fine until it starts to load the file names of images found in another file. It then exits the program with a 1 instead of the usual 0.
This may seem kind of vague but in all honesty I'm not sure what is going wrong. I tried searching the code I downloaded from that site for the functions strtol or strtoxl, of which neither are present, and I noticed on the call stack that msvcr100.dll seems to be accessing the strtol.c file but I'm not sure why or how. Any help will be appreciated.
Specifics: Host OS: Ubuntu 10.10 Guest Host: Windows 7 using VirtualBox Software: Visual Studio 2010 Express
The application requires 5 commandline parameters, and can take 2 optional - it'll crash if you don't pass the first 5.
See lines 364-431 in the cpp file.
- // Name of the classifier group (i.e., new.clas)
- // Number of positive images.
- // Initialize the negative image counter.
- // Number of classifier levels in the cascade.
- // Max # of features.
- (optional) -t, -v, -tab, -mem or -eyefull
- (optional) -filter
In VS2008 you set these in Project Properties/Debugging/Command Arguments - VS2005/2010 should be same or similar.
You start the program without providing it with command line arguments it expects and it crashes while trying to access it. Fix the program to be more informative -and/or- pass correct arguments
精彩评论