[OpenJDK 2D-Dev] Crash in CGraphicsDevice.m
Bill.York at mathworks.com
Fri Oct 12 18:46:40 UTC 2018
On 10/11/18, 5:43 PM, "Sergey Bylokhov" <Sergey.Bylokhov at oracle.com> wrote:
The similar bug was reported recently:
The root cause is how we use CoreGraphics display ID. This identifier can become non-valid at any time therefore methods, which is using this id should be ready to it.
And this bug found a few places which does not take care about the rule above.
I am working on the fix for jdk12.
On 10/10/2018 08:45, 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:
> 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.
Best regards, Sergey.
More information about the 2d-dev