Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: NPE when using FlatLaf window decorations and switching theme (regression in 3.5.3) #933

Closed
DevCharly opened this issue Dec 8, 2024 · 1 comment
Milestone

Comments

@DevCharly
Copy link
Collaborator

DevCharly commented Dec 8, 2024

Occurs as soon as component UI of JRootPane is updates. E.g. when switching theme or when Linux scaling or system font is changed.

caused by fix for #907; commit d471f08

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.JComponent.setBounds(int, int, int, int)" because "this.centerComp" is null
	at com.formdev.flatlaf.ui.FlatWindowResizer$WindowResizer.doLayout(FlatWindowResizer.java:275)
	at com.formdev.flatlaf.ui.FlatWindowResizer.updateVisibility(FlatWindowResizer.java:176)
	at com.formdev.flatlaf.ui.FlatWindowResizer.addNotify(FlatWindowResizer.java:155)
	at com.formdev.flatlaf.ui.FlatWindowResizer$WindowResizer.addNotify(FlatWindowResizer.java:287)
	at com.formdev.flatlaf.ui.FlatWindowResizer.<init>(FlatWindowResizer.java:96)
	at com.formdev.flatlaf.ui.FlatWindowResizer$WindowResizer.<init>(FlatWindowResizer.java:242)
	at com.formdev.flatlaf.ui.FlatRootPaneUI.createWindowResizer(FlatRootPaneUI.java:263)
	at com.formdev.flatlaf.ui.FlatRootPaneUI.installClientDecorations(FlatRootPaneUI.java:235)
	at com.formdev.flatlaf.ui.FlatRootPaneUI.installUI(FlatRootPaneUI.java:102)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:730)
	at java.desktop/javax.swing.JRootPane.setUI(JRootPane.java:445)
	at java.desktop/javax.swing.JRootPane.updateUI(JRootPane.java:455)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1363)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:1354)
	at com.formdev.flatlaf.FlatLaf.updateUI(FlatLaf.java:1092)
	at com.formdev.flatlaf.FlatLaf.lambda$7(FlatLaf.java:1079)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@DevCharly DevCharly changed the title Linux: NPE when using FlatLaf window decoration and Linux scaling or system font is changed (regression in 3.5.3) Linux: NPE when using FlatLaf window decoration and switching theme (regression in 3.5.3) Dec 8, 2024
@DevCharly DevCharly changed the title Linux: NPE when using FlatLaf window decoration and switching theme (regression in 3.5.3) Linux: NPE when using FlatLaf window decorations and switching theme (regression in 3.5.3) Dec 8, 2024
DevCharly added a commit that referenced this issue Dec 8, 2024
…theme (issue #933; regression in 3.5.3)

caused by fix for #907; commit d471f08
@DevCharly
Copy link
Collaborator Author

fixed in FlatLaf 3.5.4

@DevCharly DevCharly added this to the 3.5.4 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant