cnkiexpress / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

IOError thrown by sys.stderr.write in naclports/python when the terminal is nor resized #186

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get the naclports python package (e.g. download 
http://commondatastorage.googleapis.com/naclports/builds/pepper_40/trunk-154-gea
cd680/publish/python/pnacl/python.zip and unzip it)
2. Comment out "this.processManager.onTerminalResize(width, height);"  in 
NaClTerm.prototype.onTerminalResize (currently line 255).
3. Load the unpacked extension into Chrome.
4. Click on the "Python" launcher icon.
5. import sys
6. sys.stderr.write('A\n')

What is the expected output? What do you see instead?
The expected output is a single line containing "A". The Actual output is:

A
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 0] Error

Note that "A" is still printed. Any subsequent writing to stderr works without 
any problems (no more exceptions). Interestingly, there is no issue with 
writing to stdout (although they point to the same terminal).

What version of the product are you using? On what operating system?
Chrome 39 (64-bit)
Linux

Original issue reported on code.google.com by petrcer...@chromium.org on 16 Jan 2015 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by sbc@google.com on 21 Jan 2015 at 10:22