Opened 8 months ago

Closed 8 months ago

#17569 closed defect (fixed)

building_tools crashes when drawing circular building near 180 longitude

Reported by: GerdP Owned by: GerdP
Priority: normal Milestone:
Component: Plugin buildings_tools Version:
Keywords: template_report Cc:


What steps will reproduce the problem?

  1. Create new data layer
  2. Press Alt+Z to "set building shape to circle"
  3. Move cursor somewere close to the 179.999 longitude and click left mouse button
  4. Move cursor down so that the expected circle would cross the 180 longitude and click again

What is the expected result?

Warning message like "Cannot add a node outside of the world."

What happens instead?


Please provide any additional information below. Attach a screenshot if possible.

The crash happens only when the layer has no ways. If the layer has ways the above steps might change the address data of an existing building.
Reason is that the plugin uses the CreateCircleAction but doesn't verify if that action really added a new way.

Build-Date:2019-04-07 08:45:09

Identification: JOSM/1.5 (14965 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 540 MB / 1753 MB (193 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:53613, -Dfile.encoding=UTF-8]
Program arguments: [--debug]
Dataset consistency test: No problems found

+ FastDraw (34949)
+ OpeningHoursEditor (34867)
+ apache-commons (34506)
+ buildings_tools (34904)
+ continuosDownload (82)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34678)
+ jts (34524)
+ o5m (34867)
+ opendata (34911)
+ pbf (34867)
+ poly (34867)
+ reltoolbox (34867)
+ reverter (34961)
+ undelete (34919)
+ utilsplugin2 (34932)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Region [TMS_BLOCK_v2] Resetting cache
- E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
- E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

No data collected.

Warning issued by: BugReportExceptionHandler#handleException

Thread: AWT-EventQueue-0 (20) of main
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(
	at java.util.ArrayList.get(
	at org.openstreetmap.josm.plugins.buildings_tools.Building.createCircle(
	at org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction.drawingFinish(
	at org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction.drawingAdvance(
	at org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction.mouseReleased(
	at java.awt.AWTEventMulticaster.mouseReleased(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$500(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

Attachments (0)

Change History (3)

comment:1 Changed 8 months ago by GerdP

Owner: changed from Upliner to GerdP
Status: newassigned

comment:2 Changed 8 months ago by GerdP

In 14967/josm:

see #17569 improve warning message
Warn "Cannot add a node outside of the world." instead of "Those nodes are not in a circle. Aborting."

comment:3 Changed 8 months ago by GerdP

Resolution: fixed
Status: assignedclosed

fixed with [o34968:34969]

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain GerdP.
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.