#21929 closed defect (fixed)
buildings_tools constantly creates new cursors causing XWayland to crash
Reported by: | anonymous | Owned by: | Upliner |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin buildings_tools | Version: | latest |
Keywords: | wayland | Cc: |
Description
JOSM: 18389
buildings_tools: 35916
The problem is caused by buildings_tools plugin in JOSM – it generates a new cursor for every mouse movement while over the JOSM drawing area and every new cursor causes a new open file in Wayland eventually causing it to run out of file descriptors and crash.
How to reproduce in Gnome Wayland session:
- Choose buildings_tools tool with "B".
- Move cursor over JOSM drawing area.
- See constant increase of open files in Gnome (Wayland):
watch -n 1 -d 'ls -l /proc/`pidof gnome-shell`/fd/ | wc -l'
. - Choose any other tool, e. g. with "W".
- Move cursor over JOSM drawing area and see no open file increase.
More details about this problem on Wayland side: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1306
Problem is probably caused by something in DrawBuildingAction.java updCursor():
private void updCursor() { if (!MainApplication.isDisplayingMapView()) return; if (!ctrl && (mousePos != null)) { Node n = MainApplication.getMap().mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable); if (n != null) { setCursor(cursorJoinNode); return; } else { Way w = MainApplication.getMap().mapView.getNearestWay(mousePos, OsmPrimitive::isSelectable); if (w != null && w.get("building") != null) { setCursor(cursorJoinWay); return; } } } if (customCursor != null && (!ctrl || isRectDrawing())) setCursor(customCursor); else setCursor(getCursor()); }
I tried to follow DevelopersGuide/DevelopingPlugins to debug this, but for some reason couldn't even checkout JOSM plugins repository over SVN (svn co https://josm.openstreetmap.de/osmsvn/applications/editors/josm
– nothing happens for hours) and did not find a git mirror of this repository...
Attachments (0)
Change History (4)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Other possible problem areas:
ParallelWayAction (core,Not a problem (tested)shift
+p
)
Depending upon when you tried to clone the JOSM plugins repository, the server may have been down. See https://lists.openstreetmap.org/pipermail/josm-dev/2022-March/008420.html .
But thank you for an explanation of the problem -- I've been meaning to debug what is happening (I've run into this at home), and I just never got around to it.