Modify

Opened 4 years ago

Closed 4 years ago

#20228 closed defect (fixed)

JOSM hangs when downloading children relations

Reported by: aceman Owned by: team
Priority: normal Milestone: 20.12
Component: Core Version: tested
Keywords: regression download relation children members Cc:

Description

Since JOSM 17329 when I try to "download all subrelations" in a relation and those relations have also sub relations, JOSM hangs. It does not use any CPU, but it also does not crash.
It hangs with displaing the dialog "Drawing the data set".
There are no messages in the console/terminal.
JOSM stops responding to any mouse clicks and the process needs to be killed externally.

Attachments (0)

Change History (30)

comment:1 by GerdP, 4 years ago

I just tried with r1673439 and it works as expected. Please attach a status report created before the download and tell us the id of the relation that you download.

comment:2 by GerdP, 4 years ago

Owner: changed from team to aceman
Status: newneedinfo

comment:3 by aceman, 4 years ago

I tried https://www.openstreetmap.org/relation/3305366 in the "sub relations" tab of the relation editor, clicking the "download all children relations" button. In the console (standard output), there is no GET command to the server trying to fetch any relation, while there are commands up to that point of clicking the button.

Status report:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-11-24 02:16:47 +0100 (Tue, 24 Nov 2020)
Revision:17345
Build-Date:2020-11-24 02:30:59
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17345 sk) Linux Slackel Linux 
Memory Usage: 260 MB / 8028 MB (115 MB allocated, but free)
Java version: 15.0.1+9-18, Oracle Corporation, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.nimbus.NimbusLookAndFeel
Screen: :0.0 1920×1200 (scaling 1,00×1,00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: sk.UTF-8

Plugins:
+ DirectDownload (35640)
+ FixAddresses (35640)
+ HouseNumberTaggingTool (35640)
+ OpeningHoursEditor (35640)
+ PolygonCutOut (v0.7)
+ apache-commons (35524)
+ apache-http (35589)
+ buildings_tools (35669)
+ ejml (35458)
+ freemapkapor (57)
+ geotools (35458)
+ graphview (35640)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ jna (35662)
+ jogl (1.2.3)
+ jts (35458)
+ log4j (35458)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35640)
+ todo (30306)
+ turnrestrictions (35640)
+ undelete (35640)
+ utilsplugin2 (35671)
+ wikipedia (1.1.4)
Last edited 4 years ago by Don-vip (previous) (diff)

comment:4 by GerdP, 4 years ago

I cannot reproduce, neither with tested version not with latest (r17405). You are using an untested version, but not latest. Please update first.
I tried this:

  1. start JOSM
  2. Ctrl+Shift+O to download object r3305366 without members or parents
  3. open the relation in relation editor and select tab "Child relations"
  4. click on "Download all children"

Works as expected within a second.

comment:5 by GerdP, 4 years ago

Resolution: invalid
Status: needinfoclosed

Please reopen if you can reproduce with tested or latest and provide details how to reproduce.
Edit: If you can reproduce, please try to start JOSM without plugins using --skip-plugins parameter. If that helps try to find out which plugin is causing this.

Last edited 4 years ago by GerdP (previous) (diff)

comment:6 by aceman, 4 years ago

True, I thought I am on latest tested, but was a few revisions past that.
Anyway, I tried your exact steps from comment 4, now with latest 17405 and can still reproduce the problem. Hangs at "Drawing dataset" dialog.

These are the server fetches seen in the JOSM log in the console (linux shell).
2020-12-13 17:26:03.591 INFO: GET https://api.openstreetmap.org/api/0.6/relations?relations=3305366 -> HTTP/1.1 200 (196 ms)
2020-12-13 17:26:03.844 INFO: GET https://api.openstreetmap.org/api/0.6/relation/3305366/full -> HTTP/1.1 200 (177 ms)
2020-12-13 17:26:04.090 INFO: GET https://api.openstreetmap.org/api/0.6/relation/3305366/relations -> HTTP/1.1 200 (132 ms)
2020-12-13 17:26:26.772 INFO: GET https://api.openstreetmap.org/api/0.6/relations?relations=3306019,3305361,3305365 -> HTTP/1.1 200 (133 ms)
2020-12-13 17:26:26.968 INFO: GET https://api.openstreetmap.org/api/0.6/relation/3305365/full -> HTTP/1.1 200 (151 ms)
2020-12-13 17:26:27.775 INFO: GET https://api.openstreetmap.org/api/0.6/relation/3305361/full -> HTTP/1.1 200 (757 ms)
2020-12-13 17:26:27.962 INFO: GET https://api.openstreetmap.org/api/0.6/relation/3306019/full -> HTTP/1.1 200 (149 ms)

It can be seen JOSM fetches the 3 child relations of that parent relation in question, but does not continue after that.

comment:7 by aceman, 4 years ago

