[OpenJDK 2D-Dev] CR 6974985 Redispatched, P3 java/classes_2d Jave2Demo threw exceptions when xrender enabled in OEL5.5
Phil Race
philip.race at oracle.com
Thu Aug 26 21:18:49 UTC 2010
Been on vacation ... just catching up ..
So my reading of your debugging is that you have instrumented all the
locations you call
XRenderCreatePicture and XRenderFreePicture so you can track these ..
although I
don't see (2) logging that creation.
Looking at (3) the alternatives that come to mind are :
- as you suggest the error reporting is questionable
- XRenderCreatePicture looks like it succeeded but didn't
- some code stomped on the Picture's client-side memory
- some other code is doing X11 protocol on another thread without the lock
Its not at all clear which it is from the evidence but since
XRenderCreatePicture is
aysnchronous you may not find out that it didn't work until later.
How about inserting a call to XSynchronize(True) so which may give you
a more timely errors.
Or maybe run your Xserver in sync mode "X --sync ..." but that'll make
everything painfully slow.
-phil.
On 8/16/2010 8:51 AM, Clemens Eisserer wrote:
> 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
> XError:*
> 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/20100826/2a311345/attachment.html>
More information about the 2d-dev
mailing list