Launch Arma3 stable branch with -showScriptErrors launch parameter.
Preview any map, any mission.
Open the debug console.
Enter the following:
[] spawn {
format["%1n", _undefVar];
diag_log "Crash upon scope exit";
};
Execute the code, look at your log.
Then, try this one:
crashingCode = {format["%1n", ];};
Execute the code.