[issue18447] Pydoc crashes on large contents

2013-07-14 Thread Torim

New submission from Torim:

If invoking pydoc either from a system shell or as a help() method in an 
interactive Python interpreter, it crashes with SIGSEGV signal at exit.
It crashes only with larger documentation contents, smaller do work as expected.

Example with numpy module docs:
1. launch Python interactive interpreter with `python'
2. type `import numpy'
3. type `help(numpy)' # large help, displayed by PAGER environment variable or 
`more' if missing
4. press `q' to quit the help
5. SIGSEGV "Segmentation  fault" received, python interpreter crashes

Note: if you move in a documentation at the end (last line), you can then 
escape (quit) anywhere without a crash

--
components: Library (Lib)
messages: 193037
nosy: torim
priority: normal
severity: normal
status: open
title: Pydoc crashes on large contents
type: crash
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue18447>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18447] Pydoc crashes on large contents

2013-07-14 Thread Torim

Torim added the comment:

Python 2.7.5
numpy 1.7.1
platform: Linux x86_64

--

___
Python tracker 
<http://bugs.python.org/issue18447>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18447] Pydoc crashes on large contents

2013-07-14 Thread Torim

Torim added the comment:

I'd agree, it looks like a duplicate of http://bugs.python.org/issue18356>Issue18356 .

--

___
Python tracker 
<http://bugs.python.org/issue18447>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18356] help(numpy) causes segfault on exit

2013-07-15 Thread Torim

Torim added the comment:

I would add even the linked solution from StackOverflow.com does not work 
reliably for me. Try to get at the end of numpy document - text vanishes and 
possibly lose chars displaying in terminal. Need to reset it.

Modified pydoc's pipepager method this way:
def pipepager(text, cmd):
"""Page through text by feeding it to another program."""
#pipe = os.popen(cmd, 'w')
import subprocess
pipep = subprocess.Popen(cmd, stdin=subprocess.PIPE, shell=True)
try:
#pipe.write(text)
#pipe.close()
pipep.communicate(text)
except IOError:
pass # Ignore broken pipes caused by quitting the pager program.


Works for me so far, although the exact cause of issue with the stock/default 
pydoc is still not known.

--
components: +Library (Lib)
nosy: +torim

___
Python tracker 
<http://bugs.python.org/issue18356>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com