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

Re: Problem using sav files.





David Fanning wrote:
> 
> Theo Brauers (th.brauers@fz-juelich.de) writes:
> 
> > 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}
> 
> I'm going to guess programmer error. :-)
> 
> You will go a long way toward solving the problem if you
> stick some kind of Catch error handler in those functions/routines.
> It is hard to write an application with 4 functions that doesn't
> have some kind of error, let alone 400! I use a Catch
> error handler in most of my widget programs that is some
> variation of this:
> 
>    Catch, theError
>    IF theError NE 0 THEN BEGIN
>       Catch, /Cancel
>       Widget_Control, event.top, Set_UValue=info, /No_Copy
>       ok = Error_Message(Traceback=1, /Error)
>       RETURN
>    ENDIF
> 
> The Error_Message program can be found on my web page. It
> will put the system error message (!Error_State.Msg) in
> a Dialog_Message if appropriate for the device. Otherwise,
> it will use Message. But setting the Traceback keyword
> will lead you directly to the error. :-)
> 
> Cheers,
> 
> David
> 

Hi David

Thanks for your advice. I am going to try it. However, the problem
is that the program runs perfectly when compiled and it crashes IDL
(WinNT Dr. Watson shows up) when restored from sav file. Correct me 
if I am wrong but I always thought that the SAVE/EXIT/START/RESTORE 
combination puts me back to the location where I came from, not 
lightyears away.

Best Theo