You are here: Foswiki>Applications Web>AppGuiJavaFX>AppGuiJavaFxKnownBugs (10 Jul 2024, AnnekeWalter)Edit Attach

Known Bugs

This is a list of known JavaFx Bugs that have been observed in our applications. The list should only contain bugs that have been filed in the openjdk bug tracking. If you observe a new problem please try to find an existing bug or create a new minimal reproduction example and report it.

The goals of this list are
  • Inform the team about known problems an possible workarounds
  • Allow to keep track of bugs and maybe remove workarounds once the issue is fixed
  • Motivate to create bug reports for observed issues as it is the first step for it to become solved
  • Have a list of issues that could be fixed by utilizing payed open jfx support

Filed Bugs

JDK-8193502: Dialog height switches between correct and too small

JDK-8193286: IntegerSpinnerFactory does not wrap value correctly

JDK-8087981: Alert dialogs do not resize correctly and cut message

JDK-8087859: TreeView items expanding out of visible range

JDK-8143032: ToolTip on child node not displayed

JDK-8213320: The edge of the scroll display area of WebView is not displayed.

  • Link: https://bugs.openjdk.java.net/browse/JDK-8213320
  • Workaround: ?
    • AW: I added some kind of workaround in accsoft-gui-fx for Application console for the lower edge, but did not find a fix for the right edge.
    • AW 2020-07: This has been closed as WONTFIX/Not An Issue, as the scroll bars fade to invisibility after a short while, then the full area is visible.
      It still seems sensible to me to keep the workaround in accsoft-gui-fx: With it, the last line is always visible, even when the scroll bars are displayed. Without it, the last line would be completely hidden until the scroll bars eventually fade away.
  • Affected application: All apps using the logger console

JDK-8222911: Text in label not wrapping correctly

JDK-8150263: ObservableListWrapper fires change notifications from sort() and sort(Comparator) even if list is not changed.

JDK-8217953: NullPointerException when TableCellSkin gets disposed twice

  • Description: Exception occurs after 100 changes(!) to a column's visible property and makes table unusable (similar changes might have the same effect)
  • Link: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8217953
  • Workaround: Not really known. Minimize the calls to change the visibility of a column, for example set an empty string as text.
  • Affected application: ChartFx TableViewer, expert-digitizer-app
  • Fixed in openjfx 16 (according to bug status)

JDK-8237926: Potential memory leak of model data in javafx.scene.control.ListView

JDK-8240642: Memory Leak in Tooltip if content changes while tooltip closed (And Popup Control)

  • Description: If you have a label and a Tooltip (or PopupControl) with a pane as content. A memory leak occurs if you change the tooltip's content. The condition is that the tooltip has been opened once and is (unassuming) not open during the content change.
  • Link: https://bugs.openjdk.java.net/browse/JDK-8240642
  • Affected: Only apps that change the content (a pane that has been set via setGraphic) of a tooltip, text property changes do not cause this problem
  • Workaround: Only update content nodes while the tooltip/popup is being shown!
  • Affected versions: openjfx 13, 15, 16, 17ea
  • Demo code with workaround: PopupBoxOom.java
  • Note: this seems to apply to all hidden scenes and is "works as designed" by JavaFx: see JDK-8092779
  • See also https://bugs.openjdk.java.net/browse/JDK-8269907 (PR exists), where the submitter states that it affects all hidden stages.

    Based on your description, this is as designed, so I don't think that there is a bug here. – Kevin Rushforth

JDK-8199934: ScrollPane bars hide content

  • Description: If scroll pane bars have policy AS_NEEDED, they can overlap/hide parts of the content.
  • Link: https://bugs.openjdk.java.net/browse/JDK-8199934
  • Affected: All apps.
  • Workaround: Set a minimum width/height to the scroll pane's viewport, e.g. scrollPane.setMinViewportWidth(0.1); . This should trigger the scroll pane to always reserve space for the scroll bars, even when they are not currently visible.

JDK-8271607: ScrollPane bars in window not visible after Window#sizeToScene

  • Description: When a window/dialog contains scroll pane, and the window contents exceed the max width of the window, the scroll pane scroll bars are often invisible after Window#sizeToScene was called. They do show up once the window is moved or resized.
  • Link: https://bugs.openjdk.java.net/browse/JDK-8271607
  • Affected: All apps.
  • Workaround: Set the location of the window (without actually changing the location), e.g. window.setX(window.getX());

JDK-8090379: Tooltip doesn't show for disabled Control

  • Description: Tooltip will not show when moving the mouse over a disabled button
  • Known affected apps: ionsource-reactor
  • Workaround: Wrap button into a StackPane and add the tooltip to it as well

