﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
21179	"Sporadic crashes right after download - Failed to load module ""topmenu-gtk-module"" - BadWindow (invalid Window parameter)"	stanton	team	"==== What steps will reproduce the problem?
1. Start JOSM
2. Download from Overpass API with the following query (all milestones in Poland; this takes some time)

{{{
[out:xml][timeout:90];
area[""admin_level""=2][""name:en""=""Poland""]->.searchArea;
(
  node[""highway""=""milestone""](area.searchArea);
);
(._;>;);
out meta;
}}}


==== What is the expected result?

Data is downloaded and rendered; then I can start editing

==== What happens instead?

Sometimes this works as expected. Other times JOSM starts rendering (I still see the map view with the milestones very briefly), then it crashes.

==== Please provide any additional information below. Attach a screenshot if possible.

Right now this behavior is fairly reproducible, i.e. the above steps crashed JOSM with every single of multiple tries. I did eventually manage to do a full download (directly from OSM) of a small area, then download from Overpass into the existing data layer: this time JOSM did not crash.

Running JOSM from the command line (`java -Djosm.restart=true -Djava.net.useSystemProxies=true --add-modules java.scripting,java.sql -jar /usr/share/josm/josm.jar`) and reproducing the crash tells me this is not an unhandled Java exception but a Gtk error:

{{{
Gtk-Message: 17:05:53.974: Failed to load module ""topmenu-gtk-module""
The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 20887 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
}}}

JOSM debug info (from a fresh JOSM instance, started from the desktio GUI):

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-07-12 02:41:41 +0200 (Mon, 12 Jul 2021)
Revision:18004
Build-Date:2021-07-12 00:42:49
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18004 en) Linux Ubuntu 20.04.2 LTS
Memory Usage: 754 MB / 3978 MB (294 MB allocated, but free)
Java version: 11.0.11+9-Ubuntu-0ubuntu2.20.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1600×900 (scaling 1.00×1.00) :0.1 1600×900 (scaling 1.00×1.00)
Maximum Screen Size: 1600×900
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: MATE
Java package: openjdk-11-jre:amd64-11.0.11+9-0ubuntu2~20.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
libcommons-compress-java: libcommons-compress-java:all-1.19-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20200323-1build1~ubuntu20.04.1
VM arguments: [--add-modules=java.scripting,java.sql, -Djosm.restart=true, -Djava.net.useSystemProxies=true]

Plugins:
+ DirectUpload (35640)
+ InfoMode (35543)
+ KartaView (374)
+ Mapillary (2.0.0-alpha.28-dirty)
+ MicrosoftStreetside (35779)
+ PicLayer (1.0.1)
+ SimplifyArea (35640)
+ apache-commons (35524)
+ apache-http (35589)
+ cadastre-fr (35797)
+ ejml (35458)
+ geotools (35458)
+ javafx-unixoid (35655)
+ jna (35662)
+ jts (35458)
+ measurement (35640)
+ merge-overlap (35640)
+ photo_geotagging (35783)
+ print (35640)
+ reverter (35732)
+ todo (30306)
+ turnrestrictions (35640)
+ undelete (35640)
+ utilsplugin2 (35792)

Last errors/warnings:
- 00004.186 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-54.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
- 00004.191 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-57.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
- 00004.195 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-56.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
- 00004.199 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-58.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
- 00004.264 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-56.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
- 00004.267 E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-57.so: libgstreamer-lite.so: cannot open shared object file: No such file or directory
}}}
"	defect	new	normal		Core			template_report linux gtk	stanton
