NegativeArraySizeException

An integer overflowed — this is not a memory problem, and more RAM will not fix it

why

A negative array size means a size calculation wrapped past the 32-bit integer limit. In tools that enumerate haplotypes or combinations the count grows as 2^n, so a single oversized unit is enough to wrap the counter negative. No amount of -Xmx touches this — it is an algorithmic ceiling, not a tuning one.

what to do

Reduce whatever made the unit too large (window size, block size, marker count), or switch to a tool that does the same computation without the 32-bit ceiling. If you saw OutOfMemoryError earlier in the same run, that one is a heap problem and is a separate fix.

traced · HaploView 4.2 case, Aug 2026
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.