Python crashes on segmentation error
rusi
rustompmody at gmail.com
Thu Dec 1 00:32:30 EST 2011
On Dec 1, 3:29 am, Terry Reedy <tjre... at udel.edu> wrote:
> On 11/30/2011 7:58 AM, Christian Heimes wrote:
>
>
>
>
>
>
>
>
>
> > Am 30.11.2011 11:42, schrieb Ben Richardson:
> >> Python crashes every time i run the following command…
>
> >>>>> import cv
> >> Segmentation fault: 11
>
> >> Python quit unexpectedly - any help would be greatly appreciated -
> >> thankyou in advance :)
>
> >> Here is crash report…
> > [...]
>
> >> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> >> 0 ??? 000000000000000000 0 + 0
> >> 1 org.python.python 0x00000001006c7885 PyImport_Import
> >> + 121
> >> 2 org.python.python 0x00000001006c7a1e
> >> PyImport_ImportModule + 32
> >> 3 cv.so 0x00000001004f5082 initcv + 18
> >> 4 org.python.python 0x00000001000dc071
> >> _PyImport_LoadDynamicModule + 177
>
> > It looks like you have a faulty 3rd party library with an extension
> > module called cv.so that is causing the segfault. The segfault occurs
> > either inside or during the import of the cv module. initcv() is the
> > init function of the cv module that is called automatically during the
> > import.
>
> In other words, contact the authors of the cv module. Or perhaps first
> check to make sure that the cv.so build you are running is intended to
> be compatible with the Python build you are running.
>
> --
> Terry Jan Reedy
IOW python is a very safe language when python means python
It can be very unsafe when it includes and tries to link carelessly
written C.
A safer intermediate option may be to try via ctypes
[Of course assuming that clarifying from the authors of cv what is
their intended use scenario is somehow a non-option]
More information about the Python-list
mailing list