The 15-line program included at the end of this message will crash the debugger. The IDE sequence to cause the crash is:
- Set a breakpoint at line 14 of the program ("seed = 0")
- Run the program under the debugger
- At the breakpoint, select the "Globals" tab in the lower-right debugger subwindow.
The error in this case is an Access Violation at location 00660078 in module POIDE.EXE. In other cases (i.e. while I was
boiling down the program to just the part that activates the bug) it causes the IDE to terminate with no message.
If you replace the "unsigned char" array with a quarter-sized "unsigned long" array, and the two instances of "8" by "32", it works fine, so I have a workaround...
#include <stdlib.h>
#include <string.h>
unsigned char sawseed[1000]; // should be more than large enough
unsigned long seed;
int main(int argc, char *argv[])
{
memset(sawseed, 0, sizeof(sawseed));
for (seed = 0; seed < 700; seed++)
{
sawseed[seed / 8] |= 1 << ( seed % 8 ); // Array index should not exceed 87
}
seed = 0;
}