0

I have a procedural program that creates a puzzle from a seed. As usual this seed is derived from the system time and I use it to debug a specific puzzle if I want to revisit it. Recently though, an error occurs very so often "An unhandled exception of type 'System.StackOverflowException' occurred in IceMaze.exe. A index in the program greatly exceeds the bound of the array that it is tied with. I then examine the trace point I placed in VC++ and derive the seed number from that. Strangely, after I enter the seed and run the program it works with no flaws and the index is within bounds. While I wont be able to give any code, are there any general problems that might be occurring in a situation like this?

Behemyth
  • 195
  • 3
  • 13
  • If you run the program several times with the same seed does it produce identical results? – Neil Aug 02 '12 at 23:24
  • Correct, it does produce the same results. – Behemyth Aug 02 '12 at 23:29
  • Usually miscalculation or buffer overflow. You might want to wrap the relevant and/or suspected functions with an exception block and write out a log file to report the seed number. When it crashed, use the reported seed number to debug the program. – Jay Aug 03 '12 at 02:19

0 Answers0