Modify

Opened 12 years ago

Closed 12 years ago

Last modified 7 years ago

#7837 closed defect (wontfix)

JOSM out of memory with PicLayer image

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone:
Component: Plugin piclayer Version: tested
Keywords: Cc:

Description

Hi,
loading an image bigger than 7, 8 MB with the PicLayer Plugin, JOSM collapses with a out-of-memory error.

JOSM should be able to handle images at least until 20 MB.

Attachments (0)

Change History (4)

comment:1 by skyper, 12 years ago

Owner: changed from Larry0ua to anonymous
Status: newneedinfo

Could you please submit some more information (system, java, josm-version...).

The complete error message and maybe a link to an example file would be nice.

Thanks

comment:2 by Larry0ua, 12 years ago

Resolution: wontfix
Status: needinfoclosed

I have 8mb jpg file. Let's do some calculations.

disk size: 8.1mb
dimensions: 6800x5300
pixel count: 36M
memory takes: 108Mb

JOSM with bit downloaded data takes 90Mb in memory.
Standard memory limit for Java programs is 256Mb now, and we used 200 of them, that is close to the limit.

So if you want to load bigger images, run josm with next command line:

java -Xmx1G -jar josm-tested.jar

By the way, JOSM shows window with the next text if out of memory:

Please restart JOSM with -Xmx###M option,
where ### is the number of MB assigned to JOSM (e.g. 256)
Currently, 247MB are available to JOSM

Short outcome - that is not a bug and cannot be fixed in code.

in reply to:  2 comment:3 by skyper, 12 years ago

Replying to Larry0ua:

I have 8mb jpg file. Let's do some calculations.

disk size: 8.1mb
dimensions: 6800x5300
pixel count: 36M
memory takes: 108Mb

JOSM with bit downloaded data takes 90Mb in memory.
Standard memory limit for Java programs is 256Mb now, and we used 200 of them, that is close to the limit.

Depends on your system:

$ java -jar Downloads/josm-tested.jar 
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-03 01:31:22
Last Changed Author: simon04
Revision: 5315
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-02 14:51:19 +0200 (Mon, 02 Jul 2012)
Last Changed Rev: 5315

Information: Einstellungsdatei '$HOME/.josm/preferences.xml' fehlt. Erstelle Standardeinstellungsdatei.
GET http://api.openstreetmap.org/api/capabilities... OK
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-03 01:31:22
Last Changed Author: simon04
Revision: 5315
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-02 14:51:19 +0200 (Mon, 02 Jul 2012)
Last Changed Rev: 5315

Identification: JOSM/1.5 (5315 de)
Memory Usage: 105 MB / 881 MB (43 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux

comment:4 by collegedale home, 7 years ago

This is an old thread but I will post what worked for me so in case someone else is still wanting a way to increase the memory for JOSM.

  1. One needs to have the 64 bit version of Java installed. a.) the 32 bit version of Java would not allow more then 1024m memory for JOSM for me.

2 I ran the following command in CMD [i]java -Xmx9216m -jar "C:\Program Files (x86)\JOSM\josm-tested.jar"i

(I would test the command in cmd to make sure josm has enough memory for you. Change -Xmx9216m to the amount of memory you want in mb. Also change the josm file location as appropriate to the location of your josm file.)
(If this works then procede to next step.)

  1. I installed JOSM with the windows installer. Therefore I changed the shortcut to josm with the above working command as the target of the shortcut.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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