c++ - Program crashes on exit
- John Dyson (12/12) Dec 22 2002 I created a program called Stress-Tables, it works OK until it exists, t...
- Walter (11/23) Dec 22 2002 I suspect that somewhere in the program, a malloc or new is being done, ...
I created a program called Stress-Tables, it works OK until it exists, then it gives the following error message STRESS-TABLES executed an invalid instruction in module <unknown> at 0000:0000054f. leaving the dos window open, when the window is closed manually the computer appears to have suffered no ill effects. The last command in the program was a printf statement, which appears to have worked OK. If you close the dos window by clicking the cross, the program shuts down OK. The program is 520KB in size, most of that is data. When the program was being developed it worked fine, but as it got bigger this problem started to occur. Many Thanks John
Dec 22 2002
I suspect that somewhere in the program, a malloc or new is being done, and the result is not checked for NULL. It's also possible you're having a stack overflow (too much recursion). What I strongly suggest is porting the program to Win32, thoroughly test/debug it there, and then back port it to DOS. -Walter "John Dyson" <post gowelding.com> wrote in message news:au4nme$1dim$1 digitaldaemon.com...I created a program called Stress-Tables, it works OK until it exists,thenit gives the following error message STRESS-TABLES executed an invalid instruction in module <unknown> at 0000:0000054f. leaving the dos window open, when the window is closed manually thecomputerappears to have suffered no ill effects. The last command in the program was a printf statement, which appears to have worked OK. If you close the dos window by clicking the cross, the program shuts down OK. The programis520KB in size, most of that is data. When the program was being developed it worked fine, but as it got bigger this problem started to occur. Many Thanks John
Dec 22 2002