Modify

Opened 14 months ago

Last modified 12 months ago

#22766 new defect

Text input eventually stops working

Reported by: AntiCompositeNumber Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report, linux Cc:

Description (last modified by AntiCompositeNumber)

After some time using JOSM normally, all text fields will stop reacting to input. Keyboard shortcuts and controls still work normally. Text fields do not react when clicked on, can not be pasted into by keyboard shortcut or context menu, and can not be typed into. This usually happens about 2 hours into an editing session and happens reliably. It does not appear to be associated with any particular action. The workaround is to restart JOSM. I did not observe it while running with --debug, but might not have waited long enough. I'll try for normal logs later. This issue appeared recently, after switching from josm-stable (18646) to josm-svn (18676). It also happened on 18662.

Please provide any additional information below. Attach a screenshot if possible.

Revision:18676
Is-Local-Build:true
Build-Date:1969-12-07 02:05:32

Identification: JOSM/1.5 (18676 SVN en) Linux Arch Linux
Memory Usage: 1168 MB / 3912 MB (312 MB allocated, but free)
Java version: 19.0.2+7, N/A, OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarkLaf
Screen: :0.0 1920×1080 (scaling 1.00×1.00) :0.1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
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: i3
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true, -Dawt.useSystemAAFontSettings=gasp]
Dataset consistency test: No problems found

Plugins:
+ AddrInterpolation (36011)
+ Create_grid_of_ways (35976)
+ FastDraw (36057)
+ FixAddresses (36011)
+ HouseNumberTaggingTool (35951)
+ ImportImagePlugin (36013)
+ MakeParallel (v1.1.0)
+ Mapillary (2.1.1)
+ OpeningHoursEditor (35924)
+ QuickLabel (23)
+ RoadSigns (36038)
+ SeaChart (35840)
+ ShapeTools (1250)
+ alignways (36011)
+ apache-commons (36034)
+ apache-http (35924)
+ auto_tools (81)
+ buildings_tools (36011)
+ changeset-viewer (0.0.6)
+ continuosDownload (105)
+ contourmerge (v0.1.9)
+ easypresets (1623509627)
+ editgpx (36054)
+ ejml (35924)
+ flatlaf (36036)
+ geotools (36028)
+ http2 (35921)
+ intersection (0.0.7)
+ jackson (36034)
+ jaxb (35952)
+ jna (36005)
+ jogl (1.2.3)
+ jts (36004)
+ log4j (36034)
+ measurement (35978)
+ opendata (36025)
+ openqa (v0.3.3)
+ photo_geotagging (35933)
+ photoadjust (36011)
+ pt_assistant (1ff2e15)
+ public_transport (36011)
+ reverter (36043)
+ shrinkwrap (v1.0.4)
+ tageditor (36011)
+ todo (30306)
+ touchscreenhelper (35893)
+ turnlanes-tagging (v0.0.5)
+ turnrestrictions (36011)
+ undelete (36011)
+ utilsplugin2 (36011)
+ wikipedia (605)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Quick-stops&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/US.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Quick-highways&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Playground_Equipment&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Telecom&zip=1
+ <josm.userdata>/EasyPresets.xml
+ https://github.com/kendzi/Simple3dBuildingsPreset/releases/download/0.9_2018-05-08/s3db-preset.zip

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_AME.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
- https://raw.githubusercontent.com/yopaseopor/indoormap/master/indoormap-style.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Building_Levels_Labels&zip=1
- https://raw.githubusercontent.com/OpenSidewalks/OpenSidewalks-Schema/master/open_sidewalks.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleRoofTags&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/TreeCrownDiameter&zip=1
- https://raw.githubusercontent.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransportV2&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/FixmeAndNote&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lit&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapillaryDetections&zip=1

Last errors/warnings:
- 02083.456 W: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.net.SocketException: Connection reset
- 02100.721 W: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.net.SocketException: Connection reset
- 02100.721 W: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.io.IOException: HTTP/1.1 header parser received no bytes. Cause: java.net.SocketException: Connection reset
- 02120.737 W: restricted header name: "Connection"
- 02120.913 W: restricted header name: "Connection"
- 02430.197 W: restricted header name: "Connection"
- 02430.373 W: restricted header name: "Connection"
- 02582.297 W: java.io.IOException: Connection reset. Cause: java.net.SocketException: Connection reset
- 02699.700 W: restricted header name: "Connection"
- 02699.879 W: restricted header name: "Connection"

Attachments (0)

Change History (12)

comment:1 by AntiCompositeNumber, 14 months ago

Description: modified (diff)

comment:2 by mkoniecz, 14 months ago

Removing ibus may help.

From my notes at https://github.com/matkoniecz/recovery-with-ansible/blob/master/roles/prepare_system_for_josm/tasks/main.yml :

