Modify ↓
Opened 7 years ago
Closed 7 years ago
#14486 closed defect (fixed)
JOSM crashed when fixing automatically problem in the route segment with 1 automatic fix
Reported by: | Polyglot | Owned by: | giackserva |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin pt_assistant | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Download public_transport:version=2 data for Bologna
- use route segment with 1 automatic fix
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-02-28 22:54:27 +0100 (Tue, 28 Feb 2017) Build-Date:2017-02-28 22:00:07 Revision:11642 Relative:URL: ^/trunk Identification: JOSM/1.5 (11642 en) Windows 7 64-Bit Memory Usage: 1133 MB / 2889 MB (772 MB allocated, but free) Java version: 1.8.0_111-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1600x900 Maximum Screen Size: 1600x900 Dataset consistency test: No problems found Plugins: + CustomizePublicTransportStop (0.3) + Mapillary (v1.4.0) + OpeningHoursEditor (33004) + PicLayer (33148) + RoadSigns (33088) + apache-commons (32994) + apache-http (32699) + buildings_tools (33004) + geochat (33088) + livegps (33138) + pt_assistant (33108) + reverter (33088) + scripting (30764) + surveyor (33011) + tag2link (33035) + terracer (33088) + todo (30000) + turnrestrictions (33088) + undelete (32699) + utilsplugin2 (33124) + wikipedia (33098) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/BENELUX&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1 Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/NumberedCycleNodeNetworks&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/NumberedWalkingNodeNetworks&zip=1 Last errors/warnings: - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - W: java.io.IOException: Attribution is not loaded yet - E: Handled by bug report queue: java.lang.NullPointerException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (20) of main java.lang.NullPointerException at org.openstreetmap.josm.plugins.pt_assistant.validation.SegmentChecker.fixError(SegmentChecker.java:804) at org.openstreetmap.josm.plugins.pt_assistant.validation.PTAssistantValidatorTest.fixError(PTAssistantValidatorTest.java:514) at org.openstreetmap.josm.data.validation.TestError.getFix(TestError.java:362) at org.openstreetmap.josm.gui.dialogs.ValidatorDialog$FixTask.fixError(ValidatorDialog.java:597) at org.openstreetmap.josm.gui.dialogs.ValidatorDialog$FixTask.realRun(ValidatorDialog.java:622) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:141) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Attachments (1)
Change History (5)
by , 7 years ago
Attachment: | PT Bologna.zip added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
[o33108] is not big. Check it without indentation issues svn diff -r33107:33108 -x -w
.
Anyway after a short look on the code I'd assume that the correct solution would be to store all information required for fixing in the TestError class itself instead of passing the test class pointer and trying to reextract them in fixError().
comment:3 by , 7 years ago
Owner: | changed from | to
---|
comment:4 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Hi,
I think the problem is that the support data structures used in SegmentChecker (correctSegments and wrongSegments) are cleared at the end of the test instead of being cleared at the beginning. This way during the error fixing, some data are missing and the plugin can't handle it.
I would override the startTest function and put SegmentChecker.reset() there.
My only doubt is that this used to be the way I described until this revision https://trac.openstreetmap.org/browser/subversion/applications/editors/josm/plugins/pt_assistant?rev=33108. It has then been changed introducing this bug as part of a bigger commit. Since I don't want to reintroduce an older bug when fixing this one, I wait for someone that has been working on this longer than me to tell me something.
Giacomo