f



New Twist on %BadMatch (invalid parameter attributes) error in IDL module for ENVI

Hi all,

I'm running ENVI+IDL 4.8 on Lion with a set of IDL code located in ENVI's s=
ave_add directory.  My IDL code uses the CG routines for displays and statu=
s windows that are outside of ENVI's domain.  While my progress bar  window=
s are updating, the BadMatch errors are being thrown in the IDL window.  Af=
ter 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=3D2; in my IDL startup file (didn't work) and =
included it in the IDL code calling the progress bar, which also did not wo=
rk. =20

I checked the ENVI Preferences dialog and made sure Display Defaults->Displ=
ay 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?

-B
0
Danielsn81 (49)
5/22/2012 2:12:23 PM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

2 Replies
608 Views

Similar Articles

[PageSpeed] 11

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.")
0
news8567 (866)
5/22/2012 2:40:08 PM
On Tuesday, May 22, 2012 10:40:08 AM UTC-4, David Fanning wrote:
> 
> 
> 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?

That did the trick.  Thanks for the help!
0
Danielsn81 (49)
5/22/2012 5:43:54 PM
Reply: