Modify

Opened 5 years ago

Closed 4 years ago

#10668 closed defect (fixed)

ClassCastException while merging ways

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Plugin merge-overlap Version:
Keywords: template_report Cc:

Description

Was merging two ways (227547615 and 227547668) and got this.

Build-Date: 2014-10-20 23:35:18
Revision: 7639
Is-Local-Build: true

Identification: JOSM/1.5 (7639 SVN pt_BR) Linux Debian GNU/Linux testing (jessie)
Memory Usage: 6320 MB / 8158 MB (1085 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u65-2.5.2-4
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Dataset consistency test:
[WARN - ZERO NODES] Way {Way id=243989221 version=3 VT> nodes=[]} has zero nodes


Plugins:
- Create_grid_of_ways (30762)
- OpeningHoursEditor (30737)
- PicLayer (30762)
- SimplifyArea (30762)
- buildings_tools (30762)
- contourmerge (1012)
- download_along (30762)
- editgpx (30737)
- geotools (30762)
- importvec (30762)
- jts (30762)
- log4j (30762)
- measurement (30737)
- merge-overlap (30762)
- notes (v0.9.4)
- opendata (30762)
- pbf (30762)
- pdfimport (30737)
- poly (30738)
- reverter (30737)
- scripting (30700)
- todo (29154)
- turnrestrictions (30762)
- undelete (30762)
- utilsplugin2 (30762)

Last errors/warnings:
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Boundaries@40457344, code=601]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Boundaries@40457344, code=601]
- E: java.lang.NullPointerException
- E: java.lang.NullPointerException
- E: java.lang.ClassCastException: mergeoverlap.hack.MyRelationMemberConflictResolverModel cannot be cast to org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictResolverModel

java.lang.ClassCastException: mergeoverlap.hack.MyRelationMemberConflictResolverModel cannot be cast to org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictResolverModel
	at org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictResolverColumnModel.setColors(RelationMemberConflictResolverColumnModel.java:41)
	at org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictResolverColumnModel.access$000(RelationMemberConflictResolverColumnModel.java:18)
	at org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictResolverColumnModel$1.getTableCellRendererComponent(RelationMemberConflictResolverColumnModel.java:26)
	at javax.swing.JTable.prepareRenderer(JTable.java:5736)
	at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2108)
	at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2010)
	at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1806)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at javax.swing.JComponent.paintComponent(JComponent.java:769)
	at javax.swing.JComponent.paint(JComponent.java:1045)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JViewport.paint(JViewport.java:731)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1529)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1452)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
	at java.awt.Container.paint(Container.java:1967)
	at java.awt.Window.paint(Window.java:3877)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:819)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
	at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
...<snip>...

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by Don-vip

In 7661/josm:

see #10668 - code refactoring to avoid hacks in merge-overlap plugin

comment:2 Changed 5 years ago by Don-vip

Resolution: fixed
Status: newclosed

Fixed in [o30766:30767].

comment:3 Changed 5 years ago by naoliv

Resolution: fixed
Status: closedreopened

Today while trying to merge ways 163888615 and 267075611 I saw this problem again:

ERRO: java.lang.ClassCastException: org.openstreetmap.josm.data.osm.Node cannot be cast to org.openstreetmap.josm.data.osm.Way
java.lang.ClassCastException: org.openstreetmap.josm.data.osm.Node cannot be cast to org.openstreetmap.josm.data.osm.Way
	at org.openstreetmap.josm.data.osm.RelationMember.getWay(RelationMember.java:103)
	at mergeoverlap.hack.MyRelationMemberConflictResolverModel.populate(MyRelationMemberConflictResolverModel.java:47)
	at mergeoverlap.hack.MyRelationMemberConflictResolverModel.populate(MyRelationMemberConflictResolverModel.java:72)
	at mergeoverlap.MergeOverlapAction.combineWaysWorker(MergeOverlapAction.java:555)
	at mergeoverlap.MergeOverlapAction.actionPerformed(MergeOverlapAction.java:214)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6516)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
	at java.awt.Component.processEvent(Component.java:6281)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4872)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:708)
	at java.awt.EventQueue$4.run(EventQueue.java:706)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

JOSM:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-11-13 02:34:10
Last Changed Author: Klumbumbus
Revision: 7723
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-11-12 22:45:27 +0100 (Wed, 12 Nov 2014)
Last Changed Rev: 7723

Identification: JOSM/1.5 (7723 pt_BR) Linux Debian GNU/Linux testing (jessie)
Memory Usage: 2377 MB / 8158 MB (690 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u71-2.5.3-1+b1
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
- Create_grid_of_ways (30762)
- ImageryCache (30738)
- OpeningHoursEditor (30737)
- PicLayer (30762)
- SimplifyArea (30791)
- buildings_tools (30762)
- contourmerge (1012)
- download_along (30762)
- editgpx (30737)
- geotools (30762)
- importvec (30762)
- jts (30762)
- log4j (30762)
- measurement (30737)
- merge-overlap (30784)
- notes (v0.9.4)
- opendata (30796)
- pbf (30762)
- pdfimport (30737)
- poly (30738)
- reverter (30737)
- scripting (30701)
- todo (29154)
- turnrestrictions (30762)
- undelete (30762)
- utilsplugin2 (30762)

Last errors/warnings:
- W: Mappaint style "standard" (Maxspeed) icon "maxspeed_icon.svg" not found.
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways@3a00343e, code=601]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways@3a00343e, code=601]
- W: org.openstreetmap.josm.plugins.ohe.parser.ParseException: Encountered "<EOF>" at line 1, column 2.
- E: java.lang.ClassCastException: org.openstreetmap.josm.data.osm.Node cannot be cast to org.openstreetmap.josm.data.osm.Way

comment:4 Changed 4 years ago by Don-vip

Resolution: fixed
Status: reopenedclosed

not exactly the same problem, let's solve it with #11092

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.