I got an error when activating all the presets in JOSM

I tried to activate all the presets in the preference menu. When i clicked “ok”, my software lags for around three minutes before an error occurs saying “JOSM is out of memory. Strange things may happen. Please restart JOSM with the -Xmx###M option, where ### is the number of MB assigned to JOSM (e.g. 256). Currently, 2010 MB are available to JOSM.”, and things went strange. Can someone help me fix this guys?

I think the NSI (Name Suggestion Index) is the worst preset ever. It really should be done via a different method (which doesn’t currently exist), and I have been forced to create workarounds for some issues that it exhibits (for example, on Mac, if you have the NSI enabled, you don’t get the menu bar in the standard Apple location, see JDK-8297117).

On the other hand, it is a great way to stress test the presets system.

With all that said, NSI makes it really easy to add common points of interest (McDonalds, WalMart, etc.) and have some confidence that the entries are “correct” (McDonalds or McDonald’s, WalMart or Wal-Mart, etc.).

Anyway, if you enable everything but the NSI, you will likely have a much better time on 2 GB ram.

Additionally, I suspect you are either on an old system (>10 years old), a new “cheap” system, or you are running a 32bit version of Java. If you are running a recent computer (<10 years old), you should look into installing the 64bit version of Java.

Notes on Java installation:

  • JAR
  • JNLP
    • Install OpenWebStart
    • You may have to uninstall Oracle Java 8 to get things working properly. I don’t think there are any “common” applications still requiring Java 8 and not working with Java 11+ (this includes Minecraft – they actually require Java 17+).

That’s a whole lot. Surely you’ve tried loading additional presets to see if single additions cause the same effect.

These are all the ones I’ve added, just not a dozen and they installed flawlessly, where Internal Preset is there out of the box.

image

This is the second time I’m reading about JOSM getting 2GB. Mine gets 4GB. Made no any command line hacks to achieve this. Maybe it’s because the machine has 16GB over the original 8. It rarely runs out of memory, it quickly grabs 3.8 and that stays. Never giving any back when unloading large data sets.

edit: With EasyPresets I make my own ‘custom’ presets, have advanced to #90 recently.

Did you give any follow up on this?

I personally start josm with:

java -Xms2048M -Xmx8192M -jar josm-tested.jar

Yep, i just activated all the presets in my preference menu, and still receiving that error so it won’t do that. I guest can you please help me SekeRob or someone else?

The best way forward I think is remove all presets EXCEPT the Internal Preset and restart JOSM. Then add 1 preset at the time you selected, OK and verify the error does not occur. If it does not, add the next one, verify with OK. Repeat the process, 1 preset at the time until you get the error. It is important to OK at the bottom of the Preferences window after each selection.

I think Name Suggestion Index is a very big one that collapse JOSM.