Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Watch window freezes the system when Name contains non-ASCII symbols #874

Closed
alexander-pastukhov opened this issue Oct 4, 2018 · 0 comments · Fixed by #1065
Closed

Watch window freezes the system when Name contains non-ASCII symbols #874

alexander-pastukhov opened this issue Oct 4, 2018 · 0 comments · Fixed by #1065
Assignees
Labels

Comments

@alexander-pastukhov
Copy link

alexander-pastukhov commented Oct 4, 2018

Environment data

  • PTVSD version: 15.8.18241.1
  • OS and version: Windows 10 Enterprise LTSB 2016 - 64 bit
  • Python version (& distribution if applicable, e.g. Anaconda): Python 2.7
  • Using VS Code or Visual Studio: Visual Studio Community 2017 15.8.6 (VisualStudio.15.Release/15.8.6+28010.2041)

Actual behavior

When a non-ASCII symbol (e.g., Ä or Д) is entered in the Name in the Watch window during debugging, it crashes (see traceback below), freezing the system. I assume that this is Python 2 specific bug, as there are no problems with Python 3.6

Expected behavior

Should produce NameError, as in Python 3

Steps to reproduce:

  1. Pause the execution with a breakpoint.
  2. Enter Ä in the watch window.

Traceback

Traceback (most recent call last):
File "e:\software\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\wrapper.py", line 1211, in done
fut.result()
File "e:\software\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\futures.py", line 40, in result
reraise(self._exc_info)
File "e:\software\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\futures.py", line 149, in callback
x = next(it)
File "e:\software\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\wrapper.py", line 1760, in on_evaluate
msg = '\t'.join(str(s) for s in cmd_args)
File "e:\software\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\wrapper.py", line 1760, in
msg = '\t'.join(str(s) for s in cmd_args)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 0: ordinal not in range(128)

@int19h int19h self-assigned this Dec 5, 2018
int19h added a commit to int19h/ptvsd that referenced this issue Dec 6, 2018
… non-ASCII symbols

Fix microsoft#1064: test_module_events is failing on Windows

Use Unicode literals throughout wrapper.py, and fix pathname handling.

Add evaluation test for Unicode character in an expression.

Fix path pattern such that its __eq__ is used deterministically.
@int19h int19h mentioned this issue Dec 6, 2018
int19h added a commit to int19h/ptvsd that referenced this issue Dec 6, 2018
… non-ASCII symbols

Fix microsoft#1064: test_module_events is failing on Windows

Use Unicode literals throughout wrapper.py, and fix pathname handling.

Add evaluation test for Unicode character in an expression.

Fix path pattern such that its __eq__ is used deterministically.
int19h added a commit that referenced this issue Dec 6, 2018
…I symbols (#1065)

Fix #1064: test_module_events is failing on Windows

Use Unicode literals throughout wrapper.py, and fix pathname handling.

Add evaluation test for Unicode character in an expression.

Fix path pattern such that its __eq__ is used deterministically.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants