[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] XShmGetImage with image's > drawable's size causes BadMatch
From:       linuxhippy () gmail ! com (Clemens Eisserer)
Date:       2010-11-13 17:51:45
Message-ID: AANLkTim79OYqhutOkF_vXdk1jY-KXi234WLT_JH_3DDC () mail ! gmail ! com
[Download RAW message or body]

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/attachment.bin 
-------------- 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/attachment.obj 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic