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

NullPointerException in FloatListener #265

Open
andrewauclair opened this issue Jan 26, 2025 · 1 comment
Open

NullPointerException in FloatListener #265

andrewauclair opened this issue Jan 26, 2025 · 1 comment
Labels
bug Something isn't working fixed Issue has been fixed, pending release.

Comments

@andrewauclair
Copy link
Owner

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.JFrame.setLocation(java.awt.Point)" because "this.floatingFrame" is null
	at io.github.andrewauclair.moderndocking.floating.FloatListener.updateFramePosition(FloatListener.java:163)
	at io.github.andrewauclair.moderndocking.floating.FloatListener.lambda$dragMouseMoved$1(FloatListener.java:157)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	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)
@andrewauclair andrewauclair added the bug Something isn't working label Jan 26, 2025
@andrewauclair
Copy link
Owner Author

Beyond being a null pointer, this tells me that Modern Docking has some incorrect logic floating. updateFramePosition is only called when floating is active, and when floating is active, the floating frame should always exist.

andrewauclair added a commit that referenced this issue Jan 26, 2025
No longer invoking updateFramePosition later. This should prevent a situation when the drag has ended and the floating frame no longer exists. Perhaps it'll smooth out the UI too.
andrewauclair added a commit that referenced this issue Jan 27, 2025
No longer invoking updateFramePosition later. This should prevent a situation when the drag has ended and the floating frame no longer exists. Perhaps it'll smooth out the UI too.
andrewauclair added a commit that referenced this issue Jan 27, 2025
No longer invoking updateFramePosition later. This should prevent a situation when the drag has ended and the floating frame no longer exists. Perhaps it'll smooth out the UI too.
@andrewauclair andrewauclair added the fixed Issue has been fixed, pending release. label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue has been fixed, pending release.
Projects
None yet
Development

No branches or pull requests

1 participant