Hi Petr,
I'm fine with the targeted fix. We often do a similar thing in JavaFX
when processing various events, so the approach is proven to work good.
However, generally I agree with your comment from the bug report about
the necessity to process dispose selectors in the outer event loop only.
IIRC, we do something similar in the WToolkit native implementation. So
I suggest to file a separate medium priority bug to investigate this
further for JDK 9 (or tbd-major).
--
best regards,
Anthony
On 7/10/2014 5:02 PM, Petr Pchelko wrote:
Hello, AWT team.
Please review a small fix for the issue:
https://bugs.openjdk.java.net/browse/JDK-8032864
The fix is available at:
http://cr.openjdk.java.net/~pchelko/9/8032864/webrev.01/
I failed to create a general fix for the core problem, so I've made a point fix
for this bug. The problem is that CAccessible.getFocusOwner opens a nested loop
and goes to EDT.
This leads to some unknown reordering of selectors, and we crash.
retain/releasing the window around the call to getFocusOwner fixes this
particular bug.
I've trued to make a minimal fix as it needs to be backported to 8 and 7. I've
checked for memory leaks using Instruments.
With best regards. Petr.