Actually a signed int32 ranges from ~ -2.1 billion .. 2.1 billion, so not a factor 2, but a factor 2000. Plus you could easily switch to a int64, which ranges from -2^63..+2^63-1 (–9,223,372,036,854,775,808 to 9,223,372,036,854,775,807).
I suspect this wasn't done to save a little on memory, but the 1000000 limit seems a bit low.
As for the CTD, was your system close to reaching its memory limit?