Re: [Dev-C++] Abnormal program termination
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Watson D. <wa...@wa...> - 2004-01-31 02:28:07
|
Wednesday, January 28, 2004, 12:18:10 PM, you wrote: NOR> Hey there! NOR> I'm writing a string class as part of a school project. Sometimes when I NOR> compile the class in a test program and run it, I get an error message NOR> saying "NSTRING.EXE has generated errors and will be closed by Windows. You NOR> will need to restart the program. An error log is being created." If I NOR> re-compile with the exact same source code, the problem goes away and the NOR> test program runs perfectly. I'm using version 4.9.8.5 on Windows 2000. I NOR> have about 1300 lines of well-spaced code, but it seems unlikely to me that NOR> this could be too much for mingw or for my computer to handle. Any ideas? 1300 lines? Uh, no. That's not the problem. If the error is sporadic like that, it's usually a pointer error or some sort of memory overwrite. Missing copy constructors will do that. Modify your program to log error messages to a log file and try to pinpoint where the error is happening. Segment fault errors are sometimes hard to recreate and you'll need to be patient and run lots of test cases. HTH. Watson (the pencil neck) Davis |