RFR: 8349105: Pagination: exception initializing in a background thread [v2]
Andy Goryachev
angorya at openjdk.org
Fri Feb 7 20:47:20 UTC 2025
On Fri, 7 Feb 2025 18:41:53 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> ## Root Cause
>> Animation gets started in a background thread, which causes the animation handler to run in the FX application thread, thus creating simultaneous access to the control's fields (list of children in this case).
>>
>> ## Solution
>> Postpone the animation unless running in the FX application thread. There is no functional difference if the component is created/used in the FX application thread.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>
> - Merge branch 'master' into 8349105.thread.safety.pagination
> - postpone animation
I am unable to reproduce OOM on Windows 11 with the fix (I did see the OOM earlier when it was failing before the fix).
I've tried the unmodified test, as well as the extended version with the DURATION doubled to 10 seconds and added `@RepeatedTest(value = 5)` to the `pagination()` test. Same extended test passes just fine on macOS.
A cursory look at the Pagination/PaginationSkin code reveals no obvious candidates for memory leaks. Maybe try running it again, now that it has the text layout fixes as well?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1698#issuecomment-2644090529
More information about the openjfx-dev
mailing list