Activate the auto destruct sequence
R, 46 bytes

for(i in scan():0){cat(i,"\n");Sys.sleep(i/i)}


Crashes after printing 0 because the sleep function is called using 0/0 which returns NaN in R:

Error in Sys.sleep(time) : invalid 'time' value