[OpenJDK 2D-Dev] CR 6974985 Redispatched, P3 java/classes_2d Jave2Demo threw exceptions when xrender enabled in OEL5.5

Clemens Eisserer linuxhippy at gmail.com
Mon Aug 16 15:51:41 UTC 2010

Hi Phil,

I was able to get rid of the problem by avoiding double-freeing Pictures,
but I am not sure if it was really the cause or it just hides the symthoms.

Setting sun.awt.noisyerrorhandler I got reports about invalid picture
parameters passed to XRenderFreePicture(), and there are only two locations
where I call these methods:
- In X11SurfaceData dispose()
- In XRenderBackendNative freePicture() when called by the pipeline itself.

When I set xrPic = None in X11SurfaceData.dispose() to avoid double-frees I
don't get any XErrors anymore:
  if(xsdo->xrPic != None) {
     XRenderFreePicture(awt_display, xsdo->xrPic);
     xsdo->xrPic = None; // Free pictures only once

However I added some debug code which really confuses me (without the "Free
pictures only once"-line, running Java2Demo).
Actually there was not a single case where dispose() was called twice, so I
don't have an explanation why setting xrPic=None changes things.

*1. This picture is created, and freed only once - and still I get an
  picture 52000aa created
  picture 52000aa freed in dispose
  Xerror RenderBadPicture (invalid Picture parameter), XID 52000aa, ser#
1836 - Major opcode 147 (Unknown) - Minor opcode 7

*2. This picture has no X11SDOps, it was created by the pipeline itself for
pipeline-internal use:*
  Xerror RenderBadPicture (invalid Picture parameter), XID 52000b8, ser#
5069- Major opcode 147 (Unknown) - Minor opcode 7
  picture 52001b8 freed in freePicture

So the double-free check doesn't change anything here, still with the check
in X11SurfaceData.dispose() I don't get any errors.
3. This picture was never freed, but I get a BadPicture for a Free Request:*
picture 52001dc created
Xerror RenderBadPicture (invalid Picture parameter), XID 52001dc, ser# 37176
- Major opcode 147 (Unknown) - Minor opcode 7

Do you have any idea whats going on here? Or why those XErrors could have
influenced setting the DND property?
Could it be that xcb's error reporting struggles with multiple threads?

Thanks, Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20100816/1e9b2df9/attachment.html>

More information about the 2d-dev mailing list