Re: Streaming short pieces of text into a textarea causes a crash

2023-12-19 Thread John Hendrikx
FX doesn't always warn you (as it would mean putting thread checks everywhere). The first trace however shows that the change to the TextArea did not originate from the FX thread. --John On 19/12/2023 18:17, Frank Delporte wrote: Thanks John, quick test with this change indeed seems to

Re: [External] : Re: New API: Animation/Timeline improvement

2023-12-19 Thread Andy Goryachev
You are right: the weak references are not suitable in this case. These cases are clearly bugs in the skins, we should log them (unless already logged); I don’t think we need new APIs. See

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread John Hendrikx
On Tue, 19 Dec 2023 12:24:14 GMT, Johan Vos wrote: > As for the memory leak issue: there were several. The first commit in this PR > fixed a clear memory leak, but the one that is still left is not described in > the issue. It occurs because whenever the SystemMenuBar is shown after it was >

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread Johan Vos
On Mon, 18 Dec 2023 13:18:02 GMT, Johan Vos wrote: >> A listener was added but never removed. >> This patch removes the listener when the menu it links to is cleared. Fix >> for https://bugs.openjdk.org/browse/JDK-8319779 > > Johan Vos has updated the pull request incrementally with one

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread Johan Vos
On Tue, 19 Dec 2023 09:59:32 GMT, John Hendrikx wrote: >> Johan Vos has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix more memoryleaks due to listeners never being unregistered. > > Would it be an idea to do deterministic clean-up? >

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread John Hendrikx
On Mon, 18 Dec 2023 13:18:02 GMT, Johan Vos wrote: >> A listener was added but never removed. >> This patch removes the listener when the menu it links to is cleared. Fix >> for https://bugs.openjdk.org/browse/JDK-8319779 > > Johan Vos has updated the pull request incrementally with one

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread John Hendrikx
On Mon, 18 Dec 2023 13:18:02 GMT, Johan Vos wrote: >> A listener was added but never removed. >> This patch removes the listener when the menu it links to is cleared. Fix >> for https://bugs.openjdk.org/browse/JDK-8319779 > > Johan Vos has updated the pull request incrementally with one

Re: Streaming short pieces of text into a textarea causes a crash

2023-12-19 Thread John Hendrikx
It looks like you are manipulating a property that is bound to a UI control on an external thread. Property manipulations that are tied to controls that are part of an active (visible) Scene **must** be done on the FX thread. Try:     StreamingResponseHandler streamingResponseHandler = new

Re: RFR: 8320965: Scrolling on a touch enabled display fails on Wayland [v3]

2023-12-19 Thread Johan Vos
On Mon, 18 Dec 2023 22:00:28 GMT, Kevin Rushforth wrote: > I did a build with GTK 3.22 (so it compiles the new code, does the dlsym, and > does the runtime check) and verified that there are no regressions when > running on an older system (Ubuntu 16.04). That sounds good. > If we decide

Re: RFR: [WIP] 8319779: SystemMenu: memory leak due to listener never being removed [v4]

2023-12-19 Thread Johan Vos
On Mon, 18 Dec 2023 13:18:02 GMT, Johan Vos wrote: >> A listener was added but never removed. >> This patch removes the listener when the menu it links to is cleared. Fix >> for https://bugs.openjdk.org/browse/JDK-8319779 > > Johan Vos has updated the pull request incrementally with one

Streaming short pieces of text into a textarea causes a crash

2023-12-19 Thread Frank Delporte
Hi, while experimenting with a ChatGPT-like user interface, I found a crashing JVM with different types of errors when streaming the response towards a TextArea. This is probably caused by too fast refreshes of the text as pieces of content are received within the same milliseconds: