Modify

Opened 3 years ago

Last modified 18 months ago

#13155 new defect

Better handling of Layer.checkLayerMemoryDoesNotExceedMaximum

Reported by: anonymous Owned by: michael2402
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc: michael2402

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. open Mapquest open aerial
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-07-11 23:04:49 +0200 (Mon, 11 Jul 2016)
Build-Date:2016-07-12 01:31:48
Revision:10526
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10526 it) Windows 8.1 64-Bit
Memory Usage: 247 MB / 247 MB (15 MB allocated, but free)
Java version: 1.8.0_91-b15, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-44926132, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=5584, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAC1Eam5scC5hcHBsaWNhdGlvbi5ocmVmPWh0dHBzOi8vam9zbS5vcGVuc3RyZWV0bWFwLmRlL2Rvd25sb2FkL2pvc20uam5scAA=]
Dataset consistency test: No problems found

Plugins:
- reverter (32584)

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- E: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.IllegalArgumentException: To add another layer you need to allocate at least 254MB memory to JOSM using -Xmx254M option (see http://forum.openstreetmap.org/viewtopic.php?id=25677).

=== REPORTED CRASH DATA ===
MapView#layerAdded:
 - layer: org.openstreetmap.josm.gui.layer.TMSLayer@756d36

LayerManager#fireLayerAdded:
 - listener: org.openstreetmap.josm.gui.MapView[,0,0,819x667,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=java.awt.Dimension[width=10,height=0],preferredSize=]
 - event: LayerAddEvent [addedLayer=org.openstreetmap.josm.gui.layer.TMSLayer@756d36]

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (62) of javawsApplicationThreadGroup
java.lang.IllegalArgumentException: To add another layer you need to allocate at least 254MB memory to JOSM using -Xmx254M option (see http://forum.openstreetmap.org/viewtopic.php?id=25677).
Currently you have 247MB memory allocated for JOSM
	at org.openstreetmap.josm.gui.layer.Layer.checkLayerMemoryDoesNotExceedMaximum(Layer.java:185)
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.initializeIfRequired(AbstractTileSourceLayer.java:647)
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.attachToMapView(AbstractTileSourceLayer.java:624)
	at org.openstreetmap.josm.gui.MapView.layerAdded(MapView.java:634)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(LayerManager.java:394)
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(LayerManager.java:196)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:271)
	at org.openstreetmap.josm.gui.layer.LayerManager$1.run(LayerManager.java:183)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:146)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:180)
	at org.openstreetmap.josm.actions.AddImageryLayerAction.actionPerformed(AddImageryLayerAction.java:82)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(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.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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.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 (0)

Change History (15)

comment:1 Changed 3 years ago by wiktorn

Resolution: fixed
Status: newclosed

I've closed this ticket by mistake

Last edited 3 years ago by wiktorn (previous) (diff)

comment:2 Changed 3 years ago by wiktorn

Resolution: fixed
Status: closedreopened

comment:3 Changed 3 years ago by stoecker

Looks like a typical out of memory situation. Why not close it?

comment:4 Changed 3 years ago by wiktorn

Cc: michael2402 added

It should be pretty printed to the user, it should not report a crash

@michael2402:
Can you have a look on this?

comment:5 Changed 3 years ago by michael2402

I was no fan of that exception, too. I'll change it while refactoring the tile source. The error won't happen in #13120 - memory issues are then silently ignored (a message is still on my TODO-List as soon as I move the text paint code to the painter).

comment:6 Changed 3 years ago by simon04

Summary: Error opening aerial MapquestBetter handling of Layer.checkLayerMemoryDoesNotExceedMaximum

comment:7 Changed 3 years ago by michael2402

Milestone: 16.08

comment:8 Changed 3 years ago by Don-vip

Owner: changed from team to michael2402
Status: reopenednew

comment:9 Changed 3 years ago by michael2402

A warning will be displayed in the patch #13386

comment:10 Changed 3 years ago by Don-vip

Milestone: 16.0816.09

comment:11 Changed 3 years ago by simon04

Milestone: 16.0916.10

Milestone renamed

comment:12 Changed 3 years ago by simon04

Milestone: 16.1016.11

comment:13 Changed 2 years ago by Don-vip

Milestone: 16.1116.12

Milestone renamed

comment:14 Changed 2 years ago by Don-vip

Description: modified (diff)
Milestone: 16.12

comment:15 Changed 18 months ago by Don-vip

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain michael2402.
as The resolution will be set.
to The owner will be changed from michael2402 to the specified user.
The owner will change to anonymous
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 michael2402 to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.