Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-13 Thread Kevin Rushforth
On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev wrote: > ## Root Cause > > Focus is being requested in show(), even a background thread. > > ## Solution > > Do not request focus if in a background thread. I took another look today, and I am convinced that we need to change the spec and impl

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Kevin Rushforth
On Wed, 12 Feb 2025 23:39:07 GMT, Andy Goryachev wrote: > > 1. Change the spec and implementation to throw an exception if > > `ComboBoxBaseSkin::show` is called on a thread other than the FX > > Application Thread > > I like this option! > > Does it mean ColorPicker.show() should also throw?

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Andy Goryachev
On Wed, 12 Feb 2025 23:11:08 GMT, Kevin Rushforth wrote: > 1. Change the spec and implementation to throw an exception if > `ComboBoxBaseSkin::show` is called on a thread other than the FX Application > Thread I like this option! Does it mean ColorPicker.show() should also throw? ---

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Andy Goryachev
On Wed, 12 Feb 2025 23:18:37 GMT, Kevin Rushforth wrote: > Why did you call show in the first place in your NodeInitStressTest (for that > matter, why directly call _any_ skin methods, since apps generally don't) 1. `show()` javadoc says "display the popup _**aspect**_ of the user interface",

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Kevin Rushforth
On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev wrote: > ## Root Cause > > Focus is being requested in show(), even a background thread. > > ## Solution > > Do not request focus if in a background thread. Even after considering option 3, I prefer option 1. I can't think of a good reason to

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Kevin Rushforth
On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev wrote: > ## Root Cause > > Focus is being requested in show(), even a background thread. > > ## Solution > > Do not request focus if in a background thread. I took a quick look at PR #1709 which has a similar problem with its show method, and

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Kevin Rushforth
On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev wrote: > ## Root Cause > > Focus is being requested in show(), even a background thread. > > ## Solution > > Do not request focus if in a background thread. I'm not sure this fix is sufficient in all cases. As I mentioned in the bug report, I

Re: RFR: 8349004: DatePicker: NPE in show() when initialized in a background thread

2025-02-12 Thread Kevin Rushforth
On Wed, 12 Feb 2025 19:45:32 GMT, Andy Goryachev wrote: > ## Root Cause > > Focus is being requested in show(), even a background thread. > > ## Solution > > Do not request focus if in a background thread. Reviewers: @kevinrushforth @arapte - PR Comment: https://git.openjdk.org/