Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Infinite loop in terminal #80819

Closed
dhu163 opened this issue Sep 12, 2019 · 6 comments
Closed

Infinite loop in terminal #80819

dhu163 opened this issue Sep 12, 2019 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues
Milestone

Comments

@dhu163
Copy link

dhu163 commented Sep 12, 2019

  • VSCode Version: 1.38
  • OS Version: Windows_NT x64 10.0.18362

Steps to Reproduce:

  1. Whenever I run any python file from VS Code without debugging (it is fine debugging) in a particular private github repository, the python debug console seems to get stuck in an infinite loop, repeatedly printing the same sequence of what looks like terminal commands and then a message to report to github. Eventually however, it seems to give up and successfully runs the file. Is my file address too long? This only happens on my home lenovo laptop and not my work PC.

Does this issue occur when all extensions are disabled?: No, there is no issue if I call it by "python ~.py"

PS C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing> cd 'c:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing'; ${env:ALLUSERSPROFILE}='C:\ProgramData'; ${env:AMD_ENTRYPOINT}='vs/workbench/services/extensions/node/extensionHostProcess'; ${env:APPDATA}='C:\Users\Daniel Hu\AppData\Roaming'; ${env:APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL}='true'; ${env:CommonProgramFiles}='C:\Program Files\Common Files'; ${env:CommonProgramFiles(x86)}='C:\Program Files (x86)\Common Files'; ${env:CommonProgramW6432}='C:\Program Files\Common Files'; ${env:COMPUTERNAME}='LENOVO-PC'; ${env:ComSpec}='C:\WINDOWS\system32\cmd.exe'; ${env:configsetroot}='C:\WINDOWS\ConfigSetRoot'; ${env:DriverData}='C:\Windows\System32\Drivers\DriverData'; ${env:ELECTRON_RUN_AS_NODE}='1'; ${env:FPS_BROWSER_APP_PROFILE_STRING}='Internet Explorer'; ${env:FPS_BROWSER_USER_PROFILE_STRING}='Default'; ${env:FP_NO_HOST_CHECK}='NO'; ${env:FSHARPINSTALLDIR}='C:\Program
Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0'; ${env:HOMEDRIVE}='C:'; ${env:HOMEPATH}='\Users\Daniel Hu'; ${env:LOCALAPPDATA}='C:\Users\Daniel Hu\AppData\Local'; ${env:LOGONSERVER}='\LENOVO-PC'; ${env:NUMBER_OF_PROCESSORS}='8'; ${env:OneDrive}='C:\Users\Daniel Hu\OneDrive'; ${env:OneDriveConsumer}='C:\Users\Daniel Hu\OneDrive'; ${env:OS}='Windows_NT'; ${env:PATHEXT}='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY'; ${env:PIPE_LOGGING}='true'; ${env:PROCESSOR_ARCHITECTURE}='AMD64'; ${env:PROCESSOR_IDENTIFIER}='Intel64 Family 6 Model 60 Stepping 3,
GenuineIntel'; ${env:PROCESSOR_LEVEL}='6'; ${env:PROCESSOR_REVISION}='3c03'; ${env:ProgramData}='C:\ProgramData';
${env:ProgramFiles}='C:\Program Files'; ${env:ProgramFiles(x86)}='C:\Program Files (x86)'; ${env:ProgramW6432}='C:\Program Files'; ${env:PSModulePath}='C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\Storage'; ${env:PUBLIC}='C:\Users\Public'; ${env:SESSIONNAME}='Console'; ${env:SystemDrive}='C:'; ${env:SystemRoot}='C:\WINDOWS'; ${env:TEMP}='C:\Users\DANIEL1\AppData\Local\Temp'; ${env:TMP}='C:\Users\DANIEL1\AppData\Local\Temp'; ${env:USERDOMAIN}='LENOVO-PC'; ${env:USERDOMAIN_ROAMINGPROFILE}='LENOVO-PC'; ${env:USERNAME}='Daniel Hu'; ${env:USERPROFILE}='C:\Users\Daniel Hu'; ${env:VERBOSE_LOGGING}='true'; ${env:VS120COMNTOOLS}='C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools'; ${env:VSCODE_CWD}='C:\Users\Daniel Hu\AppData\Local\Programs\Microsoft VS Code'; ${env:VSCODE_HANDLES_UNCAUGHT_ERRORS}='true'; ${env:VSCODE_IPC_HOOK}='\.\pipe\22a26726e9c4ff94b45dc1be8ab3dda7-1.38.0-main-sock'; ${env:VSCODE_IPC_HOOK_EXTHOST}='\.\pipe\vscode-ipc-1b57c66c-fc40-4994-8a4a-ef1462beb39d-sock'; ${env:VSCODE_LOGS}='C:\Users\Daniel Hu\AppData\Roaming\Code\logs\20190912T194724'; ${env:VSCODE_LOG_STACK}='false'; ${env:VSCODE_NLS_CONFIG}='{"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}'; ${env:VSCODE_NODE_CACHED_DATA_DIR}='C:\Users\Daniel Hu\AppData\Roaming\Code\CachedData\3db7e09f3b61f915d03bbfa58e258d6eee843f35'; ${env:VSCODE_PID}='14328'; ${env:VSCODE_PREVENT_FOREIGN_INSPECT}='true'; ${env:windir}='C:\WINDOWS'; ${env:Path}='C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\PuTTY;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files (x86)\AOMEI Backupper;C:\Program Files (x86)\LyX 2.3\Perl\bin;C:\Users\Daniel Hu\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts;C:\Users\Daniel Hu\AppData\Local\GitHubDesktop\bin;C:\Python34;C:\Windows\WinSxS\wow64_microsoft-windows-g..policy-cmdlinetools_31bf3856ad364e35_10.0.17134.1_none_2b3e35a9797f6766;C:\Users\Daniel Hu\AppData\Local\Microsoft\WindowsApps;C:\texlive\2019\bin\win32;C:\Users\Daniel Hu\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing;C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing\selenium_unittest;'; ${env:PYTHONPATH}='C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts;C:/Users/Daniel Hu/Documents/OneDrive-2019/2019/Codejam;C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing;C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing\selenium_unittest;'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe' 'c:\Users\Daniel Hu.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py' '--default' '--nodebug' '--client' '--host' 'localhost' '--port' '65453' 'c:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Automation\Selenium-Testing\PO

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 200 Keys:
p t v s d _ l a u n c h e r . p y ' Space ' - - d e f a u l t ' Space ' - - n o d e b u g ' Space ' - - c l i e n t ' Space ' - - h o s t ' Space ' l o c a l h o s t ' Space ' - - p o r t ' Space ' 6 5 4 5 3 ' Space ' c : \ U s e r s \ D a n i e l Space H u \ D o c u m e n t s \ O n e D r i v e - 2 0 1 9 \ 2 0 1 9 \ P y t h o n \ S e l e n i u m \ R a n d B \ A u t o m a t i o n \ S e l e n i u m - T e s t i n g \ P O M . p y ' Space Enter

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -47.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

