I have in the past few months successfully run 10-15 MaxEnt models using the maxent.jar java system. But in the past few days, I have recieved the following error each time I run the modeling software, after 44% or 66% duration (depending on the background rasters chosen, it's either or, not anything in between) during the "Extracting random background and sample data" phase of the run:
"Error reading file [file path]: java.lang.ArrayIndexOutOfBoundsException: -1758671516"
Complete error file:
Fri Apr 11 21:39:56 CEST 2025
MaxEnt version 3.4.4
Checking header of E:1714円\Maxent_Underlag\mfk.asc
Checking header of E:1714円\Maxent_Underlag\ndvi.asc
Checking header of E:1714円\Maxent_Underlag\nmd.asc
Checking header of E:1714円\Maxent_Underlag\solinstralning.asc
Reading samples from vg_test_3.csv
Read samples: max memory 506462208, total allocated 506462208, free 425582280, used 80879928, increment 80879928
Extractor: max memory 506462208, total allocated 506462208, free 421158680, used 85303528, increment 4423600
Extracting random background and sample data
Time since start: 181.132
Error reading file
[File path]: java.lang.ArrayIndexOutOfBoundsException: -1758671516
java.lang.ArrayIndexOutOfBoundsException: -1758671516
at density.Extractor.readSamples(Extractor.java:281)
at density.Extractor.extractSamples(Extractor.java:178)
at density.Runner.initializeGrids(Runner.java:216)
at density.Runner.start(Runner.java:304)
at density.GUI7ドル.construct(GUI.java:342)
at density.SwingWorker2ドル.run(SwingWorker.java:131)
at java.lang.Thread.run(Unknown Source)
Time since start: 187.523
Ending
This is an error I haven't recieved in all the previous successful runs, and does not match the errors I have gotten when points were outside the raster extents or raster data was not matching. And I cannot get rid of it, I have tried to remake my csv file hundreds of times with no success, tried different paths, different drives and nothing seems to fix it. I've tried it on another computer with the exact same error. I have reinstalled java and maxent with no apparent change.
It's my understanding that the ArrayIndexOutOfBoundsException error occurs when trying to use an index which is outside the bounds of the array, which in this case is 10000. But the value thrown, -1758671516, seems outlandishly large and negative for an array index and I don't know where it's coming from.
I haven't done anything to change the environmental layer rasters, and when comparing them the headers match perfectly.
I have tried to shorten the coordinate strings and limit them to 7 decimals but that didn't change anything.
Has anyone else stumbled upon this and found a solution?
My .csv file looks like this:
species,latitude,longitude |
---|
Violett guldvinge,63.186799999999998,14.702999999999999 |
Violett guldvinge,63.168799999999997,14.698100000000000 |
Violett guldvinge,63.145499999999998,14.772600000000001 |
Violett guldvinge,63.140000000000001,14.749900000000000 |
Violett guldvinge,63.154899999999998,14.722099999999999 |
etc.
Link to file: https://limewire.com/d/JCIih#Tgv4yIsVvM