[OpenJDK 2D-Dev] XShmGetImage with image's > drawable's size causes BadMatch

Clemens Eisserer linuxhippy at gmail.com
Sat Nov 13 09:51:45 PST 2010


Hi,

I've recently encountered some BadMatch errors  triggered by fallbacks.
Those are caused by reading outside of surface bounds using the cached
ShmPixmap.

Testcase and patch attached.

Running with -Dsun.awt.noisyerrorhandler=True the testcase causes a BadMatch:
> Xerror BadMatch (invalid parameter attributes), XID 5000017, ser# 215
> Major opcode 139  //SHM
> Minor opcode 4      //GetImage

If a X11SDOps structure belongs to a pixmap I can directly use
pmWidth/Height, but for windows I have to query the attributes
width/height.
Is there a better way to get window's width/height, maybe through some
of AWT's structures?

- Clemens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shmgetfix.patch
Type: text/x-patch
Size: 2947 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20101113/88683bbb/shmgetfix.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ShmGetOOBTest.java
Type: application/octet-stream
Size: 496 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20101113/88683bbb/ShmGetOOBTest.java 


More information about the 2d-dev mailing list