Opened 5 years ago
Closed 5 years ago
#16875 closed defect (fixed)
Crash after using fix duplicated nodes + multiple undo
Reported by: | GerdP | Owned by: | Don-vip |
---|---|---|---|
Priority: | major | Milestone: | 18.10 |
Component: | Core | Version: | |
Keywords: | template_report undo regression command stack | Cc: |
Description
What steps will reproduce the problem?
- Start new Data Layer
- Draw a rectangular closed Way and tag it building=yes
- Press Ctrl+C to copy
- Press Ctrl+Alt+V (paste at source position)
- Press Esc
- Run Validator, this should report 4 errors: Building duplicated nodes (4)
- Click on Fix
- Press Ctrl+Z several times until this crash happens
What is the expected result?
No crash, an empty data layer
What happens instead?
Part of a way is still existing
Please provide any additional information below. Attach a screenshot if possible.
I've noticed similar crashes and incomplete undo actions while editing real data, now I was able to reproduce it with this rather simple set of actions.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2018-10-01 23:59:36 +0200 (Mon, 01 Oct 2018) Build-Date:2018-10-01 22:08:47 Revision:14289 Relative:URL: ^/trunk Identification: JOSM/1.5 (14289 en) Windows 10 64-Bit OS Build number: Windows 10 Home 1803 (17134) Memory Usage: 2187 MB / 5461 MB (1666 MB allocated, but free) Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1080 Maximum Screen Size: 1920x1080 Dataset consistency test: No problems found Plugins: + OpeningHoursEditor (34535) + apache-commons (34506) + buildings_tools (34572) + download_along (34503) + ejml (34389) + geotools (34513) + jts (34524) + measurement (34529) + merge-overlap (34664) + o5m (34405) + opendata (34675) + pbf (34576) + poly (34546) + reverter (34552) + undelete (34568) + utilsplugin2 (34506) Last errors/warnings: - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm> - E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html> - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm> - E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html> - E: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException: -1 - E: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException - E: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException - E: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (17) of main java.lang.ArrayIndexOutOfBoundsException
Attachments (1)
Change History (10)
by , 5 years ago
Attachment: | dupway.osm added |
---|
comment:2 by , 5 years ago
Keywords: | undo added |
---|---|
Milestone: | → 18.10 |
comment:3 by , 5 years ago
I tried older versions from https://josm.openstreetmap.de/download/Archiv/
r13722 seems to be OK
r13758 already shows this error.
Finally I found that this problem was introduced with r13729.
The problem seems to be that the undo action(s) are added to the command stack, but the corresponding command stack window is not updated. No idea where to fix that.
comment:4 by , 5 years ago
Keywords: | regression command stack added |
---|
comment:5 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 5 years ago
There is still something wrong here. Try this:
1) Open sample file dupway.osm + run validator
2) Select Building duplicated nodes (4) and click "Fix"
3) Press Ctrl+Z two times
4) Add a new node somewhere else
The new action from 4) is added to the command stack, but the previously "undoned" actions are not removed.
This seems not to depend on the fix action, it also happens during normal edits.
With r13722 I don't see this behaviour.
comment:8 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:9 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This is a different problem and less critical, I created #16911 because I won't release a 18.10 hotfix just for this.
It's getting worse:
With the attached file dupway.osm I see different results:
This reports 5 errors (one more for the duplicated way). Select the entry "Building duplicated nodes (4)" and click Fix button
followed by Ctrl+Z to Undo.
This directly leads to a crash report.
I can reproduce that with r14353. Console shows:
2018-10-22 15:16:03.925 SEVERE: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException: node has no children
java.lang.ArrayIndexOutOfBoundsException: node has no children