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

Layout settings window is not showing up in Ubuntu 22.04 Wayland GNOME desktop #59

Closed
UlyssesZh opened this issue Jun 10, 2022 · 11 comments
Assignees
Labels

Comments

@UlyssesZh
Copy link

Just as the title says. Other windows (configure keys, about, etc.) work just fine so far.

@RoanH
Copy link
Owner

RoanH commented Jun 11, 2022

Interesting, I assume this holds for both the button on the main screen and the button in the live configuration screen? Is there any error output present in the console? On Windows this works fine and I don't immediately see anything that would be significantly different on Ubuntu, so this might be a hard one to debug. I'll first see if I can reliably reproduce this to get more data to work with.

@RoanH RoanH self-assigned this Jun 11, 2022
@RoanH RoanH added the bug label Jun 11, 2022
@UlyssesZh
Copy link
Author

I found that this bug can be reproduced in Ubuntu 20.04 X11 GNOME desktop. The main screen is fine, and the grids are shown correctly. The layout configuration screen is not showing up. There is a Java exceptions showing in the console:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "dev.roanh.kps.ui.model.SpecialNumberModel.isSpecialValueSelected()" because "this.incompatible.model" is null
	at dev.roanh.kps.layout.LayoutValidator$FieldListener.specialValid(LayoutValidator.java:127)
	at dev.roanh.kps.ui.model.SpecialNumberModel.getPreviousValue(SpecialNumberModel.java:96)
	at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:555)
	at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:535)
	at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.installUI(BasicSpinnerUI.java:163)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:730)
	at java.desktop/javax.swing.JSpinner.setUI(JSpinner.java:220)
	at java.desktop/javax.swing.JSpinner.updateUI(JSpinner.java:245)
	at java.desktop/javax.swing.JSpinner.<init>(JSpinner.java:190)
	at dev.roanh.kps.ui.dialog.LayoutDialog.createListItem(LayoutDialog.java:218)
	at dev.roanh.kps.ui.dialog.LayoutDialog.configureLayout(LayoutDialog.java:79)
	at dev.roanh.kps.Menu.lambda$createMenu$32(Menu.java:427)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	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:743)
	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)

@RoanH
Copy link
Owner

RoanH commented Jun 13, 2022

Awesome, that's exactly what I need. I have no idea what the root cause of this issue is, since in theory this looks like it should affect Windows as well (but it doesn't). However, this should be enough information to at least mitigate the issue even if I can't find the true cause.

RoanH added a commit that referenced this issue Aug 26, 2022
fix issue roan/KeysPerSecond#227 (GitLab)
fix issue #59 (GitHub)
@RoanH
Copy link
Owner

RoanH commented Aug 26, 2022

This should be fixed now in v8.7, though I didn't manage to reproduce the issue on my own Ubuntu install (not running Wayland GNOME though). However, it seems like this probably had more to do with the exact version/distribution of Java being used anyway.

@RoanH RoanH closed this as completed Aug 26, 2022
@UlyssesZh
Copy link
Author

Still reproducable for v8.7 on Ubuntu 20.04 X11 GNOME. Exactly the same exception.
I will test this more.

@UlyssesZh
Copy link
Author

Confirmed also still reproducable on another Ubuntu machine (Ubuntu 22.04).

@RoanH
Copy link
Owner

RoanH commented Oct 8, 2022

Thanks for the extra information, are you sure the exception is exactly the same? Because as far as I can tell that shouldn't be possible anymore. I should have a system lying around with those specifications though, so I'll try to reproduce it.

@RoanH RoanH reopened this Oct 8, 2022
@RoanH
Copy link
Owner

RoanH commented Oct 8, 2022

Alright, I've managed to reproduce it (slightly different line numbers), still not sure what the cause is, but this should help to figure that out.

@RoanH
Copy link
Owner

RoanH commented Oct 8, 2022

Actually, the new line numbers gave it away. I fixed the bug in the location from your original exception, but it turns out that there is another place I used the same pattern that I did not fix. So this should be fairly easy to resolve.

RoanH added a commit that referenced this issue Oct 8, 2022
fix issue #59
fix issue roan/KeysPerSecond#227
@RoanH
Copy link
Owner

RoanH commented Oct 8, 2022

Confirmed this to be really fixed now, the fix will be released with version 8.8 (already available on master).

@RoanH RoanH closed this as completed Oct 8, 2022
@RoanH
Copy link
Owner

RoanH commented Oct 8, 2022

And thanks again for the report and extra information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants