While not PBP, it is similar enough to understand, I would ask 2 questions, what happens to the select case statement if not any of those choices?
In PBP we have a case else where you can direct what is to happen, does your compiler automatically jump to end select if there is no match, or does it run out into La La Land, stack under / overflow sit and wait for help . . . ?
The other thing I might try is to enable the WDT.