#15332 closed defect (fixed)
IndexOutOfBoundsException in ConflictCollection.get()
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | major | Milestone: | 18.01 |
Component: | Core | Version: | |
Keywords: | template_report conflict | Cc: |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-09-02 14:47:18 +0200 (Sat, 02 Sep 2017) Build-Date:2017-09-02 20:53:16 Revision:12712 Relative:URL: ^/trunk Identification: JOSM/1.5 (12712 de) Windows 10 64-Bit OS Build number: Windows 10 Home 1703 (15063) Memory Usage: 247 MB / 247 MB (74 MB allocated, but free) Java version: 1.8.0_141-b15, Oracle Corporation, Java HotSpot(TM) Client VM Screen: \Display0 1024x768, \Display1 1920x1080 Maximum Screen Size: 1920x1080 Plugins: + PicLayer (33385) + RoadSigns (33579) + turnrestrictions (33537) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1 + https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/DE.zip + C:\Program Files (x86)\JOSM_erg\Lübeck_Rad.xml Last errors/warnings: - E: Error header: Precondition failed: Node 3127700541 is still used by ways 307575238,307575238. - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Node 3127700541 is still used by ways 307575238,307575238.> - E: Objekt wird noch benutzt - <html>Löschen des <strong>Punktes 3127700541</strong> <strong fehlgeschlagen</strong>. Er wird von Linie 307575238 weiterhin verwendet.<br>Bitte die Linie herunterladen, die Referenz auf den Punkt entfernen und erneut hochladen.<br><br>Zum Herunterladen <strong>Bereinigen von Konflikten vorbereiten</strong> anklicken.<br>Falls notwendig werden Konflikte erstellt, welche im Dialog zur Konfliktlösung behoben werden können.</html> - E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted node referenced: {Way id=313024382 version=1 MVT nodes=[{Node id=1435548438 version=1 V lat=49.4066083,lon=10.7724607}, {Node id=1435548440 version=1 V lat=49.4066845,lon=10.7718486}, {Node id=757227342 version=2 V lat=49.4067499,lon=10.7718327}, {Node id=757228581 version=2 VD lat=49.4067431,lon=10.7724129}]} - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 - E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (17) of main java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.openstreetmap.josm.data.conflict.ConflictCollection.get(ConflictCollection.java:274) at org.openstreetmap.josm.gui.dialogs.ConflictDialog.getSelectedConflict(ConflictDialog.java:307) at org.openstreetmap.josm.actions.AutoScaleAction.updateEnabledState(AutoScaleAction.java:364) at org.openstreetmap.josm.actions.AutoScaleAction$ZoomChangeAdapter.zoomChanged(AutoScaleAction.java:406) at org.openstreetmap.josm.gui.NavigatableComponent.fireZoomChanged(NavigatableComponent.java:140) at org.openstreetmap.josm.gui.NavigatableComponent.zoomNoUndoTo(NavigatableComponent.java:677) at org.openstreetmap.josm.gui.NavigatableComponent.zoomTo(NavigatableComponent.java:657) at org.openstreetmap.josm.gui.NavigatableComponent.zoomTo(NavigatableComponent.java:577) at org.openstreetmap.josm.gui.NavigatableComponent.zoomToFactor(NavigatableComponent.java:741) at org.openstreetmap.josm.gui.NavigatableComponent.zoomManyTimes(NavigatableComponent.java:733) at org.openstreetmap.josm.gui.MapMover.mouseWheelMoved(MapMover.java:248) at java.awt.Component.processMouseWheelEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Attachments (1)
Change History (28)
comment:1 by , 7 years ago
Summary: | Ich weiss es nicht. Der Fehler bezieht sich auf Daten die ich nicht bearbeitet habe. I'm sorry, but I don't know. I didn't work with the data of which the message belongs to → IndexOutOfBoundsException in ConflictCollection.get() |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Hallo Gerd,
es ist vollkommen in Ordnung, wenn Du auf Deutsch schreibst. Hier sind auch ein paar Leute unterwegs, die Deutsch verstehen bzw. die für die anderen im Zweifelsfall übersetzen können.
Der Fehler ist weder als behoben gekennzeichnet, noch haben wir die Lösung des Problems aufgegeben. Es wurde nur der Titel dieses Tickets angepasst, um eine knappe Beschreibung des Fehlers zu liefern, damit sich möglichst schnell jemand findet, der sich darum kümmern kann.
Die alte Beschreibung ist nicht verloren, oben kannst du sie noch sehen.
Wir können nur mit dem arbeiten, was du uns in deiner Fehlermeldung an Informationen zur Verfügung stellst. Deshalb habe ich die entscheidende Stelle aus dem StackTrace als Titel gewählt, da das vermutlich die Stelle im Quellcode ist, die den Fehler ausgelöst hat.
Für mich sieht es so aus, als hättest du den Knoten 3127700541 löschen wollen, der aber noch Teil von zwei Wegen 307575238 und 307575238 ist. Anschließend hat sich wohl ein Dialog zum Lösen des Problems geöffnet, oder? Und in diesem Dialog steckt wohl ein Programmierfehler, an dessen Lösung nun hier in diesem Ticket gearbeitet werden sollte.
Stimmt das soweit, bzw. gibt es noch mehr, was dir in dem Moment aufgefallen ist, was vielleicht bei der Behebung helfen könnte?
Es gibt keinen Grund, hier SO EINEN TON anzuschlagen, wenn Du Hilfe benötigst, sollst du sie bekommen. Dass Du aufgebracht ist, weil du durch den Fehler im Mappen gestört wurdest, ist verständlich. Nur die meisten, wenn nicht gar alle, die hier mitarbeiten, tun das in ihrer Freizeit und geben ihr Bestes, damit solche Fehler nicht passieren, vermeiden lassen sich diese Fehler nur leider nie. Da verstehe ich nicht, warum Du dich nach nicht einmal zwei Tagen über den Umgang mit deinem Ticket beschwerst. Wenn du DAS auch beherrschst, darfst Du dich gerne auch an der Weiterentwicklung beteiligen!
Mit freundlichen Grüßen und hoffentlich auf gute Zusammenarbeit!
P.S.: Wie du in http://overpass-api.de/achavi/?changeset=52204773 siehst, können sich auch Änderungen in Grosshabersdorf auch auf Oberreichenbach auswirken. Vor allem lange Wege oder Relationen können eine große Ausdehnung haben. Sind die Daten auf http://osm.org verschwunden, oder waren sie nur im JOSM weg?
comment:4 by , 7 years ago
Kann es zufällig sein, dass Du gerade an Änderungssatz 52205148 (achavi) gearbeitet hattest, als diese Fehlermeldung aufgetaucht ist?
Habe gerade gesehen, dass die beiden Wege aus der Fehlermeldung identisch sind und der bemängelte Knoten immernoch Teil des Weges ist.
comment:5 by , 7 years ago
The issue is caused by https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java?rev=12891#L304 where in this case an index of 1 was calculated, which when passed to conflicts.get()
throws this IndexOutOfBoundsException
, because the size of the collection `conflicts` was at that time only 1.
Interesting is, that the error message before noted, that "Node 3127700541 is still used by ways 307575238,307575238" and thus could not be deleted (note that both mentioned ways have the same ID i.e. they are identical).
comment:6 by , 7 years ago
Hi
Englisch. Lesen kann ich und für eine allgemeine Unterhaltung taugt's auch, aber Fachliches wird eben schwierig.
Als ich das letzte Mal ein Ticket eröffnete wurde ich angepampt doch gefälligst in Englisch zu schreiben. Deshalb die "Voraberklärung".
Als Ergebnis der erten Rückmeldung zu diesem Ticket habe ich eben gesehen, dass die Hälfte der von mir erstellten Gebäude in Oberreichenbach verschwunden sind (die Ortschaft war praktisch komplett) und war einfach "not amused". Also kein Mecker über die Geschwindigkeit oder sonst was sondern "lediglich" Unverständnis, dass auf einen Fehler mit dem ich nichts zu tun habe (meine ich zumindest), den ich per Knopfdruck weitergemeldet habe, ein "Haufen" Daten verschwindet.
Alles nicht so schlimm, kann man ja noch mal machen. Genial wäre dann eben z.B. ein Hinweis "sorry, ging nicht anders" (gerne auch auf Englisch oder Französisch :-)).
Vielleicht hat auch das etwas damit zu tun.
Erstellt man eine Reihe neuer Gebäude durch Kopieren und editieren eines vorhandenen (Ctrl+D) und will dann einen Umriss durch das Setzen mehrerer Punkte erstellen, so werden zwar Punkte gesetzt aber nicht mehr verbunden. Dagegen hilft nur speichern, JOSM runterfahren und neu starten.
Nein, dort wollte ich nichts tun. Da wurde ich sozusagen wider Willen hingesprungen und wusste gar nicht was das soll.
Kann es zufällig sein, dass Du gerade an Änderungssatz 52205148 (achavi) <<<
Ja und nein.
Ich habe die Umrisse von "farmland" korrigiert und innerhalb des Naturschutzgebietes
bei Oberreichenbach (49.4359116/10.752998) entfernt weil NSG und Acker einander in diesem Fall
ausschliessen und dort auch den Verlauf von "forest" korrigiert.
Nachdem ich nicht jede Einzeländerung speichere kann ich nicht genau
nachvollziehen wann/wodurch der Fehler auftrat.
Jedenfalls kam die Meldung "das ist ein Programmierfehler" beim
Speichern hoch.
Beim ersten Mal -gebe ich zu- habe ich das einfach ignoriert. Danach war
der Fehler hartnäckig da und liess sich nicht wegdrücken.
Weder "die betroffene Relation "forest" noch "farmland" tangieren
Grosshabersdorf.
Hier hatte ich angeblich irgendetwas geändert, konnte dies aber nicht
nachvollziehen.
Danke für die Mühe
gerd
comment:7 by , 7 years ago
Nachschlag
Sollte ich mich unabsichtlich im Ton vergriffen habe tut mit das leid
comment:12 by , 7 years ago
Keywords: | conflict added |
---|---|
Priority: | normal → major |
comment:16 by , 7 years ago
Sind mittlerweile die Schritte ermittelt worden, um diesen Fehler reproduzierbar auszulösen?
EN: Have the steps to reproduce this bug been worked out in the meantime?
comment:17 by , 7 years ago
Von mir nicht.
Aber der Hinweis den ich gab, dass, wenn man mehrere/viele neue Gebäude "erstellt" hat ( mehr als ~ 300 hochzuladende Objekte) es nicht mehr möglich ist weitere verbundene Objekte=Linien zu zeichnen weil nur noch Punkte erstellt werden ist offenbar bearbeitet. Das Problem tritt nicht mehr auf.
comment:18 by , 7 years ago
Please use English on the bugtracker, all this discussion does not help me.
follow-up: 22 comment:19 by , 7 years ago
I'll look into this, it seems the user(s) who reported this bug isn't/aren't very fluent in English (at least in writing in English). It was also expressed that there were unpleasant experiences in the past with tickets which were written in German because the issue was too complicated, so they couldn't express it in English.
I think for people who can't express an issue in English, it should be acccepted that they can post in their language. At least for German there are probably several JOSM developers who understand German and could translate or even investigate it themselves.
The essence of comment:17 is more or less: I didn't figure out steps to reproduce. But the issue I described earlier has been solved. That issue was that when I drew very many buildings (more than 300 objects) only nodes were created without the ways connecting these nodes.
comment:20 by , 7 years ago
OK thanks. It may be a regression from r12672 as we have a lot of report for 4/5 months now.
comment:21 by , 7 years ago
Milestone: | → 18.01 |
---|
comment:22 by , 7 years ago
Replying to floscher:
I think for people who can't express an issue in English, it should be acccepted that they can post in their language. At least for German there are probably several JOSM developers who understand German and could translate or even investigate it themselves.
We accept reports in other languages (as you can see), nevertheless the only common language for all developers is English, so the reminders to please use English are logical.
follow-up: 25 comment:23 by , 7 years ago
Alright, here we go with steps to consistently reproduce this issue:
IMPORTANT: Make sure you configure JOSM to upload to api06.dev.openstreetmap.org before following these steps!
- Open the file
reproduce15332.osm
(attached to this ticket) in JOSM. A closed way consisting of 12 nodes should show. I changed the position of all 12 nodes on the dev-server since (see https://api06.dev.openstreetmap.org/changeset/110617). - Move a few of these 12 nodes. Click "Upload".
- Make sure, you are really uploading to api06.dev.openstreetmap.org and not the production database. Then click "continue".
- Enter some changeset comment and source.Click "Upload changes".
- A message "Conflicts detected" should appear. Click "Synchronize entire dataset". Another dialog "Conflicts detected" appears, click "OK". And one more dialog "Deleted or moved objects" should appear, click "Ignore".
The next steps are the ones that cause the exception:
- In the "Conflicts" toggle dialog, select the last node. Click "Resolve".
- Resolve the conflict somehow (either "keep their coordinates" or "keep my coordinates"). Click "Apply Resolution".
- Now zoom the MapView (either with the mouse wheel or +/- keys). Boom! The exception should be triggered.
by , 7 years ago
Attachment: | reproduce15332.osm added |
---|
Make sure to read the instructions explaining how to use this file: https://josm.openstreetmap.de/ticket/15332#comment:23
comment:24 by , 7 years ago
In the class `ConflictDialog` there's the field `conflicts` containing the conflicts and the field `lstConflicts` containing the JList displaying these conflicts.
When the last conflict in that collection is resolved, it stays selected in the JList. When zooming, at some point the selected conflict is queried.
That's done by getting the selected index in the JList, which is still the index of the already resolved conflict.
Then the conflict at that index would normally be returned. But that index has just been removed from the field `conflicts` → IndexOutOfBounds
comment:25 by , 7 years ago
Replying to floscher:
In the "Conflicts" toggle dialog, select the last node. Click "Resolve".
Easier steps to reproduce the bug without upload and external:
- Download one object. Try Ctrl+Shift+O 103 for a simple way.
- Move the object. This make all nodes dirty.
- Download the same object into a new layer.
- Move the object to a different position.
- Merge the layers. This gives a "There were 4 conflicts detected" message. Zooming is still OK. You can even resolve the first conflicts.
- Now resolve the last conflict on the list. This leaves some nodes in a conflict state and provokes the bug.
- Zoom. This repaint throws the exception. Typing TAB will do it too.
You can: Ignore this error. Resolve the remaining conflicts. This makes the exception on repaint going away.
Sorry, my english isn't good enough
Jetzt sind die Gebäudedaten eines halben Ortes (Oberreichenbach) verschwunden. Die seltsame Fehlermeldung bezog sich auf Daten eines 5 km entfernten Ortes (Grosshabersdorf)!
Wenn DAS eine Fehlerbehebung ist so beherrsche ich das auch.
mfg gerd