Re: One RETALL is not enough [message #81882 is a reply to message #81875] |
Mon, 29 October 2012 04:25   |
Yngvar Larsen
Messages: 134 Registered: January 2010
|
Senior Member |
|
|
On Saturday, 27 October 2012 23:02:24 UTC+2, Mike Galloy wrote:
> wlandsman wrote:
>> While debugging a program, I've been getting error messages after a
>> RETALL like the following:
>>
>>> retall
>> % Invalid pointer: <POINTER (<PtrHeapVar2858>)>.
>> % Execution halted at: XYZ_DEFAULTS::CLEANUP 456
>>> retall
>> % Invalid pointer: <POINTER (<PtrHeapVar2578>)>.
>> % Execution halted at: XYZ_DEFAULTS::CLEANUP 456
>>> retall
>> % Temporary variables are still checked out - cleaning up...
>>> retall
>>
>> So one RETALL is not enough to get a normal return , but if I give four
>> RETALLs then there is enough of an extra "push" to give a normal return
>> ;-) I first thought this was just a timing problem, and that the
>> pointer cleanup wasn't complete at the time of the first RETALL, but it
>> was complete by the time of the fourth RETALL. But the errors
>> always appear in the same pattern as above, requiring 4 RETALLs no matter
>> how much time I give. Any suggestions as to what is happening?
>
>> P.S. Line 456 where the first errors occurs is the following.
>> IF OBJ_VALID(self.files.class.Revclasshash) THEN OBJ_DESTROY,
>> self.files.class.Revclasshash
>>
>> where 'files' and 'class' are structures, and Revclasshash is an object
>
> I regularly have cases where I need two EXITs to get out of IDL. I wonder
> if that is related.
I'm sure it is related. My guess is a bug in garbage collection of heap variables. To check if that is the case, test your program in IDL 7.x. (Won't work if you used any of the new IDL 8 features, of course.)
BTW it is a good thing if the garbage collector also runs on EXIT. If I remember correctly, I think I had some issues with this in some previous IDL version regarding objects where temporary files were supposed to be deleted in the "cleanup" method. The cleanup method was _not_ called on EXIT, so I ended up with a bunch of temp files taking up space on my hard drive.
--
Yngvar
|
|
|