Modify

Opened 8 years ago

Last modified 3 years ago

#13155 new defect

Better handling of Layer.checkLayerMemoryDoesNotExceedMaximum

Reported by: anonymous Owned by: michael2402
Priority: normal Milestone:
Component: Core imagery Version:
Keywords: template_report memory 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 (16)

comment:1 by wiktorn, 8 years ago

Resolution: fixed
Status: newclosed

I've closed this ticket by mistake

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

comment:2 by wiktorn, 8 years ago

Resolution: fixed
Status: closedreopened

comment:3 by stoecker, 8 years ago

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

comment:4 by wiktorn, 8 years ago

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 by michael2402, 8 years ago

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 by simon04, 8 years ago

Summary: Error opening aerial MapquestBetter handling of Layer.checkLayerMemoryDoesNotExceedMaximum

comment:7 by michael2402, 8 years ago

Milestone: 16.08

comment:8 by Don-vip, 8 years ago

Owner: changed from team to michael2402
Status: reopenednew

comment:9 by michael2402, 8 years ago

A warning will be displayed in the patch #13386

comment:10 by Don-vip, 8 years ago

Milestone: 16.0816.09

comment:11 by simon04, 8 years ago

Milestone: 16.0916.10

Milestone renamed

comment:12 by simon04, 8 years ago

Milestone: 16.1016.11

comment:13 by Don-vip, 8 years ago

Milestone: 16.1116.12

Milestone renamed

comment:14 by Don-vip, 8 years ago

Description: modified (diff)
Milestone: 16.12

comment:15 by Don-vip, 7 years ago

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

comment:16 by skyper, 3 years ago

Component: CoreCore imagery
Keywords: memory added

Modify Ticket

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