Modify

Opened 16 years ago

Last modified 14 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 16 years ago.

Download all attachments as: .zip

Change History (9)

by fatbozz, 16 years ago

Attachment: terracer_bug.jpg added

comment:1 by stoecker, 15 years ago

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

comment:2 by Lambertus, 15 years ago

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 by Lambertus, 15 years ago

Situation B is solved in version 21376.

in reply to:  2 comment:4 by bastiK, 15 years ago

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 by ayke, 14 years ago

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

comment:6 by bastiK, 14 years ago

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

comment:7 by skyper, 14 years ago

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 by skyper, 14 years ago

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. Next status will be 'closed'.
to The owner will be changed from zerebubuth@… to the specified user.
Next status will be 'needinfo'. The owner will be changed from zerebubuth@… to fatbozz.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from zerebubuth@… to anonymous. Next status will be 'assigned'.

Add Comment


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