🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #73270

Re: Request summary of Access Violations status

#73270
From: Filip Noworyta
Date: Thu, 08 Mar 2001 17:12
58 lines
3473 bytes
Hello Luu,

You wrote:
>it's common, yes, but not well known.  An access violation occurs when 
>some code refers to an object that either doesn't exist or has already 
>been freed.  If you get a ton of a.v. in rapid succession, it probably 
>means the code is inside a loop.  Unfortunately, the address given is 
>helpful only occasionally.  Often it doesn't point to any code that's 
>meaningful (to me, anyway).  Even when it does, it may be hard to 
>figure out how we got there.  

I have (or had) the same problems. They are very common to any
software which allocates and deallocates memory. And to any
language which doesn't have AUTOMATIC GARBAGE COLLECTOR.

[...]
>If you (or someone else) want to work with me to track this down, email 
>me.  Here's what I'll need you to do: find a group/file that will 
>consistently reproduce the a.v. when you decode it.  If possible, post 
>a file in a test group on a server I can access, like 
>msnews.microsoft.com.  For good measure, send me all your config files, 
>(taking out sensitive data).  Basically, I need you to create a setup 
>of Xnews that will consistently produce the a.v., then send it to me.  
>If I can reproduce it on my machine, that'll be the 1st step.

I think that this won't help you, because the problem is in
freeing the memory and this error could be totally random. So you
use free() or delete or something in Pascal and this memory was
already freed earlier. I know two solutions:

1. When you deallocate the memory, set some variable to NULL or
0 and later, when deallocating again, check if it was freed
and don't do deallocate if this was already done.
2. Use
try{
	do something here
}
catch(...){
	error occured, show the messagebox or do nothing
}
Pascal should have something like that. Very good solution,
although I use both of them.

=========================
There was a discussion about the problem in B.Stroustrup's "C++
Language" book. The author of this language decided not to add
automatic garbage collector, so every programmer has to think
about this himself or use some class/library. AFAIK
Pascal/Delphi is very similar.

In Java language, you don't have to free the memory - it's done
automatically when it's not needed. That's a big plus, but it
could influence on the speed of the application.
-- 
Filip Noworyta
Noworyta News Reader 1.6 - http://nnr.freeservers.com
new newsreader and mail client
Technical Details
Message-ID: <988ej5$m1fj$1@ID-70408.news.dfncis.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!pa101.katowice.cvx.ppp.tpnet.PL!not-for-mail
References: <986cv901c04@enews3.newsguy.com> <Xns905DEC82A9AB0luutrangeocities@206.13.28.182>

Show Full Headers
Complete Article Headers
Message-ID: <988ej5$m1fj$1@ID-70408.news.dfncis.de>
Subject: Re: Request summary of Access Violations status
Date: Thu, 08 Mar 2001 17:12:35 GMT
From: Filip Noworyta <filnow@kki.net.pl>
References: <986cv901c04@enews3.newsguy.com> <Xns905DEC82A9AB0luutrangeocities@206.13.28.182>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!pa101.katowice.cvx.ppp.tpnet.PL!not-for-mail
Newsgroups: news.software.readers
Lines: 57
NNTP-Posting-Host: pa101.katowice.cvx.ppp.tpnet.pl (213.76.8.101)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 984071590 722419 213.76.8.101 (16 [70408])
User-Agent: Noworyta News Reader/1.6