IDL fails to acquire window rendering context when running PLOT()

Issue

User reported the following error message when trying to plot in IDL when connected to it over SSH with X forwarding: IDLGRSRCDEST::GETTEXTDIMENSIONS: Failure to acquire window rendering context.

The following Errors may appear:

  • X windows protocol error: GLXBadContext.
  • X windows protocol error: 0.
  • IDLITWINDOW::DOHITTEST: Failure to acquire window rendering context.
  • IDLGRSRCDEST::GETTEXTDIMENSIONS: Failure to acquire window rendering context.
  • Unable to acquire device context.

Environment

macOS connecting to RHEL workstation with ssh and X forwarding

Cause

Hardware rendering is not working correctly or is having trouble with a specific plot.

Resolution

  1. Open IDL.
  2. Run the following command to change rendering to software: IDL> PREF_SET, 'IDL_GR_X_RENDERER', 1, /COMMIT

Hardware rendering can be re-enabled by replacing the 1 with a 0, as follows:

IDL> PREF_SET, 'IDL_GR_X_RENDERER', 0, /COMMIT

External resources

More information:

Details

Article ID: 2431
Created
Fri 5/29/20 2:03 PM
Modified
Thu 1/25/24 4:31 PM