Your programme now appears to be very robust. Hasn’t crashed on me.
However there appears to be a problem with it communicating to Scratch. although your window text correctly reports the state of the inputs, Scratch does not respond. And the Crumble does not respond to changing inputs. It did the very first time I tried it but then it started to get flaky and even restarting Scratch did not cure it. Your prog continued to run OK throughout all of this.
I have noticed that when you click on the sensor value it now drops down resistance-A, resistance-B etc whereas before it was just A, B, C.. So perhaps Scratch does not know about your prog running. I have enabled remote sensor connections.
Not really the news you were hoping for I am afraid apart to say that ScratchCrumble seems now very robust indeed. Apologies for not testing sooner but I have been a bit busy.
Off on holiday from tomorrow wont be able to test anything for a week or so.