[solved] Python segmentation fault on Debian

This might not technically be the correct forum, since panda does build, but the build doesn’t actually work.

I’m using the 1.6.2 source code on 32-bit Debian 5.0.3.

I built it running makepanda --everything --installer, then used dpkg -i to install the .deb file.

pview runs fine, and shows the little blue triangle.

In python, trying to

import direct.directbase.DirectStart

causes a ton of “Attempt to register type … more than once!” errors.

Then I get a few warnings from interrogatedb: Classes x and x share the same TypeHandle value (y); check class definitions.

(The classes it warns about are TypedWritable (63), TypeHandle (64), CollisionHandler (326), CollisionHandlerEvent (327), CollisionHandlerPhysical (328), CollisionHandlerPusher (331), TypedWritableReferenceCount (67), and Lens (262)).

And then it segfaults.

Here’s the stack trace from gdb:

#0 0x0808bcc8 in PyObject_GetAttrString ()
#1 0xb77dd61a in DTOOL_Call_GetPointerThisClass ()
from /home/james/download/extract/3d/panda/panda3d-1.6.2/built/lib/libp3dtoolconfig.so
#2 0xb1ef2698 in Dtool_CIntervalManager_set_event_queue_51 () from /usr/lib/panda3d/libp3direct.so
#3 0x080ced81 in PyEval_EvalFrameEx ()
#4 0x080d0685 in PyEval_EvalCodeEx ()
#5 0x08117171 in ?? ()
#6 0x09dfb410 in ?? ()
#7 0x09dfc24c in ?? ()
#8 0x00000000 in ?? ()

CVS has its own issues, but at they don’t look anywhere near this ugly. I’m tempted to work from here instead (assuming my original error went away), if 1.7’s close, but our tech lead will insist on an officially released version that he can build himself.

Does anyone have any suggestions about where I might even begin to figure out what’s going on? (I didn’t see anything that seemed related in a forum search…I apologize if I missed it, or if this really and truly belongs elsewhere).

Thanks in advance,
James

That sure does look like something went very wrong in the build. These are very low-level functions that are failing, in a way I’ve never seen them fail before.

If your cvs build is better, I’d start with that instead. What sort of errors are you seeing there? 1.7 will be released very soon.

David

Just a wild guess, but perhaps you have two copies of Python installed that somehow conflict during the build, or when running?

Today, after a reinstall and a reboot, the cvs version seems to be running fine. So I’ll run with that one.

I’m rebuilding 1.6.2 just because I’m curious. I’ll let you know how it works.

I do have both python 2.4 and 2.5 installed, but I can’t think of any way 2.4 could have gotten called.

Thanks yet again (y’all rock),
James

heyho,

python is only a symlink to python 2.5, in your case to python 2.4 :wink:

btw. runs the .deb fine for me :stuck_out_tongue:
panda3d.org/download/panda3d … y_i386.deb

That was my first guess, too, but…

$ which python
/usr/bin/python
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       9 2009-03-02 09:38 /usr/bin/python -> python2.5
-rwxr-xr-x 1 root root 1053260 2008-12-20 09:03 /usr/bin/python2.4
-rwxr-xr-x 1 root root 1175796 2009-01-04 13:07 /usr/bin/python2.5
-rwxr-xr-x 1 root root    1419 2009-01-04 13:06 /usr/bin/python2.5-config
lrwxrwxrwx 1 root root      16 2010-01-18 16:32 /usr/bin/python-config -> python2.5-config

and

$ python
Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

I’m a complete panda n00b, but I’ve been using python, linux and c++ for a while now.

The deb runs fine for me, too, at home. But our tech lead at work is the kind of guy who insists on being able to build everything by hand (and he has a bad case of “not invented here” syndrome). It’s going to be hard enough to convince him we really should be using a high level library like panda. Not being able to build it himself will be a complete deal-killer.

Thanks though,
James