PS C:\Users\Daniel Hu\Documents\OneDrive-2019\2019\Python\Selenium\RandB\Auto
etc.

@vscodebot
Copy link

vscodebot bot commented Sep 12, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@dhu163
Copy link
Author

dhu163 commented Sep 12, 2019

oh, I just noticed the github link to powershell now that it is highlighted, looks like I should have posted it there
EDIT: PowerShell/PSReadLine#1039
so should this be closed?

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues labels Sep 13, 2019
@Tyriar Tyriar added this to the Backlog milestone Sep 13, 2019
@ChaosGT
Copy link

ChaosGT commented Sep 17, 2019

I've got the same problem, it's described here:
#81023
I dont think it's the PowerShell's problem. If you change the shell to cmd or wsl, the bug still exists.

@ChaosGT
Copy link

ChaosGT commented Sep 17, 2019

A temporary solution is to RUN instead of DEBUG.
Right click the python editor -> choose Run Python file in terminal.

@ChaosGT
Copy link

ChaosGT commented Sep 17, 2019

oh, I just noticed the github link to powershell now that it is highlighted, looks like I should have posted it there
EDIT: PowerShell/PSReadLine#1039
so should this be closed?

It's not powershell's problem. I've updated powershell, the bug still exists.

@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2019

/duplicate #78967

@Tyriar Tyriar closed this as completed Oct 10, 2019
@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 10, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants