#20578 closed defect (fixed)
JOSM is out of memory - While adding a local xml preset
Reported by: | HeinerSchaefer | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 21.03 |
Component: | Core | Version: | |
Keywords: | performance preset reference loop out of memory | Cc: | simon04 |
Description
I built a preset to edit trees and tree rows in OSM.
It's working fine so far.
The I've done some changes and got the following error message:
JOSM is out of memory. Strange things may happen. ...
I started trouble shooting by deleting blocks.
The original preset has more than 2000 lines.
Now I have a preset with 81 lines and the error.
And I don't know why!
This issue happens on two installations, one Ubuntu, one Debian.
JOSM Version: 17428
Java-Version 11.0.10
Attachments (4)
Change History (16)
by , 4 years ago
Attachment: | JOSM-Preset_TreeRows-short_MemError.xml added |
---|
by , 4 years ago
Attachment: | JOSM-Preset_Trees_only.xml added |
---|
Much longer preset, not for tree rows, but for trees. No error here.
comment:1 by , 4 years ago
This part looks like a recursive definition. tree-row-keys -> tree-row-keys
<chunk id="tree-row-keys"> <reference ref="tree-row-keys" /> <text key="name" text="Name" /> <text key="height" text="Height (meters)" /> <text key="start_date" text="Start date" /> </chunk>
Not sure if that's correct but it might trigger such a memory problem.
comment:2 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is the fixed part:
<chunk id="tree-row-keys"> <key key="natural" value="tree_row" /> <text key="name" text="Name" /> <text key="height" text="Height (meters)" /> <text key="start_date" text="Start date" /> </chunk>
This chunk was called recursive.
Copy-Paste-Problem!
comment:3 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I think it would be good if JOSM would recognize this error
comment:5 by , 4 years ago
Keywords: | performance preset reference loop out of memory added |
---|
comment:6 by , 4 years ago
+1, OK, with a speaking error message this should really help. Closed too fast, sorry.
by , 4 years ago
Attachment: | error-popup.PNG added |
---|
comment:8 by , 4 years ago
Cc: | added |
---|
comment:9 by , 4 years ago
The default presets never reach a stack size of more than 5 so I guess a threshold of 100 is a reasonable value. I assume it is possible to define more complex loops where a refers to b and b refers to c and c refers to a (similar to relations in OSM), so a perfect solution would show all elements that form the recursive dependency loop, but this would require much more code.
comment:10 by , 4 years ago
I like the simple solution from attachment:20578.patch
This is the first time an error w.r.t. recursive chunks has been reported since its introduction in r6558, so we probably don't super advanced error handing.
comment:12 by , 4 years ago
Milestone: | → 21.03 |
---|
Very short version of the preset. Memory Error should come up.