This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: conhost.exe crashes when pasting 230 characters into python
Type: crash Stage:
Components: Windows Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, leos
Priority: high Keywords:

Created on 2010-02-24 01:23 by leos, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg99985 - (view) Author: Leo Shklovskii (leos) Date: 2010-02-24 01:23
I just upgraded to Windows 7, reinstalled all of my environment and am running into a completely crazy issue.

The repro is: cmd.exe -> python.exe -> Paste in a string more than 230 chars.

conhost.exe crashes and I get an error that ends up in the error log:
Log Name:      Application
Source:        Application Error
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
Description:
Faulting application name: conhost.exe, version: 6.1.7600.16385, time
stamp: 0x4a5bc271
Faulting module name: conhost.exe, version: 6.1.7600.16385, time
stamp: 0x4a5bc271
Exception code: 0xc0000005
Fault offset: 0x000048ca
Faulting process id: 0x1aa8
Faulting application start time: 0x01cab4e450b97766
Faulting application path: C:\Windows\system32\conhost.exe
Faulting module path: C:\Windows\system32\conhost.exe
Report Id: 9c6afd6c-20d7-11df-bbd8-e390d387a902 

I'd think its not python, however, I'm able to paste into the cmd.exe shell without any problem and into other apps running from the command line.

This is python 2.6.4, from the installer at python.org. Windows 7 32-bit.

Please let me know what other info I can provide and I'm happy to try out a debug build if needed.
msg99998 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-02-24 03:39
I'm not able to reproduce this any of the python.org installers, or the current trunk. I am running 64-bit Windows 7, though, whereas you are running 32-bit. I don't imagine there should be a difference, but I'll try to obtain a 32-bit box and see if I can catch this.

It would appear based on what you say that you have a fairly fresh installation. Have you done any customization to the theme or anything relating to the command window? conhost.exe apparently hosts the command window to fully support themes and drag-and-drop in a secure method, although maybe it's not so secure in your case.
msg100000 - (view) Author: Leo Shklovskii (leos) Date: 2010-02-24 04:11
The only serious tweaking I've done has been to disable cleartype and completely remove Segoe UI. Adobe Photoshop didn't react nicely to that; it is possible that there's something in conhost that's hardcoded to Segoe as well.

I'm not seeing this behavior on my desktop (everything pastes in cleanly) so I'm starting to dig in and figure out what the diffs are in my two setups. 

Is there a debug build of python for windows available or some other way to trace this crash?
msg100002 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-02-24 04:41
I did both of those things and I'm still not able to reproduce it. Do you have any specific language settings enabled? 

One thing I meant to ask in my last message was if you had a copy of what you tried to paste into the window. I've pasted a 500 character string of "a" repeated, and 500 of "ñ" in case this was a Unicode issue. Neither caused a problem.

As for a debug build, we don't provide one anywhere. If you are interested in creating a debug build, http://www.python.org/dev/faq/ has instructions for downloading the source so you could make your own.
msg100005 - (view) Author: Leo Shklovskii (leos) Date: 2010-02-24 05:03
I've downloaded the source and created a debug build. I can't reproduce the issue on the debug build (although a bunch of binary dependencies failed since I don't have sources for them).

The string I'm pasting in is:

['01776', '02210', '02468', '02482', '02719', '03782', '03842', '04849', '05641', '05673', '06001', '06460', '06722', '06804', '06907', '07076', '07405', '07718', '08081', '10018', '10523', '10708', '10916', '11385', '14475', '14532']

So no fancy unicode or anything else.

I'm running US English. I'm going to pull down a fresh install of python and try to re-install modules until I can repro this.
msg100007 - (view) Author: Leo Shklovskii (leos) Date: 2010-02-24 05:29
Ok, I've traced this down to the pyreadline package. Specifically 1.5 - http://pypi.python.org/pypi/pyreadline/1.5 - I really appreciate your help Brian and I'm sorry to have wasted your time. I'm filing a bug with the pyreadline developer.
msg100035 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-02-24 14:54
No worries.
Closing as invalid.
History
Date User Action Args
2022-04-11 14:56:58adminsetgithub: 52255
2010-02-24 14:54:05brian.curtinsetstatus: open -> closed
resolution: not a bug
messages: + msg100035
2010-02-24 05:29:15leossetmessages: + msg100007
2010-02-24 05:03:50leossetmessages: + msg100005
2010-02-24 04:41:29brian.curtinsetmessages: + msg100002
2010-02-24 04:11:25leossetmessages: + msg100000
2010-02-24 03:39:41brian.curtinsetmessages: + msg99998
2010-02-24 01:30:15r.david.murraysetpriority: high
2010-02-24 01:23:15leoscreate