Re: New Twist on %BadMatch (invalid parameter attributes) error in IDL module for ENVI [message #80213 is a reply to message #80206] |
Tue, 22 May 2012 07:40  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian J. Daniel writes:
>
> Hi all,
>
> I'm running ENVI+IDL 4.8 on Lion with a set of IDL code located in ENVI's save_add directory. My IDL code uses the CG routines for displays and status windows that are outside of ENVI's domain. While my progress bar windows are updating, the BadMatch errors are being thrown in the IDL window. After several hundred of these errors, the entire workbench/ENVI crashes in a glorious fashion. I've followed David's article:
>
> http://www.idlcoyote.com/misc_tips/badmatch.php,
>
> and included 'Device, Retain=2; in my IDL startup file (didn't work) and included it in the IDL code calling the progress bar, which also did not work.
>
> I checked the ENVI Preferences dialog and made sure Display Defaults->Display Retain Value was equal to 2.
>
> Below are the versions of the relevant software libraries.
> Mac OS X 10.7.4
> XQuartz 2.6.4 (xorg-server 1.10.6)
> ENVI+IDL 4.8 (built on IDL 8.0)
>
> Any suggestions?
Try replacing this line in progressbar__define.pro:
self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
YSize=self.ysize, RETAIN=1)
With these two lines:
retain = (StrUpCase(!Version.OS_Family) EQ 'UNIX') ? 2 : 1
self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
YSize=self.ysize, RETAIN=retain)
Does that help?
I should be doing this for all draw widgets (which I actually
do now), but this program is very, very old. :-)
I'll update the program in a second.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|