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

Re: Problem using sav files.



Theo Brauers wrote:
> 
> Hi experts:
> 
> I am stuck with a problem using a sav file:
> 
> My program is an widget driven i/o interface for FACSIMILE. It
> consists of about 400 functions/routines. When I compile the
> whole thing using resolve_all it works fine in this IDL session.
> However, when I save the thing ( easy.sav ) and restart IDL using
> the easy.sav file it worked fine for a while, then the thing
> crashes IDL totally during operation even when I use the same
> input data. Restarting IDL with sav file: crash. Restarting
> IDL with source compiled: OK. Save and restart: Crash. Rebooting
> and repeating gives the same result. I can also reproduce this
> behaviour on a different machine, with different user profile.
> I had the same behaviour with a previous version of the program
> which crashed in the same way at a different location in the
> program but I cannot reproduce this again :-|
> 
> Does anybody have similar problems? Is there any possibility
> to catch an error before IDL crashes?
> I am using: { x86 Win32 Windows 5.3.1 Feb 23 2000}
> 
> Best regards
> 
> Theo
> 
Problem solved! Thanks to all contributors and to Reimar 
Bauer. :-)

What was wrong? We use an external routine (dll using fstat) 
determining the modification date of files. When we called 
this routine with a not existing filename IDL crashes. 
However, the reason for invalid filenames was the 
HELP, CALL=c procedure giving different results when called
from compiled code or from a sav file. 

Try this one:
;- test2.pro  ------------
FUNCTION testfunc
  HELP, CALL=c
  r = DIALOG_MESSAGE(c, /INFO)
  RETURN, c 
END

PRO test2
  c = testfunc()
END
-------------

IDL> .COMPILE test2
IDL> test2
IDL> SAVE, /ROUT, FILE='test2.sav'
IDL> RESTORE, /ROUT, FILE='test2.sav'
IDL> test2

Showing me that SAVE and RESTORE do not exactly restore the 
previous session.

Best Theo