my win10 crashes reproducible by leaving the alternate screen buffer.
The alternate screen could be useful for switching between different outputs or for games, because it doesn't support scrolling/scrollbars.
My first crash sample, but only when I ask for user input.
Code: Select all
@echo off
setlocal
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "\e=%%E"
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
REM *** Crashes only when set /p in the "alternate screen buffer"
REM *** The input for set /p has to be user input (Redirections works)
set /p inp=Enter to crash
REM *** Leave Alternate Screen Buffer
echo %\e%[?1049l
echo Never reached this
REM *** Other ways to wait/get user input works, like
REM *** pause
REM *** choice
REM *** xcopy %~f0 %~f0 /L /W
Or even worse
Code: Select all
@echo off
setlocal
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "\e=%%E"
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
REM *** Leave Alternate Screen Buffer
echo %\e%[?1049l
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
Tested with Microsoft Windows [Version 10.0.17134.1246].
These tests are so simple, I can't believe that this is a problem on all Win10 installations, else nobody can't used this ever without detecting this.
What are the results on your pc?
jeb