INTERNAL/REVIEW: Native Intel Mac IDL/ENVI used on Mac OS X 10.4.7 & earlier susceptible to corrupted data
Anonym
[Needs to be reviewed for Compliance and IP issues (i.e. save file included)]
Topic:
The information in this article was revised: 3 Nov 2006 |
Under certain circumstances, the native Mac Intel version of IDL (6.3) and ENVI (4.3) running on Intel-based Mac OS X 10.4.7 (and earlier) systems may encounter an operating system bug that can cause data corruption.
Apple has corrected this operating system problem in Mac OS X v10.4.8. Upgrading to this OS version will solve the data corruption problem seen when using the native Intel Mac binary version of IDL and ENVI on older versions of the OS.
Note update November 3, 2006
Intel Mac OS X 10.4.8 problem for PowerPC-Mac binary X11 applications corrected with Apple X11 v1.1.2 Software Update patch
Note that the 10.4.8 upgrade introduced a problem causing graphical X11 applications distributed as PowerPC binaries and executed on Intel-based Macs with OS X 10.4.8 to crash with a "segmentation fault" error. The PowerPC-binary version of ENVI or IDL running on Intel Mac OS X 10.4.8 is affected by this problem. However, a subsequent Apple Software Update patch for Apple X11 v1.1.2 (November 2006) has corrected this problem.
If you use IDL or ENVI with a PowerPC-based Macintosh, you should not be affected by the segmentation fault problem with graphical X11 applications running under PowerPC emulation described in Tech Tip 4108.
Exelis Visual Information Solutions makes no recommendation as to whether you should install the OS X 10.4.8 upgrade or other Apple Software Updates. However, because of the emulation problem, we suggest that you should consider upgrading to OS X 10.4.8 and installing the Apple X11 v1.1.2 Software Update patch if you have an Intel-based Macintosh and any of the following apply:
- You are using any version of IDL prior to IDL 6.3
- You are using the PowerPC version of IDL 6.3
- You rely on other third-party PowerPC application that use X11
If you use or would like to use the Intel-Mac binary version of IDL 6.3 or ENVI 4.3, you should consider upgrading to Mac OS X 10.4.8 and use the Intel binary version of IDL 6.3 or ENVI 4.3 to correct the data corruption problem.
|
The remainder of this article remains relevant if:
- You continue to use Mac OS X 10.4.7 (or earlier) on an Intel-based Mac and
- You are using a native Intel Mac binary version of IDL or ENVI
The following topics are discussed:
- IS MY SYSTEM AFFECTED?
- HOW IS THE DATA AFFECTED?
- ARE THERE ANY WORKAROUNDS?
Discussion:
- IS MY SYSTEM AFFECTED?
To determine if IDL or ENVI running on your Mac Intel system is affected:
- Testing from IDL
Download and run the following IDL save file application:
The application source code, including comments and instructions for additional modes of operation for this application is also available:
Briefly, to use the test program at an IDL command prompt, simply restore or compile the program and then call the program name from an IDL command prompt. For example:
IDL> restore, '/Users/jim/Desktop/test_macintel.sav'
IDL> test_macintel
-or-
IDL> .compile /Users/jim/Desktop/test_macintel.pro
IDL> test_macintel
To run the program in IDL Virtual Machine mode, start the IDL Virtual Machine, then navigate to and select the downloaded test_macintel.sav file.
- Testing from ENVI
Using just an ENVI (4.3) session, the following procedure can determine if your Mac Intel system is affected by this problem.
Generate ENVI test data (File->Generate Test Data) using the folllowing parameters:
Output Image Value: Constant
Value: 1234
Samples: 12000, Lines: 12000, Bands: 1
Output Data Type: Unsigned Int
Output Result to: Memory
After generating the data repeatedly run Quick Stats... on the resulting constant value image in memory. If your system is affected then after a few runs, Quick Stats... will incorrectly produce a result that contains "0" for the Min value.
- HOW IS MY DATA AFFECTED?
The problem is caused by a data register copy error. An IDL X graphics device connection on this platform creates the circumstances in which this bug may be encountered. When the error occurs, some data elements may be unexpectedly altered. This altered data may lead to invalid computation results and/or image data artifacts.
- ARE THERE ANY WORKAROUNDS?
The bug does not become evident until IDL establishes a connection to the X11 server. Connections to the X11 server are created any time IDL performs a graphics operation, even if that operation does not display any graphics on the screen. For example, calls to the DEVICE procedure to set the display bit depth will establish an X11 connection. Additionally, the problem is encountered with the native Intel version, but not the PPC version, of IDL or ENVI on the Intel Mac OS X 10.4.
When Apple corrects this problem with Intel Mac OS X 10.4, the Mac Intel versions of IDL and ENVI should no longer encounter the described problem. Until then, there are three possible workarounds for this issue:
- Run the PPC version of IDL or ENVI
Since the problem has not been shown to occur when running the Mac PPC version of IDL or ENVI through Rosetta emmulation on the the Mac Intel platform, another possible workaround would be to run IDL or ENVI natively on a PPC Mac system, or invoke the PPC Mac version of IDL or ENVI on your Intel Mac system.
For instruction on how launch the PPC Mac version of IDL or ENVI on a Intel Mac system, please refer to Tech Tip 4084.
- No graphical commands
If your IDL application or IDL session will have no graphical output, also ensure that your IDL startup file does not make any graphics requests. This includes any calls to the DEVICE procedure.
- Issue the DEVICE, /NOTIMER command
If you will be calling graphical commands in an IDL application or IDL command line mode session, the following (undocumented) IDL DEVICE command, issued as the *first* command in your IDL session, can prevent the copy problem from occuring:
Note that this command will disable IDL's window update timer *entirely*. As a result, graphical applications will not update their displays until IDL processes the next command. This means that during lengthy computations, IDL application will not update its windows. Graphical applications *may* respond sluggishly, or even appear to have crashed, if computations take a long time to complete. |
- Development or command line mode sessions of IDL
For command line mode session of IDL (i.e., idl, the idlde or batch IDL sessions), the DEVICE, /NOTIMER command should be issued as the *first* commmand in the IDL application session. An IDL startup file may be used to call this command automatically. In that case, the command should be issued as the *first* command in your designated IDL_STARTUP file.
- Non-command line mode IDL applications
If you will be developing non-command line mode IDL applications (e.g., IDL Runtime or IDL Virtual Machine applications), the DEVICE, /NOTIMER command can be incorporated into the application itself as the first command to be called in program code. However, for distributed applications running on other platforms, as noted, this workaround may also adversely affect the usability and performance of the IDL application on those other platforms.
Note: ENVI (without the IDL or ENVI command prompt) cannot take advantage of the DEVICE, /NOTIMER workaround approach. ENVI (without the IDL/ENVI command prompt) users on affected Intel Mac systems should use the workaround described in Section 3A (above) instead. |