I think I finally tracked down what was freezing keyboard input in JOSM,
what was plaguing me for years.
I removed ibus package from my Linux laptop some time ago what
seemingly removed issue.
https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/481656
https://bugzilla.redhat.com/show_bug.cgi?id=1145725
Found via <java program losing keyboard input> internet search.

I currently have neither ibus nor this problem.

suddenly too small windows remain unsolved - see https://josm.openstreetmap.de/ticket/22531

Last edited 14 months ago by mkoniecz (previous) (diff)

comment:3 by Woazboat, 14 months ago

Same thing also happens to me from time to time, but I think I have found a workaround that does not require restarting josm:

When keyboard input stops working, open up the settings window, navigate to "Advanced Preferences" and double click on any of the value entry fields as if you wanted to change it. Text input should start working again after that. No, I have no idea why that works.

Presumably any text input field like that where you have to double click to change it to edit mode would work, but the advanced settings window is easy to navigate to and has plenty of those fields.

Last edited 14 months ago by Woazboat (previous) (diff)

comment:4 by taylor.smock, 14 months ago

Keywords: linux added

Possible duplicate: #16746

I've encountered this before (several years back), but I didn't have a debug environment set up at the time.

I don't think we've changed anything related to text input in quite some time.

Best guess: something is "consuming" the KeyEvent before it reaches the text input field. Adding a breakpoint on InputEvent#consume (filter on this instanceof KeyEvent) will help debug the problem, but first someone with a dev environment will have to encounter it.

comment:5 by Woazboat, 14 months ago

Potential duplicate tickets: #22247, #22164, #16746, #13160, #12017, #11209, #8146

Similar but slightly different: #15788, #10347

comment:6 by Woazboat, 14 months ago

The big problem with trying to track down this bug is that it usually only randomly happens after hour long editing sessions. That makes reproducing it pretty hard.

comment:7 by taylor.smock, 14 months ago

Yep. I think the workflow would be starting JOSM attached to a debugger, edit until input stops working, then add the breakpoint. Still very hard to reproduce, since we don't know what actually causes it.

comment:8 by AntiCompositeNumber, 14 months ago

It seems that having more objects loaded will make the bug happen more frequently. I downloaded along https://www.openstreetmap.org/relation/12091974 and it happened almost every time I tried to add a stop. It seemed to only happen after opening a preset with the F3 menu, not when opening it from a dropdown or adding tags individually. The search bar in the F3 menu does work though. It's been a while since I've used a Java debugger, but I'll see what I can do.

in reply to:  7 ; comment:9 by AntiCompositeNumber, 14 months ago

Replying to taylor.smock:

Yep. I think the workflow would be starting JOSM attached to a debugger, edit until input stops working, then add the breakpoint. Still very hard to reproduce, since we don't know what actually causes it.

With the breakpoint in place, KeyEvents were firing as I would expect. I disabled the breakpoint, and edited until the problem occurred. I then re-enabled the breakpoint and pressed F3. Pressing enter had no effect (it would normally open the most recent preset) and the debugger did not break. Opening a preset menu with the mouse and trying to type in a box also did not have any effect and the debugger did not break. Clicking the Cancel button on either popup does fire two KeyEvents.

Unfortunately, I don't have enough experience with Java or JOSM to be able to debug further.

in reply to:  9 comment:10 by taylor.smock, 14 months ago

Replying to AntiCompositeNumber:

Unfortunately, I don't have enough experience with Java or JOSM to be able to debug further.

I hadn't expected you to do the debugging. But thanks for trying to do so anyway.

Pressing enter had no effect (it would normally open the most recent preset) and the debugger did not break. Opening a preset menu with the mouse and trying to type in a box also did not have any effect and the debugger did not break. Clicking the Cancel button on either popup does fire two KeyEvents.

With the information you gave, it sounds like Java might not be receiving the key events immediately. Do you see what key code the KeyEvents were for? KeyEvent.VK_ENTER == '\n' == 10 is what I would expect for the last one, with the first one being something else (whatever you typed).

If you don't know/don't remember, don't worry about it. I'll try to reproduce on a Raspberry Pi.

comment:11 by taylor.smock, 14 months ago

I've managed to reproduce, but it is making no sense to me. It is more like the text boxes are not accepting input at all (I cannot even select text in the text box).

Java is getting key events, so I'm going to have to trace the "standard" expected call tree and see where the non-working call tree fails.

EDIT: It looks like part of the problem is that the window isn't getting focus events.
EDIT2: Part of the problem appears to be due to KeyboardFocusManager not getting a request (and maybe not removing one -- TaggingPresetSearchDialog.instance was the last "focused" component both times I've reproduced and checked).

Last edited 13 months ago by taylor.smock (previous) (diff)

comment:12 by taylor.smock, 12 months ago

Ticket #22945 has been marked as a duplicate of this ticket.

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 AntiCompositeNumber.
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.