OutOfRangeStore "Memory Space=Global Size=4"

I am getting the error in the title when I am increasing my threads per SM. The Nsight is pointing me to a line where I am allocating assigning a variable to an array (but I am not going out of bound).

Detail of the bug is here: http://stackoverflow.com/questions/16865141/outofrangestore-exception-where-there-is-no-out-of-range-assignment-to-an-array

Can anyone please explain to me what this error means? (other than what it implies, as out of bound).

The answer to this was increasing the heap size, a gentleman on stackoverflow, Roger Dahl, suggested the answer and it worked.