My guess is that something in your program is overwriting the variable, maybe as a wild write through some bad pointer.