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

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] RFR: JDK-8057830: Crash in Java2D Queue Flusher, OGLSD_SetScratchSurface
From:       Hendrik Schreiber <hs () tagtraum ! com>
Date:       2014-09-22 8:19:45
Message-ID: D03E2860-7D35-496B-8F1D-2F0D56B977A6 () tagtraum ! com
[Download RAW message or body]

Hi,

Bug: https://bugs.openjdk.java.net/browse/JDK-8057830

On OS X, CGLGraphicsConfigInfo is destroyed by =
OGLGC_DestroyOGLGraphicsConfig, however the pointer to it still hangs =
around for a while and is not reset to NULL, until we get rid of it with =
a Disposer later on.

In the meantime it appears to be possible that OGLSD_SetScratchSurface =
is called with the already destroyed CGLGraphicsConfigInfo as argument. =
The CGLGraphicsConfigInfo is not NULL, but its structs are in a bad =
state, most likely freed, leading to the observed crash.

The suggested change does not solve the problem, of needing to NULL the =
pointer to CGLGraphicsConfigInfo right where it's destroyed in =
OGLRenderQueue.c (not really possible IMO). However, it improves the =
destruction by NULLing some of it struct members and thus allowing us in =
OGLSD_SetScratchSurface to test those for NULL values. I also added a =
trace call for when this happens, to aiding potentially creating a =
better fix in the future.

Unfortunately, I have not been able to come up with a reasonable unit =
test for this, therefore I cannot be certain that it solves the problem. =
However, as the changes are minimal and obviously harmless, I would very =
much appreciate it, if somebody decided to sponsor and commit this =
patch. I have a live application out there based on 8u20 and this is the =
number one reason for user-reported crashes.

Webrev: https://www.beatunes.com/download/webrev_8057830.zip

I did a full clean OS X build to test the change. Before and after I =
encountered the same 11 jdk_2d failures (which made me wonder whether =
that is normal...).

Cheers,

-hendrik

PS: I'm new to contributing OpenJDK patches, let me know, if I should =
have done it some other way. Thanks.=
[prev in list] [next in list] [prev in thread] [next in thread] 

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