On Thu, 18 Apr 2024 20:19:19 GMT, Oliver Kopp wrote:
>> modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinTextRangeProvider.java
>> line 365:
>>
>>> 363: if (text == null) return null;
>>> 364: validateRange(text);
>>> 365: int endOffset = maxLength >= 0 ? Ma
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing the `maxLength` and `maxLength + start`.
Oliver Kopp h
This probably is a common mistake, however the Weak wrapper is also easy
to use wrongly. You can't just wrap it like you are doing in your
example, because this is how the references look:
menuItem ---> WeakEventHandler ---weakly---> Lambda
In effect, the Lambda is weakly referenced, and
I didn't find such memory leaks in my application, though I don't do stage
handling. What I would look at is where the `stage` reference in the lambda
is coming from. You say you have a list of open stages. When you close a
stage, do you remove the references to that stage from all places? What
abo
On Thu, 22 Feb 2024 17:16:42 GMT, n-gabe wrote:
> There is a ConcurrentModificationException in MediaPlayer when removing a
> MediaView from it. The root cause is that you can't iterate over a HashSet
> with for (WeakReference vref : viewRefs) and removing items from
> the collection by viewRe
On Wed, 10 Apr 2024 11:47:28 GMT, drmarmac wrote:
>> This PR should fix the issue and cover all relevant cases with new tests.
>>
>> Note: This involves a small behavior change, as can be seen in
>> dblSpinner_testWrapAround_decrement_twoSteps() in SpinnerTest.java:749. With
>> this change the
On Wed, 10 Apr 2024 11:47:28 GMT, drmarmac wrote:
>> This PR should fix the issue and cover all relevant cases with new tests.
>>
>> Note: This involves a small behavior change, as can be seen in
>> dblSpinner_testWrapAround_decrement_twoSteps() in SpinnerTest.java:749. With
>> this change the
On Wed, 10 Apr 2024 19:01:57 GMT, Phil Race wrote:
> The Linux font lookup code is rejecting CFF OpenType fonts.
> Since these are becoming common because of the Noto family this could soon be
> quite a problem.
> I expect this fix is a candidate for backporting.
thank you @beldenfox for confir
On Wed, 10 Apr 2024 19:01:57 GMT, Phil Race wrote:
> The Linux font lookup code is rejecting CFF OpenType fonts.
> Since these are becoming common because of the Noto family this could soon be
> quite a problem.
> I expect this fix is a candidate for backporting.
I already had 23.10 ARM VM's co
On Thu, 18 Apr 2024 21:27:12 GMT, Oliver Kopp wrote:
>> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>>
>> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`,
>> then an addition of `start` to it leads to a negative value. This is "fixed"
>> by using `Math.max` compa
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing the `maxLength` and `maxLength + start`.
Oliver Kopp h
There is a ConcurrentModificationException in MediaPlayer when removing a
MediaView from it. The root cause is that you can't iterate over a HashSet with
for (WeakReference vref : viewRefs) and removing items from the
collection by viewRefs.remove(vref); within this loop.
-
Commit
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing the `maxLength` and `maxLength + start`.
Oliver Kopp h
On Thu, 18 Apr 2024 15:10:47 GMT, Andy Goryachev wrote:
>> Oliver Kopp has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Fix handling of requestedSteps < 0
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinTextRangeProvider
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing the `maxLength` and `maxLength + start`.
Oliver Kopp h
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing the `maxLength` and `maxLength + start`.
Oliver Kopp h
On Thu, 18 Apr 2024 14:44:12 GMT, Andy Goryachev wrote:
> would this fix need to be backported? how far back?
Yes - JavaFX 22 would be helpful for me.
`8u20-b12` was the first tag appearing with that code. -- I checked "git blame"
https://github.com/openjdk/jfx/blame/master/modules/javafx.grap
On Thu, 18 Apr 2024 15:17:54 GMT, Kevin Rushforth wrote:
> I'd like to see a test, if possible.
Where can I find hints on this? I would use TestFX, fire up some minimal app
and try to hit the branches of WinTextRangeProvider. However, I did not find
TestFX as used. And there is no
`javafx.gra
On Thu, 18 Apr 2024 14:18:43 GMT, Andy Goryachev wrote:
> the code looks right, I just can't verify the fix on a real system.
Well, yes, I had to install 23.10 in a VirtualBox VM, then clone FX on to it
along with all the tools
needed to build and test.
So it is definitely something that needs
Well, then all these setOnXXX() should mention it as well, wouldn't you say?
Perhaps a better solution might be a general purpose tutorial which addresses
the common pitfalls like memory leaks, and new features like Subscription.
We do have these tutorials for java8 -
https://docs.oracle.com/ja
I was investigating,
It probably should be menuItem.setOnAction(new WeakEventHandler<>(e ->
stage.toFront()));
But I bet it's a common mistake. Maybe the setOnAction should mention it?
Em qui., 18 de abr. de 2024 às 11:54, Andy Goryachev <
andy.goryac...@oracle.com> escreveu:
> You are correc
On Thu, 18 Apr 2024 12:01:52 GMT, Oliver Kopp wrote:
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing
On Thu, 18 Apr 2024 12:01:52 GMT, Oliver Kopp wrote:
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing
You are correct - the lambda strongly references `stage` and since it is in
turn is strongly referenced from the menu item it creates a leak.
The lambda is essentially this:
menuItem.setOnAction(new H(stage));
class $1 implements EventHandler {
private final Stage stage;
public $1(Stage s) {
On Thu, 18 Apr 2024 12:01:52 GMT, Oliver Kopp wrote:
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing
On Thu, 18 Apr 2024 12:01:52 GMT, Oliver Kopp wrote:
> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>
> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
> an addition of `start` to it leads to a negative value. This is "fixed" by
> using `Math.max` comparing
On Wed, 10 Apr 2024 19:01:57 GMT, Phil Race wrote:
> The Linux font lookup code is rejecting CFF OpenType fonts.
> Since these are becoming common because of the Noto family this could soon be
> quite a problem.
> I expect this fix is a candidate for backporting.
the code looks right, I just ca
Fixes https://bugs.openjdk.org/browse/JDK-8330462.
If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then
an addition of `start` to it leads to a negative value. This is "fixed" by
using `Math.max` comparing the `maxLength` and `maxLength + start`.
-
Commit m
On Wed, 10 Apr 2024 19:01:57 GMT, Phil Race wrote:
> The Linux font lookup code is rejecting CFF OpenType fonts.
> Since these are becoming common because of the Noto family this could soon be
> quite a problem.
> I expect this fix is a candidate for backporting.
The fix looks straightforward a
Hi,
I'm pretty sure setOnAction is holding references.
I have a "Open Windows" menu on my application where it lists the Stages
opened and if you click, it calls stage.toFront():
menuItem.seOnAction(e -> stage.toFront())
I had many crash reports, all OOM. I got the hprof files and analyzed them
On Sun, 24 Mar 2024 15:11:16 GMT, drmarmac wrote:
> This PR should fix the issue and cover all relevant cases with new tests.
>
> Note: This involves a small behavior change, as can be seen in
> dblSpinner_testWrapAround_decrement_twoSteps() in SpinnerTest.java:749. With
> this change the wrap
31 matches
Mail list logo