Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 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 4 years ago.
align_bug.gif (954.9 KB) - added by TobWen 4 years ago.
animation of bug when deleting ways
alignways-datasetlistener.patch (23.0 KB) - added by IdealChain 3 years ago.

Download all attachments as: .zip

Change History (19)

Changed 4 years ago by TobWen

Attachment: align_bug.png added

comment:1 Changed 4 years ago by TobWen

Cc: tobwen added

comment:2 Changed 4 years ago by TobWen

Component: CorePlugin alignways
Owner: changed from team to tilusnet

comment:3 Changed 4 years ago by TobWen

Description: modified (diff)

comment:4 Changed 4 years ago by TobWen

Description: modified (diff)

comment:5 Changed 4 years ago by TobWen

Description: modified (diff)

Changed 4 years ago by TobWen

Attachment: align_bug.gif added

animation of bug when deleting ways

comment:6 Changed 4 years ago by TobWen

Description: modified (diff)

comment:7 Changed 4 years ago by TobWen

Description: modified (diff)

comment:8 Changed 4 years ago by TobWen

Description: modified (diff)

comment:9 Changed 4 years ago by tilusnet

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 Changed 4 years ago by TobWen

Component: Plugin alignwaysunspecified
Owner: changed from tilusnet to team

comment:11 Changed 4 years ago by TobWen

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

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

comment:12 Changed 3 years ago by Don-vip

Cc: IdealChain added
Component: unspecifiedPlugin alignways

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

comment:13 Changed 3 years ago by IdealChain

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.

Changed 3 years ago by IdealChain

comment:14 Changed 3 years ago by IdealChain

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 Changed 3 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

Fixed in [o33136:33137]. Thank you!

comment:16 Changed 3 years ago by TobWen

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.