Have you done what ChrisW67 suggested, and debug to see what the values actually are when the crash occurs? Random guesses about what might be going wrong might get you to something that works, but you'll have no idea why. Your code will remain fragile and ready to crash again at the next unhappy combination of parameters.Run your program in a debugger and inspect the backtrace and values actually in variables at the time of the crash.
Bookmarks