<AWT Dev> [14] RFR 8230782: Robot.createScreenCapture() fails if “awt.robot.gtk” is set to false

Dmitry Markov dmitry.markov at oracle.com
Thu Sep 19 18:25:16 UTC 2019


Thank you for the review, Phil!
I am afraid we cannot create a regression test for this since the issue takes place only in VNC environment. I have added “noreg-hard” to the bug.

Thanks,
Dmitry

> On 19 Sep 2019, at 17:58, Phil Race <philip.race at oracle.com> wrote:
> 
> 
> +1 to the fix but any ideas for a regression test.
> There are no related keywords on the bug ..
> 
> -phil.
> 
> 
> On 9/19/19 9:12 AM, Dmitry Markov wrote:
>> Hello,
>> 
>> Could you review a fix for jdk14, please?
>> 
>>  bug: https://bugs.openjdk.java.net/browse/JDK-8230782 <https://bugs.openjdk.java.net/browse/JDK-8230782>
>>  webrev: http://cr.openjdk.java.net/~dmarkov/8230782/webrev.00/ <http://cr.openjdk.java.net/~dmarkov/8230782/webrev.00/>
>> 
>> Problem description:
>> After integration of JDK-8210776 [1] we started to use malloc() function for allocation of XColor array in QueryColorMap() (see multiVis.c). However malloc() does not initialise allocated memory. So if the memory contains some “garbage” we may get incorrect data inside the array. As a result Robot.createsScreenCapture() retrieves incorrect colours.
>> 
>> Fix:
>> It is necessary to invoke calloc() for allocation of the array as it used to be before XWD upgrade
>> 
>> Thanks,
>> Dmitry
>> 
>> [1] - https://bugs.openjdk.java.net/browse/JDK-8210776 <https://bugs.openjdk.java.net/browse/JDK-8210776>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20190919/afb15bd8/attachment.html>


More information about the awt-dev mailing list