Resolution: invalid
Status: closedreopened

Starting with --skip-plugins really does not load plugins, but does not help, JOSM still hangs.

comment:8 by aceman, 4 years ago

I'm using JDK-15.0.1 from https://jdk.java.net/15/, the 64bit linux build.

comment:9 by GerdP, 4 years ago

Your log shows that downloaded the relation with parents and children in step 1, but that doesn't matter. If I do the same still cannot reproduce the problem, so maybe it is related to the java version.

comment:10 by GerdP, 4 years ago

I tried now with

openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)

no problem on MS Windows, so I cannot help here. Maybe try with a clean environment to make sure that it is not caused by a preference setting.

Last edited 4 years ago by skyper (previous) (diff)

comment:11 by aceman, 4 years ago

OK, I tested JDK down to 11, but that didn't help.
But I tried older version of JOSM and found one that works.
It broke somewhere between 17085 (works) and 17329 (hangs). I don't have any build downloaded inbetween. I could bisect further if it is possible to download the JOSM revisions in that range.

comment:12 by GerdP, 4 years ago

Last edited 4 years ago by GerdP (previous) (diff)

comment:13 by skyper, 4 years ago

@aceman
Do you only have this problem with downloading objects? I sometimes have problems with all kinds of download actions but "normal" download dialog. E.g. reverting a big CS, downloading many incomplete members or downloading many objects of a big CS from changeset manager. Usually it is cased by time outs but not all the time.

"Drawing the dataset" could also be a problem of mappaint and the installed styles. Do you have any external styles installed?

comment:14 by aceman, 4 years ago

No, I have never seen the hang outside the child relation downloads.

I do use the "Lane and road attributes" style on top of the default one, but I also tested with a clean profile with no plugins or styles and the hang is there too.

in reply to:  12 comment:15 by aceman, 4 years ago

Replying to GerdP:

See https://josm.openstreetmap.de/download/
My guess would be r17202

Yes, good guess. From the downloads available there are only 17201 and 17218 around it.

17201 works, 17218 hangs.

comment:16 by Don-vip, 4 years ago

Keywords: regression added
Milestone: 20.12

comment:17 by Don-vip, 4 years ago

Keywords: download relation children members added

comment:18 by Don-vip, 4 years ago

Owner: changed from aceman to team
Status: reopenednew

comment:19 by aceman, 4 years ago

I have left it "drawing" for an hour and it still didn't finish, so it shouldn't be a case of taking too long, but it really hangs without using CPU. I also tried that in the Wireframe mode so styles shouldn't be the problem here.

comment:20 by aceman, 4 years ago

Looking at the suspected code at https://josm.openstreetmap.de/changeset/17202/josm , may JOSM be waiting for some async signal that isn't arriving? Maybe because it arrived before the checks as the machine is too fast? :)

comment:21 by GerdP, 4 years ago

I have no idea how this change can cause a hang. It was just the only change to the Download all children stuff. Can you try to compile JOSM after reverting this change?

comment:22 by aceman, 4 years ago

No, sorry, I can't build Java programs.

comment:23 by GerdP, 4 years ago

#20275 might be related.

comment:24 by GerdP, 4 years ago

OK, I can reproduce this with a clean installation like this:

  1. start JOSM
  2. Ctrl+Shift+O to download object r6342968 with parents and children
  3. In relation list, open the master route first, then the other one
  4. click on the window for the master route -> child relations tab -> "Download all children"

(no further action, no mouse move)
Josm freezes after downloading all children, lots of EDT violations are reported in the console window.

This doesn't happen when I change step 3 to open the master after the other relation.

Version 0, edited 4 years ago by GerdP (next)

comment:25 by GerdP, 4 years ago

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

comment:26 by GerdP, 4 years ago

I think r17206 is to blame. When I revert the change in MemberTableModel the hang disappears, but the EDT violations are still logged.

comment:27 by GerdP, 4 years ago

In 17423/josm:

see #20228: JOSM hangs when downloading children relations

  • partly revert r17206 (don't wait) , this should fix the hanging situation
  • register / unregister listeners to avoid EDT violations when relation editor doesn't show the "Tags and Members" dialog tab

comment:28 by GerdP, 4 years ago

I hope this fixes the problems and doesn't introduce new ones.
There are still a few glitches, e.g. the child browser is not properly updated when you download the relation members outside of the dialog, but I don't want to do too much here.

comment:29 by aceman, 4 years ago

Thank you, this fixes it for me.

Somehow, it isn't now easy to recursively download all the leaf child relations (in this 4-levels deep relation hierarchy), but that's a different issue.

Thanks

comment:30 by GerdP, 4 years ago

Resolution: fixed
Status: newclosed

OK, thanks for the quick feedback. The full recursive download was removed because it caused trouble with some admin boundaries.
You can use the Overpass API if you need this often.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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