ENVI/IDL object graphics can fail or crash ENVI/IDL on Mac OS X 10.8 using XQuartz 2.7.2
PROBLEM DESCRIPTION
Note that ENVI 5.0 and IDL 8.2 are not officially supported on Mac OS X 10.8 (Mountain Lion). However, customers have reported being able to successfully use these versions of ENVI and IDL on their Mac OS X 10.8 systems. |
IDL object graphics (including the IDL 8 function graphics and other routines using object graphics features) used in ENVI 5.0 and IDL 8.2 can fail and even cause ENVI or the IDL Workbench to freeze or crash, when using IDL hardware rendering, Mac OS X 10.8 (Mountain Lion) and XQuartz version 2.7.2. (Also, we have not confirmed, but it may be possible that this problem can affect IDL 8.1 and 8.0. It may also affect ENVI/IDL on Mac OS X 10.7 or 10.6 when using XQuartz 2.7.2 or earlier.)
You can determine your version of XQuartz by launching XQuartz and then selecting the menu item "X11 > About X11".
Below are examples of reported error messages also associated with this problem.
Example error 1:
% IDLGRSRCDEST::DRAW: Failure to acquire window rendering context.
% IDLGRSRCDEST::DRAW: Unable to acquire device context.
% Execution halted at: $MAIN$
Example error 2:
Invalid memory access of location 0x1 rip=0x10f1fa3f4
Segmentation fault
SOLUTION
The problem described above may be resolved by upgrading to the latest compatible stable release version of XQuartz (v2.7.4 at the time this article was written). XQuartz can be obtained from the web site location:
http://xquartz.macosforge.org
WORKAROUNDS
If it is not possible for you to upgrade to the latest version of XQuartz or the problem persists even after upgrading XQuartz, other workarounds for this problem include: 1.) Configure IDL to use Software Rendering or 2.) Downgrade to XQuartz 2.7.1.
1.) Configure IDL to use Software Rendering.
a.) You can change your IDL preference to use Software rendering via the IDL Workbench Preferences dialog. From the "IDL" select "Preferences...". On the left pane of the Preferences dialog, expand IDL and select Graphics, and then on the right choose the "Default rendering method for object graphics" setting for Software (1)). Click Apply and then OK. (This approach can be used even if running IDL in unlicensed demonstration mode.)
b.) Alternatively, from an IDL session IDL> command prompt, issue the following command to change your IDL Preferences to cause IDL to use software rendering by default:
PREF_SET, 'IDL_GR_X_RENDERER', 1, /COMMIT
2.) Downgrade to XQuartz 2.7.1.
Another workaround that may allow use of IDL hardware rendering on Mac, is to revert to the previous version of XQuartz, version 2.7.1.
The following steps have been successfully used by Exelis Visual Information Solutions Technical Support to uninstall XQuartz 2.7.2 from a Mac OS X 10.8 (Mountain Lion) system and then install XQuartz 2.7.1.
Please note: If you are not familiar with configuring software/services on your system or working with "sudo" commands from a terminal window, please contact your system administrator for assistance.
Note: If you are not familiar with configuring software/services on your system or working with "sudo" commands from a terminal window, please contact your system administrator for assistance. |
Administrative privileges are required to complete the following.
a.) Uninstall XQuartz 2.7.2.
From web page:
http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ
--under the section titled "Uninstall (Snow Leopard)", the following two commands issued at a *Apple Terminal Window* appear to successfully remove XQuartz 2.7.2 on Mac OS X 10.8 (mountain lion)
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
To disable the XQuartz X11 service on Mac OS X 10.8, issue the command:
sudo launchctl unload -w /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
b.) Download and install XQuartz 2.7.1
Download the XQuartz 2.7.1 installer package file from:
http://xquartz.macosforge.org/trac/wiki/X112.7.1
Open the downloaded XQuartz 2.7.1 installer package file using the system installer utility (e.g., right mouse-click > Open With > Installer (default)). Follow the prompts to complete the installation.
Log out of the system and log back in.
c.) Test IDL 8.2 Graphics using hardware rendering.
Launch IDL 8.2 and enter the following two commands:
; Set IDL preference to use Hardware Rendering
PRINT, PREF_SET, 'IDL_GR_X_RENDERER', 0, /COMMIT
img = Image(/TEST)
At this point, a functional IDL Image graphics window should appear indicating that XQuartz 2.7.1 is working properly with IDL 8.2. If using ENVI 5.0, launch ENVI and test the affected functionality.