Coyote's Guide to IDL Programming

IDL Workbench Hangs in Program Loops

QUESTION: I'm just writing a simple main-level program loop, but the IDL Workbench completely hangs and the graphics window goes white. Here is the code I am using.

    PRO look_at_path    WINDOW,0    pt_0=10    pt_N=20
   f=INDGEN(1000)    REPEAT BEGIN      PLOT,f[pt_0:pt_N]
     READ, PROMPT='Enter new pt_0 & pt_N plot extents : ',pt_0,pt_N
   ENDREP UNTIL(pt_0 EQ -99)    END 

Is this a known problem? Is there a workaround?

ANSWER: Yes, it is a known problem. I've heard about it twice this week, and it has been reported to ITTVIS. The only workaround I have heard about is to insert a WAIT statement in your code, just after the READ command. Waiting for just a fraction of a second is usually enough to cause the problem to go away. I have heard no word from ITTVIS as to what the underlying problem is.

Version of IDL used to prepare this article: IDL 7.0.1.

Web Coyote's Guide to IDL Programming