JOSM memory gobble

I just traced a kilometer (or less) of features - houses and alignments for a village, using the EDS3377 projection. Doing validation (or upload) will basically hang the process. It always stop early at checking crossing ways. In konsole, I can see that java is using all the allocated memory. I have let the process run but it never finishes, prompting a kill command to stop it. This is unexpected since I have done much bigger edits than this without any problems at all. Here is what I’ve tried:

  • tried three different josm versions; 17833,17702 & 17428
  • deleted every layer except the data layer before validate/upload
  • increased memory allocation to 6G
    update: error message- Thread main-worker-0 raised java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
    (6 gig isn’t enough?.. jeez.:stuck_out_tongue: )

my pc: amd fx6300, 12G ram, opensuse 15.2.
java version: 11.0.10+9-suse-lp152.2.9.1-x8664
OpenJDK 64-Bit Server VM (build 11.0.10+9-suse-lp152.2.9.1-x8664, mixed mode

Any ideas? java problem maybe? I haven’t see any notification from opensuse regarding java patch/upgrade in a while.

I’m guessing, a bug in JOSM that’s triggered by something in your data. I’d be sure to save a copy of your layer-that-won’t-upload (if you haven’t already), as I think a JOSM developer might be very interested in it.

Hopefully a JOSM developer is reading this. :slight_smile: I know there’s a bug tracker somewhere…

JOSM makes it really easy to report a bug, see Help → Report Bug. Attach the info that you posted here. I assume the projection is a problem for the spatial index that is used in Crossing Ways test.
A workaround in such situations is to disable the test to be able to upload.

Now thinking about it, this is my second edit of the area. It uploaded the first time for edits in an adjacent area using same projection.

Today, I disabled self crossing check and ways crossing check, and sets projection to mercator and upload works this time. Although, honestly, I think it will also upload using different projection as long as I skip the ways crossing check.

I’ll do another edit and try again with non-default projection and without ways crossing check. After that we’ll see if there’s actually a bug somewhere.