Fanning Software Consulting

Odd Direct Graphics Behavior in IDL 8.3

Facebook Twitter RSS Google+

QUESTION: I recently upgraded to IDL 8.3 and I have been noticing odd (and mostly non-reproducible) behavior in some of my direct graphics programs, including Coyote Graphics programs. For example, here is a fairly reproducible case of a progress bar widget getting "stuck". I get a "widget not responding" message from IDL.

   cgProgressBar = Obj_New("CGPROGRESSBAR")
   cgProgressBar->Start
   FOR j=0, 99 DO BEGIN
      m = mean(dist(5000))
      counter = j
      cgProgressBar->Update, counter
      print, j
   ENDFOR
   cgProgressBar->Destroy

Do you have any idea what might be going on?

ANSWER: According to reliable sources at ITTVIS, something was introduced in IDL 8.3 that is affecting some of these direct graphics routines. As of the date of this article, they are not sure what exactly the problem is, but have been able to replicate the problem and describe it as "tricky." Since the IDL 8.4 code is "wrapping up," the problem, whatever it is, is unlikely to be fixed until the next version of IDL in 2015.

In the example above, it was discovered that an extra call to Widget_Event in the loop can give a "kick" to the program and cause it to run normally. This would indicate the problem is somehow related to the code that processes "events" in IDL.

   cgProgressBar = Obj_New("CGPROGRESSBAR")
   cgProgressBar->Start
   FOR j=0, 99 DO BEGIN
      m = mean(dist(5000))
      counter = j
      cgProgressBar->Update, counter
      void = Widget_Event(/NoWait)
   ENDFOR
   cgProgressBar->Destroy

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

Written: 12 Sept 2014