On Tue, 6 Jun 2023 21:00:20 GMT, Phil Race <[email protected]> wrote:

> I wonder if we have any other leaks due to similar thread mis-usage ? Seems 
> possible since this one went un-detected for a long time and its probably one 
> of the easier ones to get to run out of GDI objects.

@prrace Potentially, all the usages of `SyncCall` are at risk.

https://github.com/openjdk/jdk/blob/ed2b4673de6893047407c61f82b5e68741459876/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp#L1870-L1878

It does not even synchronise the threads. So, there could be other leaks or 
issues with memory visibility.

I think this scenario led to leaks because it also modified the position of the 
horizontal scroll bar, which started animation provided by visual styles. The 
animation never got a change to complete before another update came. The issue 
wasn't reproducible if there was only vertical scroll bar which was being 
dragged.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14338#issuecomment-1706593274

Reply via email to