I'm creating a tetris game that uses a 180 entry array of ints to
represent a 10 x 18 play area. I'm experiencing a bug where this
array is being filled with garbage data. Until recently, I could not
determine what operation was causing the bug as it seemed to occur
only very rarely, and under no consistent circumstances. I found
though that it was happening consistently in the game's demo mode at
the same place and time (the demo has no random seed and performs the
same every time). I started stepping through the code using gdb, but
the error doesn't happen during debugging.
I removed the vbl interrupt for drawing, instead calling Draw() once
per game loop. The error doesn't seem to occur now!
Could this be a symptom of doing too much in the vbl, or could this
interrupt cause corruption of a write to a 180 entry array?
Thanks for the help!