An integer overflowed — this is not a memory problem, and more RAM will not fix it
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.
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.