Modify

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#12711 closed defect (fixed)

[Patch] AlignWayS plugin crashes

Reported by: TobWen Owned by: IdealChain
Priority: normal Milestone:
Component: Plugin alignways Version:
Keywords: template_report Cc: tobwen, IdealChain, Don-vip

Description (last modified by TobWen)

What steps will reproduce the problem?

  1. load AlignWayS
  2. try to use it the normal way
  3. it's impossible to select, unselect or align ways

What is the expected result?

Normal behaviour... Select, align and unselect lines via hotkey or menu item.

What happens instead?

Actually, most of the time nothing happenes. Sometimes you're able to select ways, but you can't unselect or align them. When you delete selected ways, the plugin crashes and makes JOSM unuseable.

See animation: https://josm.openstreetmap.de/attachment/ticket/12711/align_bug.gif

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: 2016-03-30 02:55:55 +0200 (Wed, 30 Mar 2016)
Build-Date:2016-03-30 01:34:35
Revision:10082
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10082 de) Windows 7 64-Bit
Memory Usage: 208 MB / 247 MB (109 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- alignways (31895)
- josm-plugin-opengl (1440156917)
- splinex (31895)
- utilsplugin2 (32099)

Error Message

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-03-30 02:55:55 +0200 (Wed, 30 Mar 2016)
Build-Date:2016-03-30 01:34:35
Revision:10082
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10082 de) Windows 7 64-Bit
Memory Usage: 131 MB / 247 MB (53 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- ShapeTools (1000)
- alignways (31895)
- areaselector (263)
- josm-plugin-opengl (1440156917)
- log4j (31895)
- splinex (31895)
- utilsplugin2 (32099)

Last errors/warnings:
- E: java.lang.ArrayIndexOutOfBoundsException: 2

java.lang.ArrayIndexOutOfBoundsException: 2
	at org.openstreetmap.josm.data.osm.Way.getNode(Way.java:130)
	at com.tilusnet.josm.plugins.alignways.AlignWaysSegment.drawSegment(AlignWaysSegment.java:101)
	at com.tilusnet.josm.plugins.alignways.AlignWaysSegment.highlightSegment(AlignWaysSegment.java:96)
	at com.tilusnet.josm.plugins.alignways.AlignWaysSegment.paint(AlignWaysSegment.java:88)
	at com.tilusnet.josm.plugins.alignways.AlignWaysAlgnSegment.paint(AlignWaysAlgnSegment.java:224)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:778)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JSplitPane.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$1200(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(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.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 (3)

align_bug.png (99.4 KB ) - added by TobWen 8 years ago.
align_bug.gif (954.9 KB ) - added by TobWen 8 years ago.
animation of bug when deleting ways
alignways-datasetlistener.patch (23.0 KB ) - added by IdealChain 7 years ago.

Download all attachments as: .zip

Change History (19)

by TobWen, 8 years ago

Attachment: align_bug.png added

comment:1 by TobWen, 8 years ago

Cc: tobwen added

comment:2 by TobWen, 8 years ago

Component: CorePlugin alignways
Owner: changed from team to tilusnet

comment:3 by TobWen, 8 years ago

Description: modified (diff)

comment:4 by TobWen, 8 years ago

Description: modified (diff)

comment:5 by TobWen, 8 years ago

Description: modified (diff)

by TobWen, 8 years ago

Attachment: align_bug.gif added

animation of bug when deleting ways

comment:6 by TobWen, 8 years ago

Description: modified (diff)

comment:7 by TobWen, 8 years ago

Description: modified (diff)

comment:8 by TobWen, 8 years ago

Description: modified (diff)

comment:9 by tilusnet, 8 years ago

Hello,

While I am the original author of the plugin I no longer maintain it.
I am sorry I am no longer familiar with the new underlying codebase.

comment:10 by TobWen, 8 years ago

Component: Plugin alignwaysunspecified
Owner: changed from tilusnet to team

comment:11 by TobWen, 8 years ago

Oh no, this is very sad to hear. The addon plugin really was useful... maybe anyone else can have a look ?

Last edited 8 years ago by TobWen (previous) (diff)

comment:12 by Don-vip, 7 years ago

Cc: IdealChain added
Component: unspecifiedPlugin alignways

@IdealChain: is this ticket also fixed with your patch?

comment:13 by IdealChain, 7 years ago

Owner: changed from team to IdealChain
Status: newassigned

For the most part, it's fixed, but the exception can still be caused by deleting a highlighted way segment by Undo.
Also, I've seen that there is an (unrelated) problem when highlighting an already highlighted way.

I will create a patch for that in the next days.

by IdealChain, 7 years ago

comment:14 by IdealChain, 7 years ago

Cc: Don-vip added
Summary: AlignWayS plugin crashes[Patch] AlignWayS plugin crashes

Here you go. It got a bit bigger than expected, but it fixes issues due to:

  • removing highlighted ways/nodes by using the Undo function (could trigger this exception)
  • Layer and MapView switching
  • highlighting an already highlighted way segment again
  • selecting the affected primitives of an Align Ways command in the Command Stack
  • drawing of highlighted way segments: anti aliasing was enabled occasionally

comment:15 by Don-vip, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [o33136:33137]. Thank you!

comment:16 by TobWen, 7 years ago

Thanks a lot.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain IdealChain.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.