Modify

Opened 2 years ago

Last modified 7 months ago

#22164 new defect

No reaction to any key press

Reported by: mueschel Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

Sometimes JOSM stops accepting any key press while everything else continues to work normally.

  • no shortcut works
  • typing in text boxes doesn't work
  • all click actions are fine
  • Shift-click works

I couldn't figure out anything special I did before the problem appears.
Only a restart of JOSM solves the problem. I don't use any other Java applications regularly so I can't tell if this happens in JOSM only or is a global Java problem. Keyboard works fine with any other application, only JOSM is affected.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-05-29 21:53:52 +0200 (Sun, 29 May 2022)
Revision:18463
Build-Date:2022-05-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18463 en) Linux Ubuntu 22.04 LTS
Memory Usage: 364 MB / 2982 MB (103 MB allocated, but free)
Java version: 11.0.2+9-LTS, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 3840×2160 (scaling 2.00×2.00) :0.1 1920×1200 (scaling 2.00×2.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
libcommons-compress-java: libcommons-compress-java:all-1.21-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20201225-1build1
VM arguments: [--module-path=/usr/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djava.net.useSystemProxies=true, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35893)
+ FixAddresses (35893)
+ HouseNumberTaggingTool (35951)
+ InfoMode (35940)
+ Lanes (${version.entry.commit.revision})
+ Mapillary (2.0.0-beta.9)
+ OpeningHoursEditor (35924)
+ PicLayer (1.0.2)
+ apache-commons (35924)
+ apache-http (35924)
+ buildings_tools (35951)
+ jna (35924)
+ measurement (35893)
+ photoadjust (35893)
+ public_transport (35893)
+ reltoolbox (35893)
+ reverter (35972)
+ scripting (v0.2.0)
+ terracer (35893)
+ turnlanes (35893)
+ turnrestrictions (35893)
+ undelete (35893)
+ utilsplugin2 (35970)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportOneClick&preset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/hiking_routes_with_trail_marking&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Crafts&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Light_sources&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewParkingFeatures&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Maxspeed-zones&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/TurnLanes&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&style&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- ${HOME}/Downloads/Styles_Lane_and_Road_Attributes-style.mapcss
- ${HOME}/osm/maxspeed.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1

Attachments (2)

jstack.out (42.5 KB ) - added by mueschel 2 years ago.
josmstack.txt (29.0 KB ) - added by mueschel 8 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 by skyper, 2 years ago

Which x-server do you use, plain Xorg or XWayland?
Did you try it with a different WM (Gnome, Xfce, …)?

With Xorg and Gnome with "focus on hover" mode and disabled "Raise Windows When Focused", I noticed:

  • focus problems with shaded (rolled up) windows where still the area of full original size of the window keeps the focus. Moving the mouse pointer above the title bar or a left click into main window solved it.
  • Complete focus lost after downloads. Switching back to JOSM main window solved it.

I cannot reproduce any at the moment.

comment:2 by mueschel, 2 years ago

I'm using good old Xorg. I didn't try another WM yet - and this might take a while to test because the issue doesn't happen too often.

It doesn't seem to be focus related. I can properly switch between any of the detached JOSM windows and dialogues without issue, even after locking/unlocking the session JOSM just doesn't listen to key presses any more.

comment:3 by skyper, 2 years ago

Thanks.
You could try if a different java version like openjdk-17-jre solves the problem.

comment:4 by skyper, 2 years ago

Oh, I forgot. The next time it happens, could you created a thread dump and attach it to the ticket, please. Thanks.

comment:5 by taylor.smock, 2 years ago

I've encountered this problem on Gnome under Wayland. I've just never had the time when it happened to debug. :(

by mueschel, 2 years ago

Attachment: jstack.out added

comment:6 by mueschel, 2 years ago

I switched to openjdk-17-jre as suggested and it took a long time to get the problem again.
Is the attached file the thread dump you asked for?

comment:7 by taylor.smock, 2 years ago

It probably is, unfortunately it isn't showing any deadlocks. :(

Thanks for reproducing though.

by mueschel, 8 months ago

Attachment: josmstack.txt added

comment:8 by mueschel, 8 months ago

After a really long time without any issues, they are back. In the meantime I switched the Linux distribution and also the java environment changed without any problems.
Today I did some regular update of the system and the problem is back. I can reproduce it several times within a few minutes

OS: Opensuse Tumbleweed, X11
Java version: 22+36-suse-1.2-x8664, N/A, OpenJDK 64-Bit Server VM
The same issues happen with JDK 21.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-02-05 12:56:34 +0100 (Mon, 05 Feb 2024)
Revision:18969
Build-Date:2024-02-06 02:30:58
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18969 en) Linux openSUSE Tumbleweed
Memory Usage: 378 MB / 4096 MB (114 MB allocated, but free)
Java version: 22+36-suse-1.2-x8664, N/A, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 3840×2160 (scaling 2.00×2.00) :0.1 960×600 (scaling 2.00×2.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_DK.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_DK
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
apache-commons-logging: apache-commons-logging:noarch-1.2
VM arguments: [--add-modules=java.scripting,java.sql, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, -Dawt.useSystemAAFontSettings=lcd, -Dswing.aatext=true, -Dswing.plaf.metal.controlFont=Roboto 10, -Dswing.plaf.metal.userFont=Roboto 10, -Dswing.plaf.metal.systemFont=Roboto 10]
Dataset consistency test: No problems found

I also added another jstack output, although it looks not suspicious to me.

comment:9 by taylor.smock, 7 months ago

Next time that happens, can you check and see if there is a blocking dialog somewhere (move windows around until you can see the desktop)? I'm not seeing any reason for the UI to stop accepting input.

comment:10 by mueschel, 7 months ago

Hi @taylor.smock,
there is no dialog window and the UI is not blocked.

As in the initial report:

no shortcut works
typing in text boxes doesn't work
all click actions are fine
Shift-click works

That is, only key presses are not handled any more. But strangely all modifier keys combined with mouse actions work (Shift-Click for multi select, Ctrl-Alt-Click for scaling objects). I can work perfectly well with JOSM after it happened, apart from using the keyboard.

comment:11 by taylor.smock, 7 months ago

Desktop environment: KDE

Depending upon how adventurous you are feeling, can you try with a different DE, assuming you can reliably reproduce it?

IIRC, I was able to reproduce this awhile back. There might be another ticket for this problem where I put that information. I don't recall what I concluded at the time.

comment:12 by GerdP, 7 months ago

See #22247 which contains further links. I've had this problem often for a while, then not for a long time, maybe once a few days ago (it disappeared quickly)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mueschel.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.