*** glibc detected *** python: malloc(): memory corruption (

I just finished a pandamake.py build on Ubuntu Hardy and am getting the following error when trying to run samples or anything else.

gtaylor@stimpy:~/Desktop/panda3d-1.5.2/samples/Particles$ python Tut-Steam-Example.py 
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
*** glibc detected *** python: malloc(): memory corruption (fast): 0x088c8840 ***

Oddly enough, pview works just fine with no arguments:

gtaylor@stimpy:~/Desktop/panda3d-1.5.2/doc$ pview
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
117 frames in 2.24114 seconds.
52.2056 fps average (19.155ms)

Am I being a stupid newbie?

Hmm. Is it possible you have multiple versions of python installed, and you’re running the wrong version (that is, a different version that the one Panda configured itself for)?

I assume you can also run pview with any .egg file without crashing. If so, this points to some python misconfiguration.

David

Hello, I’m just not sure how it could be a mis-configuration. I’ve only got Python 2.5 installed, this is a pretty standard Ubuntu Hardy setup. And I figured makepanda.py was smart enough to get this handled without an issue.

I certainly agree this shouldn’t have happened. I don’t remember anything like this happening before.

But if panda runs fine outside of python, and crashes immediately when run within python, it follows that something’s wrong with python, or with the interface between panda and python. The first obvious guess is the wrong python version. If you’re absolutely sure you only have one version of python, that leaves that out. I suppose you only have the one version of panda also?

Can you do other, simpler tasks within python? For instance, can you just import DirectStart and admire the gray screen? Can you do more complex tasks within pview, like view any egg files? The answers to these questions may help narrow down the problem. For instance, it’s possible that it’s not a problem with python at all; maybe there’s just a problem with the libjpeg library, and it crashes the first time you load a model with a jpeg image applied to it.

David

Hrmm, now that you mention it, I did try to install the old gutsy package earlier, but removed it when it too errored out. I did a dpkg --purge and figured it’d clean everything up, but perhaps something is left over. I’ll purge the newly installed .deb that I packaged and see if I can find any leftovers. Any ideas for files to find/delete aside from stuff with “panda” in the name?

get the old package … look at the file list … delete thouse files…

It looks like I can pview models with bitmaps and such without a hitch.

As far as testing the minimal case, the following in a .py file by itself run with python test.py crashes as well with the same error:

import direct.directbase.DirectStart
run()

I have also verified that all of the old files from the gutsy deb were cleaned up just fine. I don’t think there’s a version mixing.

To be sure, you can try uninstalling the hardy deb, delete everything in /usr/lib/panda3d and /usr/share/panda3d, and install your hardy .deb again.

Hmm, I remember having something similar before, but I fixed it by rebooting my computer. Might sound stupid and unnecessary, but can you try rebooting after you installed the .deb? :slight_smile: