Original Post
In my program I have a function which takes in a package from the network and does things with it depending on the package type. The program crashes because of some crazy behavior. While running it through the debugger I watched it successfully run through the part of the function where it crashes twice (it received 2 packets successfully) and on the 3rd the debugger stops with: "Unhandled exception at 0x(some memory address)... user break point" but at this point I can click "continue" and the program will still run for a few more lines before screwing up some data and crashing while trying to delete it. So first off, what are some errors that are recoverable like that? If I run the program without the debugger it doesn't stop at the first break, and crashes when trying to delete the corrupt data. Note that the 2nd crash when it tries to delete the corrupt data isn't recoverable. And secondly, why is the data being corrupted afterwards? Heck, why is the program even complaining about the recoverable error? After the recoverable error the data is read from the package just fine, everything is well until it calls a function with the data (which DOESN'T change the data) and then the data comes back corrupted from the function. Very strange stuff. Update: I commented out the part where it calls the function with the data and the program runs through fine. I examined the function completely and i'm sure none of the data is changed. Actually the only data that changes is a char * (yes yes I know, use the string class..... but thats not the point) The address that the char* is pointing to doesn't change but the data does. And the most likely cause of all this: The function called is inside a dll. It is called from the main program. I've had people tell me that this can screw things up. [Edited by - orryx on July 30, 2006 7:36:27 PM]