#9417 closed defect (fixed)
Validator tests are initialized twice
Reported by: | simon04 | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 13.12 |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
- Apply mini patch
-
src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
diff --git a/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java b/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java index 297d81d..8fb8e90 100644
a b public class DeprecatedTags extends Test { 36 36 */ 37 37 public DeprecatedTags() { 38 38 super(tr("Deprecated Tags"), tr("Checks and corrects deprecated tags.")); 39 new RuntimeException().printStackTrace(); 39 40 checks.add(new DeprecationCheck(2101). 40 41 testAndRemove("barrier", "wire_fence"). 41 42 add("barrier", "fence").
-
- Start JOSM, create new data layer, press validate (in validator dialog on the right)
Notice:
java.lang.RuntimeException at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at java.lang.Class.newInstance(Class.java:433) at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209) at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242) at org.openstreetmap.josm.data.validation.OsmValidator.<init>(OsmValidator.java:126) at org.openstreetmap.josm.Main$2.call(Main.java:447) at org.openstreetmap.josm.Main$2.call(Main.java:434) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) WARNING: Cannot start remotecontrol server on port 8111: Address already in use INFO: Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console java.lang.RuntimeException at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at java.lang.Class.newInstance(Class.java:433) at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209) at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242) at org.openstreetmap.josm.data.validation.OsmValidator.getEnabledTests(OsmValidator.java:246) at org.openstreetmap.josm.actions.ValidateAction.doValidate(ValidateAction.java:72) at org.openstreetmap.josm.actions.ValidateAction.actionPerformed(ValidateAction.java:53) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6527) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6292) at java.awt.Container.processEvent(Container.java:2235) at java.awt.Component.dispatchEventImpl(Component.java:4883) at java.awt.Container.dispatchEventImpl(Container.java:2293) at java.awt.Component.dispatchEvent(Component.java:4705) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4877) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2279) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4705) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) INFO: Test 'Duplicated relations' completed in 0 ms INFO: Test 'Similarly named ways' completed in 0 ms INFO: Test 'Opening hours syntax' completed in 0 ms INFO: Test 'Crossing ways.' completed in 0 ms INFO: Test 'Tag checker' completed in 0 ms INFO: Test 'Self-intersecting ways' completed in 0 ms INFO: Test 'Deprecated Tags' completed in 0 ms INFO: Test 'Addresses' completed in 0 ms INFO: Test 'Highways' completed in 0 ms INFO: Test 'Power lines' completed in 0 ms INFO: Test 'Way connected to Area' completed in 0 ms INFO: Test 'Multipolygon' completed in 1 ms java.lang.RuntimeException at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at java.lang.Class.newInstance(Class.java:433) at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209) at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242) at org.openstreetmap.josm.data.validation.OsmValidator.getEnabledTests(OsmValidator.java:246) at org.openstreetmap.josm.data.validation.tests.MultipolygonTest.startTest(MultipolygonTest.java:75) at org.openstreetmap.josm.actions.ValidateAction$ValidationTask.realRun(ValidateAction.java:170) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) INFO: Test 'Duplicated nodes' completed in 1 ms INFO: Test 'Unconnected ways' completed in 0 ms INFO: Test 'Overlapping ways' completed in 0 ms INFO: Test 'Building inside building' completed in 1 ms INFO: Test 'Wrongly Ordered Ways' completed in 0 ms INFO: Test 'Barriers and entrances' completed in 0 ms INFO: Test 'Overlapping Areas' completed in 1 ms INFO: Test 'Nodes with same name' completed in 0 ms INFO: Test 'Unclosed Ways' completed in 0 ms INFO: Test 'Coastlines' completed in 0 ms INFO: Test 'Duplicated way nodes' completed in 0 ms INFO: Test 'Duplicated ways' completed in 1 ms INFO: Test 'Untagged and unconnected nodes' completed in 0 ms INFO: Test 'Missing name:* translation' completed in 0 ms INFO: Test 'Nodes duplicating way tags' completed in 0 ms INFO: Test 'Turnrestrictions' completed in 0 ms INFO: Test 'Relation checker' completed in 0 ms INFO: Test 'Untagged, empty and one node ways' completed in 0 ms
Tested w/ new JOSM profile, this is the status report:
Revision: 6470 Is-Local-Build: true Build-Date: 2013-12-10 23:47:53 Identification: JOSM/1.5 (6470 SVN en_GB) Linux Arch Linux Memory Usage: 65 MB / 3504 MB (21 MB allocated, but free) Java version: 1.8.0-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-Djosm.home=/tmp/.josm, -Didea.launcher.port=7536, -Didea.launcher.bin.path=/usr/share/intellijidea-ce/bin, -Dfile.encoding=UTF-8] Program arguments: [--set=expert=true, --set=remotecontrol.enabled=true, --set=debug.edt-checker.enable=true] Dataset consistency test: No problems found
Attachments (0)
Change History (8)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Good night for now. I might continue the investigation tomorrow evening (unless the issue is resolved) :-).
comment:3 by , 11 years ago
Priority: | critical → major |
---|
Same for me. I think the map built by getAllTestsMap() should be cached into a static field but I'm too tired right now, I would only add some errors before the nightly build :) The code looks not a regression but a non-optimal design in place for years, I don't think this is so critical (but should be fixed before next tested)
comment:4 by , 11 years ago
Component: | Core → Core validator |
---|
comment:5 by , 11 years ago
Summary: | Validator tests are initialized trice → Validator tests are initialized twice |
---|
Could this be the reason for #4914 ?
comment:7 by , 11 years ago
Milestone: | → 13.12 (6502) |
---|
Confirmed with 7u45.