Modify

Opened 9 years ago

Last modified 7 years ago

#2496 new defect

Terracer: warn about unsupported selection (support more than 4 nodes and other shapes than rectangles)

Reported by: fatbozz Owned by: zerebubuth@…
Priority: normal Milestone:
Component: Plugin terracer Version:
Keywords: Cc:

Description

I was terracing selected object in attachment

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1565
Node Kind: directory
Last Changed Author: ulfl
Last Changed Rev: 1565
Last Changed Date: 2009-04-28 23:12:48 +0200 (Tue, 28 Apr 2009)

Java version: 1.6.0_13
Plugins: DirectUpload;Intersect_way;measurement;multipoly;openstreetbugs;remotecontrol;routing;terracer;usertools;utilsplugin;validator;wmsplugin
Plugin DirectUpload Version: 14133
Plugin Intersect_way Version: 12781
Plugin measurement Version: 14015
Plugin multipoly Version: ${version.entry.commit.revision}
Plugin openstreetbugs Version: 14753
Plugin remotecontrol Version: 14015
Plugin routing Version: 14404
Plugin terracer Version: 14048
Plugin usertools Version: 14125
Plugin utilsplugin Version: 14356
Plugin validator Version: 14123
Plugin wmsplugin Version: 14120

java.lang.ArrayIndexOutOfBoundsException: 12
	at terracer.TerracerAction.findFrontAndBack(TerracerAction.java:290)
	at terracer.TerracerAction.terraceBuilding(TerracerAction.java:158)
	at terracer.TerracerAction.actionPerformed(TerracerAction.java:121)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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 (1)

terracer_bug.jpg (253.3 KB) - added by fatbozz 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by fatbozz

Attachment: terracer_bug.jpg added

comment:1 Changed 9 years ago by stoecker

Component: PluginPlugin terracer
Owner: changed from team to zerebubuth@…

comment:2 Changed 8 years ago by Lambertus

A) This happens when you terrace (with more then 1 segment) an odd shaped building (not having 4 nodes and squarish shape) with all versions of this plugin. This section of code is a bit complicated and I haven't looked at closely yet.

B) It also happens with version 21169 when you add a single address totally unnecessary (because there is nothing to terrace so the front and back don't have to be calculated). This particular problem (B) will be fixed in the next version.

comment:3 Changed 8 years ago by Lambertus

Situation B is solved in version 21376.

comment:4 in reply to:  2 Changed 8 years ago by bastiK

Replying to Lambertus:

This section of code is a bit complicated and I haven't looked at closely yet.

If I recall correctly, this section is a bit of a hack. Feel free to rewrite it!

comment:5 Changed 7 years ago by ayke

Maybe I have just posted a duplicate: http://josm.openstreetmap.de/ticket/5540

comment:6 Changed 7 years ago by bastiK

Ticket #5540 has been marked as a duplicate of this ticket.

comment:7 Changed 7 years ago by skyper

There is no NPE anymore, but the result is totally weird if:

B) you have no squarish shape.

C) you have more than 4 nodes in the closed way. (In rare cases it works.)

It would be nice, if terracer could handle both cases.

  • For B) if possible terrace and otherwise just present a message that it can not handle it, maybe a red coloured info message at the bottom of the terracer dialog like the download dialog.
  • For C) it should be no problem to terrace using the four corner nodes. Please leave the other nodes at their position and use new nodes for the segments.

r4079, o25199

comment:8 Changed 7 years ago by skyper

Priority: majornormal
Summary: Terracer exceptionTerracer: warn about unsupported selection (support more than 4 nodes and other shapes than rectangles)

changed summary and type.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain zerebubuth@….
as The resolution will be set.
to The owner will be changed from zerebubuth@… to the specified user.
The owner will change to fatbozz
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from zerebubuth@… to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.