Merge "Add crash detection and recovery." into sc-dev