comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeff Creem" <jeff@thecreems.com>
Subject: Re: VxWorks memory error when closing ADA file
Date: Sat, 28 Apr 2001 18:31:30 GMT
Date: 2001-04-28T18:31:30+00:00	[thread overview]
Message-ID: <60EG6.1867$9j1.744767@typhoon.ne.mediaone.net> (raw)
In-Reply-To: telfajj2odkg07@corp.supernews.com


----- Original Message -----
From: "Peter Richtmyer" <pmr@efortress.com>
Newsgroups: comp.lang.ada
Sent: Saturday, April 28, 2001 8:52 AM
Subject: Re: VxWorks memory error when closing ADA file

....some stuff deleted but I think the quoted stuff is all still in
context...


> I'm "sure" you are right, because you are "sure" that you are right.
> And he was "sure" the code should work. Sometimes we are so
> "sure" that a possible solution would not work that we do not even
> try something. And usually we are right. Almost always. And most
> of our code is always right. Except for...                   :-)
>
> Hey, maybe he is getting the ERROR because the name of the file
> is "ERROR_FILE"     :-)
>
> All he needs to do is change the name to "NO_ERROR_FILE"    :-)
>
> OK, I am being absurd to say that finding errors is easier if
> you are willing to explore ALL the possible causes, readily
> sorting them in your mind as to which are more likely. And some
> times it pays to just try something we are "sure" will not fix it,
> because it fixes it.
>



Wow...That was a lot of fun to read..I probably should have been more clear.

When I said not closing the file would not work (since as you
said earlier the OS would usually clean things up) in vxWorks I did
not mean that it was an approach that would not be able to solve
his problem...I meant that it just will not work under vxWorks at all.

vxWorks will indeed NOT close the file when your program terminates since
it never really knows for sure that other vxWorks tasks won't be accessing
it.

Now it is possible that if you declare your file type inside a procedure
("on the stack") that
perhaps the Ada runtime might close and clean up for you but certainly
not the OS. Perhaps this might even work for a package level variable but
again only if it is a file accessed via Ada file routines and then again it
would
only be if the run-time did it.



As for the rest of that babble..Whenever I have seen people "fix" problems
via
a method that should not have fixed it usually comes back to bite them
later. It only
(in my small mind) is actually a real fix if the "strange" fix brings you to
a solution
that not only appears solves the problem but also lets you understand why
the problem
originally existed.

Of course by now we have strayed pretty far off topic and still not helped
the
original poster so any additional verbal battles should be taken to e-mail.
Perhaps
you have some additional advice about shaking a dead chicken over the code
to
make the problem go away?







  reply	other threads:[~2001-04-28 18:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-23 20:23 VxWorks memory error when closing ADA file jhuber
2001-04-23 23:02 ` Jeff Creem
2001-04-24 13:40   ` Smark
2001-04-25  0:21     ` Jeff Creem
2001-04-25 13:58       ` Smark
2001-04-27 19:35       ` Simon Wright
2001-04-24 15:37   ` jhuber
2001-04-24 21:06     ` Ted Dennison
2001-04-28  5:49 ` Peter Richtmyer
2001-04-28 12:01   ` Jeff Creem
2001-04-28 12:52     ` Peter Richtmyer
2001-04-28 18:31       ` Jeff Creem [this message]
2001-04-28 21:16         ` Shaking Dead Chickens - off topic (was VxWorks memory error when closing ADA file) Peter Richtmyer
replies disabled

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