Merge "Catch ArrayIndexOutOfBoundsException to avoid system reboots." into main