comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Program Terminates ...
Date: Mon, 22 Dec 2003 14:55:44 -0600
Date: 2003-12-22T14:55:44-06:00	[thread overview]
Message-ID: <vuemkpa691ioda@corp.supernews.com> (raw)
In-Reply-To: 3lDFb.627904$Fm2.565052@attbi_s04

That sort of termination often happens when you run out of memory.
Storage_Error is raised, and when you handle the exception and try to print
out a message, Storage_Error gets raised again. Then the task silently ends.

I've debugged that sort of problem dozens of times. Some of them were "bug"
reports from customers of Janus/Ada.

Anyway, there isn't much you can do to guard against this problem. The best
defense is to find the memory leak and get rid of it. Doing that will
require using tools specific to your compiler; for instance MemAvail and
StackAvail in Janus/Ada, along with debugging storage pools.

                    Randy.

"Steve" <nospam_steved94@comcast.net> wrote in message
news:3lDFb.627904$Fm2.565052@attbi_s04...
> You might try adding a delay after each of the Put_Line statements in the
> exception handlers.  Maybe the program is getting killed before the
message
> makes its way out.
>
> I have seen this type of termination before, usually not with Ada.  I have
> been known resort to saving state information about each task in shared
> memory so I could see where things were when the program died.
>
> Steve
> (The Duck)
>
> "Peter Richtmyer" <prichtmyer@yahoo.com> wrote in message
> news:1b585154.0312211634.6c414d2e@posting.google.com...
> > I hope someone can help.
> >
> > I am running a couple programs using
> > Gnat 3.15p on Win2000. One program has a number of tasks that
> > all have exception handlers. Virtually all my routines have
> > exception handlers too.
> >
> > After running awhile (the two programs exchange
> > messages) the one program terminates gracefully - for no
> > apparent reason. Eventually all the tasks seem to terminate,
> > though I have not coded any normal way out of some of them
> > (endless loops).  And I have "Put_Line" statements in all
> > exception handlers and at the end of the main program.
> > But no error messages are printed. (Other "normal" messages
> > are printed during the run.)
> >
> > Is there some resource that could be used up and yet not cause
> > an exception? Or what would cause this behavior? I have never
> > seen anything like this before, and I've been at it some years.
> > Any ideas very welcome. It is deadline time!
> >
> > Thanks,
> > Peter
>
>





  parent reply	other threads:[~2003-12-22 20:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22  0:34 Program Terminates Peter Richtmyer
2003-12-22 14:37 ` Steve
2003-12-22 18:02   ` Georg Bauhaus
2003-12-23 11:16     ` Martin Krischik
2003-12-22 20:55   ` Randy Brukardt [this message]
2003-12-22 23:01   ` Stephen Leake
2003-12-22 23:03 ` Stephen Leake
2003-12-30 15:30 ` Peter Richtmyer
2003-12-30 16:07   ` Jeff C,
2003-12-30 22:31     ` Peter Richtmyer
2003-12-30 23:06       ` Jeff C,
2003-12-31 14:42         ` Peter Richtmyer
2003-12-31 15:52         ` Robert I. Eachus
2003-12-31  8:24       ` Simon Wright
2003-12-31 14:55     ` Frank J. Lhota
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox