#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 , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
follow-up: 3 comment:2 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | needinfo → closed |
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.
comment:3 by , 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 , 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.
- 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.)
- 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.
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