www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Program crashes on exit

↑ ↓ ← "John Dyson" <post gowelding.com> writes:
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
↑ ↓ → "Walter" <walter digitalmars.com> writes:
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,

 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

 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

 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