If a P01 file is accidentally chosen for a flash in to a P59 computer, we get a crash at the local file CRC gathering stage. We might need to protect against that in the crc routine, or add a pre-flight check when doing a write that the file has the correct size before attempting to check CRCs. The error message also assumes the flash has begun, which it has not.
> [05:40:25:891] Calculating CRCs from file...
> [05:40:25:964] Something went wrong. Index was outside the bounds of the array.
> [05:40:25:970] Do not power off the PCM! Do not exit this program!
> [05:40:25:976] Try flashing again. If errors continue, seek help online.
> [05:40:25:982] https://pcmhacking.net/forums/viewtopic.php?f=42&t=6080
> [05:40:25:988]
> [05:40:25:999] System.IndexOutOfRangeException: Index was outside the bounds of the array.
> at PcmHacking.Crc.GetCrc(Byte[] buffer, UInt32 start, UInt32 length)
> at PcmHacking.CKernelVerifier.GetCrcFromImage()
> at PcmHacking.CKernelVerifier.<CompareRanges>d__7.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at PcmHacking.CKernelWriter.<Write>d__6.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at PcmHacking.CKernelWriter.<Write>d__5.MoveNext()
> [05:40:26:022] Elapsed time 00:00:00.3340755
If a P01 file is accidentally chosen for a flash in to a P59 computer, we get a crash at the local file CRC gathering stage. We might need to protect against that in the crc routine, or add a pre-flight check when doing a write that the file has the correct size before attempting to check CRCs. The error message also assumes the flash has begun, which it has not.