[OpenJDK 2D-Dev] Crash in CGraphicsDevice.m

Philip Race philip.race at oracle.com
Wed Oct 10 16:03:15 UTC 2018

The code you suspect has nothing to do with the webrev you list.
It was introduced in fixing https://bugs.openjdk.java.net/browse/JDK-7124247
So has been there since JDK 8 GA. Not recent .. perhaps you can tell us
more about your users JDK versions and what is the earliest that 
reproduces this crash ?


On 10/10/18, 8:45 AM, Bill York wrote:
> 2d-dev folks,
> I work on a product called MATLAB and we have about 60 reports from 
> customers on Mac related to a crash in CGraphicsDevice.m
> Please let  me know if this is the right way to report a crash and 
> discuss getting it resolved.
> Here are the details:
> CGraphicsDevice.m is a native file in support of Java drawing and gets 
> called from Java_sun_awt_CGraphicsDevice_nativeGetDisplayMode
> While I can’t reproduce the problem, it looks like the display pointer 
> is becoming invalid for a time when the user’s laptop opens or closes.
> Looking at this source code:
> http://cr.openjdk.java.net/~serb/8000629/webrev.08/src/macosx/native/sun/awt/CGraphicsDevice.m.html 
> <http://cr.openjdk.java.net/%7Eserb/8000629/webrev.08/src/macosx/native/sun/awt/CGraphicsDevice.m.html>
> I see a direct call to CFStringCompare without a check for a NULL 
> CFStringRef.
>   * (CFStringCompare(mode, CFSTR(kIO30BitDirectPixels),
>     kCFCompareCaseInsensitive) == kCFCompareEqualTo)
> I believe if this code returned 0, the crash would not occur though 
> there may be some other cleanup in the surrounding call frames.
> Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20181010/8052a3eb/attachment.html>

More information about the 2d-dev mailing list