A import module bug. was Re: class derivation in boost.python v2.Was Re: [C++-sig] LifetimeofPython object for a pointer argument

Min Xu minxu at sci.ccny.cuny.edu
Wed Feb 20 22:50:34 CET 2002


> I'm not sure why you changed what I sent you. The try/catch block is
> unneeded.
> 

I have deleted the try/catch portion and it core dumps as before. I
think it may not be th bug of Gnuplot. See the following examples and a
back trace for "import AA, Gnuplot".


minxu at lax6:~/research/ngf2$ python2.2 -c "import AA, Numeric"
Segmentation fault (core dumped)
minxu at lax6:~/research/ngf2$ python2.2 -c "import AA, site"
minxu at lax6:~/research/ngf2$ python2.2 -c "import AA, pdb"
Segmentation fault (core dumped)

minxu at lax6:~/research/ngf2$ python2.2 -c "import AA, Gnuplot"
Segmentation fault (core dumped)
minxu at lax6:~/research/ngf2$ gdb python2.2 core
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...(no debugging symbols found)...
Core was generated by `python2.2 -c import AA, Gnuplot'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpython2.2.so.0.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpython2.2.so.0.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...
done.

warning: Unable to set global thread event mask: generic error
[New Thread 1024 (LWP 2041)]
Error while reading shared library symbols:
Cannot enable thread event reporting for Thread 1024 (LWP 2041): generic error
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from ./AA.so...done.
Loaded symbols for ./AA.so
Reading symbols from /usr/local/lib/libbpl.so...done.
Loaded symbols for /usr/local/lib/libbpl.so
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /usr/lib/python2.2/lib-dynload/strop.so...done.
Loaded symbols for /usr/lib/python2.2/lib-dynload/strop.so
Reading symbols from /usr/lib/python2.2/lib-dynload/cStringIO.so...done.
Loaded symbols for /usr/lib/python2.2/lib-dynload/cStringIO.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/lib/python2.2/site-packages/Numeric/multiarray.so...
done.
Loaded symbols for /usr/lib/python2.2/site-packages/Numeric/multiarray.so
Reading symbols from /usr/lib/python2.2/site-packages/Numeric/_numpy.so...done.
Loaded symbols for /usr/lib/python2.2/site-packages/Numeric/_numpy.so
Reading symbols from /usr/lib/python2.2/site-packages/Numeric/umath.so...done.
Loaded symbols for /usr/lib/python2.2/site-packages/Numeric/umath.so
#0  0x00000000 in ?? ()
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0x400b33d8 in Py_GetArgcArgv () from /usr/lib/libpython2.2.so.0.0
#2  0x400b39cb in Py_GetArgcArgv () from /usr/lib/libpython2.2.so.0.0
#3  0x400b40c2 in _PyObject_GC_NewVar () from /usr/lib/libpython2.2.so.0.0
#4  0x4006dce2 in PyTuple_New () from /usr/lib/libpython2.2.so.0.0
#5  0x400a8469 in _PyImport_LoadDynamicModule ()
   from /usr/lib/libpython2.2.so.0.0
#6  0x400a8866 in _PyImport_LoadDynamicModule ()
   from /usr/lib/libpython2.2.so.0.0
#7  0x400a849d in _PyImport_LoadDynamicModule ()
   from /usr/lib/libpython2.2.so.0.0
#8  0x400a8866 in _PyImport_LoadDynamicModule ()
   from /usr/lib/libpython2.2.so.0.0
#9  0x400a9166 in PyMarshal_ReadObjectFromString ()
   from /usr/lib/libpython2.2.so.0.0
#10 0x400a8c96 in PyMarshal_ReadLastObjectFromFile ()
   from /usr/lib/libpython2.2.so.0.0
#11 0x400a2f00 in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#12 0x400a398b in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#13 0x400a4810 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#14 0x400a4395 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
---Type <return> to continue, or q <return> to quit---
#15 0x400a3e98 in PyImport_ImportFrozenModule ()
   from /usr/lib/libpython2.2.so.0.0
#16 0x400a4057 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#17 0x40087627 in _PyBuiltin_Init () from /usr/lib/libpython2.2.so.0.0
#18 0x40062aa1 in PyCFunction_Call () from /usr/lib/libpython2.2.so.0.0
#19 0x40042209 in PyObject_Call () from /usr/lib/libpython2.2.so.0.0
#20 0x4008dee2 in PyEval_CallObjectWithKeywords ()
   from /usr/lib/libpython2.2.so.0.0
#21 0x4008c0d7 in Py_MakePendingCalls () from /usr/lib/libpython2.2.so.0.0
#22 0x4008d654 in PyEval_EvalCodeEx () from /usr/lib/libpython2.2.so.0.0
#23 0x4008f95a in PyEval_EvalCode () from /usr/lib/libpython2.2.so.0.0
#24 0x400a2abb in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#25 0x400a3041 in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#26 0x400a398b in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#27 0x400a4810 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#28 0x400a43d4 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#29 0x400a3e98 in PyImport_ImportFrozenModule ()
   from /usr/lib/libpython2.2.so.0.0
#30 0x400a4057 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#31 0x40087627 in _PyBuiltin_Init () from /usr/lib/libpython2.2.so.0.0
---Type <return> to continue, or q <return> to quit---
#32 0x40062aa1 in PyCFunction_Call () from /usr/lib/libpython2.2.so.0.0
#33 0x40042209 in PyObject_Call () from /usr/lib/libpython2.2.so.0.0
#34 0x4008dee2 in PyEval_CallObjectWithKeywords ()
   from /usr/lib/libpython2.2.so.0.0
#35 0x4008c0d7 in Py_MakePendingCalls () from /usr/lib/libpython2.2.so.0.0
#36 0x4008d654 in PyEval_EvalCodeEx () from /usr/lib/libpython2.2.so.0.0
#37 0x4008f95a in PyEval_EvalCode () from /usr/lib/libpython2.2.so.0.0
#38 0x400a2abb in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#39 0x400a3041 in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#40 0x400a398b in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#41 0x400a4810 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#42 0x400a4395 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#43 0x400a3e98 in PyImport_ImportFrozenModule ()
   from /usr/lib/libpython2.2.so.0.0
#44 0x400a4057 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#45 0x40087627 in _PyBuiltin_Init () from /usr/lib/libpython2.2.so.0.0
#46 0x40062aa1 in PyCFunction_Call () from /usr/lib/libpython2.2.so.0.0
#47 0x40042209 in PyObject_Call () from /usr/lib/libpython2.2.so.0.0
#48 0x4008dee2 in PyEval_CallObjectWithKeywords ()
   from /usr/lib/libpython2.2.so.0.0
---Type <return> to continue, or q <return> to quit---
#49 0x4008c0d7 in Py_MakePendingCalls () from /usr/lib/libpython2.2.so.0.0
#50 0x4008d654 in PyEval_EvalCodeEx () from /usr/lib/libpython2.2.so.0.0
#51 0x4008f95a in PyEval_EvalCode () from /usr/lib/libpython2.2.so.0.0
#52 0x400a2abb in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#53 0x400a3041 in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#54 0x400a398b in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#55 0x400a31d9 in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#56 0x400a39ba in PyImport_ExecCodeModuleEx ()
   from /usr/lib/libpython2.2.so.0.0
#57 0x400a4810 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#58 0x400a4395 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#59 0x400a3e98 in PyImport_ImportFrozenModule ()
   from /usr/lib/libpython2.2.so.0.0
#60 0x400a4057 in PyImport_ImportModuleEx () from /usr/lib/libpython2.2.so.0.0
#61 0x40087627 in _PyBuiltin_Init () from /usr/lib/libpython2.2.so.0.0
#62 0x40062aa1 in PyCFunction_Call () from /usr/lib/libpython2.2.so.0.0
#63 0x40042209 in PyObject_Call () from /usr/lib/libpython2.2.so.0.0
#64 0x4008dee2 in PyEval_CallObjectWithKeywords ()
   from /usr/lib/libpython2.2.so.0.0
---Type <return> to continue, or q <return> to quit---
#65 0x4008c0d7 in Py_MakePendingCalls () from /usr/lib/libpython2.2.so.0.0
#66 0x4008d654 in PyEval_EvalCodeEx () from /usr/lib/libpython2.2.so.0.0
#67 0x4008f95a in PyEval_EvalCode () from /usr/lib/libpython2.2.so.0.0
#68 0x400ad5e4 in PyOS_setsig () from /usr/lib/libpython2.2.so.0.0
#69 0x400ad58f in PyOS_setsig () from /usr/lib/libpython2.2.so.0.0
#70 0x400ad179 in PyRun_StringFlags () from /usr/lib/libpython2.2.so.0.0
#71 0x400ace36 in PyRun_SimpleStringFlags () from /usr/lib/libpython2.2.so.0.0
#72 0x400b309e in Py_Main () from /usr/lib/libpython2.2.so.0.0
#73 0x08048624 in main ()
#74 0x4014f6cf in __libc_start_main () from /lib/libc.so.6
(gdb) q







More information about the Cplusplus-sig mailing list