[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ghost object



Well, I got that problem to repeat itself. Although I have no idea what
causes it, I am now convinced it is a bug. Here is what happens. Thanks
to Randall Frank for suggestion to use head numbers to locate the source
of leaking heap variable, it helped.
The "ghostfont" is caused to appear by the following line in the code:

self.scene -> add, view

If this line is commented out, the ghost "IDLgrFont" does not appear.
*If IDL is restarted*, it does not appear with this line present either,
*until* .Reset_session is not invoked several times (I have not tested,
how many exactly). .Full_reset_session does not cure the problem. I
could provide code snippets but I'll just send output logs:

***Comment out "self.scene -> add, view", compile, run.
IDL> display
*** Perform cleanup, but leave all code-created FONT ant TEXT objects undeleted.
IDL> widget_control, /reset & close, /all & heap_gc, /verbose & retall
<ObjHeapVar3123>
                STRUCT    = -> IDLGRFONT Array[1]
<ObjHeapVar3156>
                STRUCT    = -> IDLGRTEXT Array[1]
<ObjHeapVar3160>
                STRUCT    = -> IDLGRTEXT Array[1]
***All of these were made by the code. First TEXT is 33 references
***after the code-created FONT.
***Uncomment "self.scene -> add, view" and recompile, run
% Compiled module: DISPLAY.
IDL> display
TEMP (PARGRPLOT_TOP_WINDOW)
                OBJREF    = <ObjHeapVar3179(PARGRPLOT)>
IDL> widget_control, /reset & close, /all & heap_gc, /verbose & retall
<ObjHeapVar3190>
                STRUCT    = -> IDLGRFONT Array[1]
<ObjHeapVar3223>
                STRUCT    = -> IDLGRTEXT Array[1]
<ObjHeapVar3227>
                STRUCT    = -> IDLGRTEXT Array[1]
<ObjHeapVar3245>
                STRUCT    = -> IDLGRFONT Array[1]
***First three these made by the code. First TEXT is 33 references
***after the code-created FONT.
***Second instance of IDLGRFONT appears AFTER everything else.

I have no idea what exactly is going on, but adding a view to a scene
should not cause this. Looks like a bug in .Reset_session.
Cheers,
Pavel