Modify

Opened 3 years ago

Closed 3 years ago

#5153 closed defect (fixed)

Exception when fixing duplicate ways in validator

Reported by: bilbo Owned by: bilbo
Priority: normal Component: Core validator
Version: latest Keywords:
Cc:

Description

I clicked on "duplicate ways" in validator and pressed "fix". This exception popped up:

Build-Date: 2010-06-17 17:08:17
Revision: 3334
Is-Local-Build: true

Identification: JOSM/1.5 (3334 SVN en)
Memory Usage: 215 MB / 533 MB (61 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: buildings_tools (21706)
Plugin: graphview (21706)
Plugin: measurement (21706)
Plugin: multipoly (21706)
Plugin: openstreetbugs (21706)
Plugin: remotecontrol (21706)
Plugin: reverter (21745)
Plugin: terracer2 (${version.entry.commit.revision})
Plugin: tracer (20251)
Plugin: undelete (21186)
Plugin: validator (21667)
Plugin: wmsplugin (21667)

java.lang.NullPointerException
	at javax.swing.BufferStrategyPaintManager.flushAccumulatedRegion(BufferStrategyPaintManager.java:399)
	at javax.swing.BufferStrategyPaintManager.copyArea(BufferStrategyPaintManager.java:327)
	at javax.swing.RepaintManager.copyArea(RepaintManager.java:1239)
	at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1604)
	at javax.swing.JViewport.windowBlitPaint(JViewport.java:1573)
	at javax.swing.JViewport.setViewPosition(JViewport.java:1118)
	at javax.swing.JViewport.scrollRectToVisible(JViewport.java:415)
	at javax.swing.JComponent.scrollRectToVisible(JComponent.java:3065)
	at javax.swing.JComponent.scrollRectToVisible(JComponent.java:3065)
	at javax.swing.JTree.scrollPathToVisible(JTree.java:2095)
	at javax.swing.JTree.scrollRowToVisible(JTree.java:2113)
	at org.openstreetmap.josm.gui.dialogs.CommandStackDialog.buildTrees(CommandStackDialog.java:246)
	at org.openstreetmap.josm.gui.dialogs.CommandStackDialog.commandChanged(CommandStackDialog.java:306)
	at org.openstreetmap.josm.data.UndoRedoHandler.fireCommandsChanged(UndoRedoHandler.java:121)
	at org.openstreetmap.josm.data.UndoRedoHandler.afterAdd(UndoRedoHandler.java:49)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:60)
	at org.openstreetmap.josm.plugins.validator.tests.DuplicateWay.fixError(DuplicateWay.java:169)
	at org.openstreetmap.josm.plugins.validator.TestError.getFix(TestError.java:226)
	at org.openstreetmap.josm.plugins.validator.ValidatorDialog$FixTask.realRun(ValidatorDialog.java:491)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:83)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:129)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)

Attachments (1)

validator-dupcrash.patch (725 bytes) - added by bilbo 3 years ago.
Patch to fix the bug

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by stoecker

  • Owner changed from team to bilbo
  • Status changed from new to needinfo

Can you make this reproducable?

comment:2 Changed 3 years ago by bilbo

The bug seem to appear randomly and relatively rarely (perhaps few times a day), so I am not sure if I can reproduce it. I'll try next time if I see it.

comment:3 Changed 3 years ago by stoecker

  • Resolution set to irreproducible
  • Status changed from needinfo to closed

comment:4 Changed 3 years ago by bilbo

  • Resolution unreproducable deleted
  • Status changed from closed to reopened

I found a cause - the DuplicateWays part of validator used older method of adding the results:
Main.main.undoRedo.add(....

thus causing extra redrawing and probably these bugs, as a result from race conditions from validatror trying to fix the data that are being displayed.

I fixed the bug and I am attaching the patch.

Changed 3 years ago by bilbo

Patch to fix the bug

comment:5 Changed 3 years ago by bastiK

  • Resolution set to fixed
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.