JDK-8274043: ArrayIndexOutOfBoundsException on nextSet() (Exception when changing sorted list source)

  • Description: When changing (clearing) the original observable list of a sorted list an exception can occur when as a result of this change the original observable list is changed again – the sorted list does not seem to notice that the list has already been changed and tries to apply the change to it's index again
    • Concrete situation: Sorted list was bound to a ComboBox and when the list was cleared the selected value change which was then bound to change the original list again
  • Known affected apps: units-uilib-fx
  • Workaround: Prevent to change the original observable list of a sorted list a while processing changes of the list
  • See also: https://bugs.openjdk.java.net/browse/JDK-8162592

JDK-8279140: Selected value in ComboBox is incorrectly cleared when backing list is changed with setAll

  • Description: When changing the backing observable list of the items of a ComboBox with ObservableList#setAll, the previously selected value is cleared. This is not supposed to happen and did not happen before OpenJFX 17.
  • Known affected apps: units-uilib-fx
  • Workaround: Register a change listener on the #selectedIndexProperty of the ComboBox's SelectionModel .

JDK-8279138: Selected value in ComboBox is incorrectly cleared when "content binding" is used for backing list and setAll is used

  • Description: ComboBoxes that have their item list (#getItems) bound via Bindings#getContentBindings lose their selected value when the backing list has its contents changed via ObservableList#setAll . The ComboBox value remains unchanged if the backing list is set via ComboBox#setItems instead of using a content binding.
  • Known affected apps: -
  • Workaround: Try to avoid content bindings.

JDK-8255436: ListView horizontal ScrollBar flickers when widest item is near top of viewport

  • Duplicate: JDK-8282091: TreeView Horizontal Scroll Bar in endless hide and show loop
  • Description:
    • If a vertical ListView contains more items than the viewport can accommodate, and the widest item is near the top of the viewport, and the viewport is slightly too narrow to accommodate the widest item, then resizing the ListView by small amounts causes the horizontal ScrollBar to flicker between present and absent. This causes flickering vertical repositioning of all of the list items.
    • A TreeView with a custom but simple Cell as content can cause the horizontal scroll pane to twitch endlessly when the entry that is "too wide" that is causing the scroll pane to be shown is right at the bottom of the TreeView.
  • Known affected apps: Expert Digitizer App
  • Workaround: Assign a fixed size to the elements in the view. Or extend the minimum width of the elements so that the scroll bar is always visible.

JDK-8224260: Stage.showingProperty listener initially not triggered when stage contains a ProgressIndicator

  • Description: When a single listener is registered on a Stage's showingProperty before it is shown for the first time, and the Stage's content contains a ProgressIndicator, the listener will NOT be triggered for the first showing==true call (all subsequent calls will trigger the listener).
  • A comment on JDK-8224260 states that ProgressIndicator does not cause the issue anymore in JFX11+. However, the bug was reproduceable for us with JFX17+.
    • See also JDK-8295342 which we filed to report the apparent regression.
  • Workaround:
    • Register a second listener on the Stage's showingProperty (does not have to do anything, must just be present)
    • Use Stage#setOnShowing instead of a listener on the showingProperty

JDK-8319317: Broken Focus/KeyEvents for TextField when repeatedly displayed in new Stage

  • Description: Focus for e.g. TextFields breaks when the components are shown/hidden in a dialog multiple times, and a new Stage is used every time.
  • Known affected apps: IonSource App, see ION-1144
  • Workaround: When closing a Stage, request focus on it before discarding the Stage.

JDK-8335587: TextInputControl: Binding prompt text with linebreak (newline) causes exception

  • Description: When binding the promptTextProperty of a TextInputControl (TextField or TextArea) to a text that contains linebreaks/newlines ("\n"), the "bind" call causes a RuntimeException to be thrown.
  • Known affected apps: UnilacEmergencyApp
  • Workaround: Avoid linebreaks in prompts/do not use prompts and instead misuse normal text property

JDK-8335547: Support multi-line prompt texts for TextArea

  • Description: Feature Request. Linebreaks/newlines ("\n") are automatically stripped from prompt texts for TextAreas, which seems like an unnecessary limitation.
  • Known affected apps: UnilacEmergencyApp
  • Workaround: Avoid linebreaks in prompts/do not use prompts and instead misuse normal text property.

Bugs to be filed yet

Dialog causes fullscreen window to "jump" and lose fullscreen mode

Filed Bugs in ControlsFX

#362 [CheckListView] check() and checkAll() call twice changeListener

  • Affects checkListView.getCheckModel().getCheckedItems().addListener(new ListChangeListener…
  • Since 2014
  • Further bug reports about this without any fixes https://github.com/controlsfx/controlsfx/issues?q=is%3Aissue+is%3Aopen+CheckListView
  • Workaround: Fill another list based on the change listener and check if the entries are already present or not / fill it into a set
  • Side note: Maybe CheckListView should not be used if there are bugs this essential open since 2014

-- AnnekeWalter - 18 Feb 2020
Topic revision: r34 - 10 Jul 2024, AnnekeWalter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback