Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python help >> modules gives segmentation fault - how to fix?

Tags:

python

Welcome to Python 2.7! This is the online help utility. ...

>> help()

help> modules

Please wait a moment while I gather a list of all available modules...

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  from gtk import _gtk

** (python:9642): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type `GdkDevice'
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk
Segmentation fault
durrantm.../dmWorkflow$ 
like image 938
Michael Durrant Avatar asked Sep 01 '12 00:09

Michael Durrant


People also ask

How do I fix segmentation fault?

See if your compiler or library can be set to check bounds on [i] , at least in debug mode. Segmentation faults can be caused by buffer overruns that write garbage over perfectly good pointers. Doing those things will considerably reduce the likelihood of segmentation faults and other memory problems.

Why does segmentation fault occur in Python?

Tip: A segmentation fault (also known as segfault) is a common condition that causes programs to crash; A segmentation fault is typically caused by a program trying to read from or write to an illegal memory location, that is, part of the memory to which the program is not supposed to have access.

What causes Sigsegv?

A SIGSEGV signal or segmentation error occurs when a process attempts to use a memory address that was not assigned to it by the MMU.


1 Answers

Unfortunately, this is a known problem when using help on Python. It currently has to import modules to inspect their docstrings and this may result in crashes if the modules execute code upon import and call third-party libraries that expect a certain execution context or that may just be buggy. Here's an open Ubuntu issue about this specific case. There are a number of open issues in the Python issue tracker about similar crashes due to help importing.

like image 185
Ned Deily Avatar answered Oct 25 '22 14:10

Ned Deily