JDK-6656412 : Uninitialized libXrender.so crashes AWT
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u10
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2008-01-29
  • Updated: 2011-01-19
  • Resolved: 2008-02-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b12Fixed
Related Reports
Relates :  
Description
The fix for 6633275 (Need to support shaped/translucent windows) uses the libXrender.so library to query whether a given GraphicsConfiguration supports translucency effects. If Java runs on an X11 display that is not configured to use the XRENDER extension, the X server doesn't initialize it, and invoking the XRenderFindVisualFormat() function from the manually loaded libXrender.so library returns NULL. Therefore, the code using this method should carefully test the returned value, and not assume that it is always a valid pointer.

Comments
SUGGESTED FIX $ sccs diffs -C awt_GraphicsEnv.c ------- awt_GraphicsEnv.c ------- *** /tmp/sccs.hjUVja 2008-01-29 15:29:43.000000000 +0300 --- awt_GraphicsEnv.c 2008-01-29 15:29:37.000000000 +0300 *************** *** 510,516 **** if (XRenderFindVisualFormat != NULL) { XRenderPictFormat *format = XRenderFindVisualFormat (awt_display, pVITrue [i].visual); ! if (format->type == PictTypeDirect && format->direct.alphaMask) { graphicsConfigs [ind]->isTranslucencySupported = 1; } } --- 510,518 ---- if (XRenderFindVisualFormat != NULL) { XRenderPictFormat *format = XRenderFindVisualFormat (awt_display, pVITrue [i].visual); ! if (format && ! format->type == PictTypeDirect && format->direct.alphaMask) ! { graphicsConfigs [ind]->isTranslucencySupported = 1; } }
29-01-2008

EVALUATION We need to verify the return value of the XRenderFindVisualFormat() function.
29-01-2008