Any one up for OSX work.

Return to Compiling or Editing the Panda Source

Postby paul » Fri May 05, 2006 12:59 am

Okay I ran genPyCode and it generated a bunch of stuff :)

But now I get the following:

>>> import direct.directbase.DirectStart
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
python(20592) malloc: *** Deallocation of a pointer not malloced: 0x285ccd8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:display: loading display module: libpandagl.dylib
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
:05-05-2006 16:09:28 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
:display: Unable to set window properties: size=(800, 600) title="Panda" !undecorated open !cursor_hidden
:audio(error): LoadLibrary() failed, will use NullAudioManager
:audio(error): dlopen(libmiles_audio.dylib, 6): image not found
:audio: NullAudioManager
:audio: NullAudioManager
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2865c88; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:audio: NullAudioManager
:audio: NullAudioManager
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2865cb8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:05-05-2006 16:09:29 ShowBase(info): __dev__ == 0
>>>


That doesn't look so healthy... but I get a window of 800x600 with nothing in it... which seems fine, but then if I do the next step of the tutorial (this is the first tutorial in the panda docs):

>>> run()
:util(warning): Adjusting global clock's real time by -127.476 seconds.
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2866ec0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2866ed8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:05-05-2006 16:11:35 ShowBase(info): Got window event: origin=(0, 0) size=(800, 600) title="Panda" !undecorated !fullscreen foreground !minimized open !cursor_hidden
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2862128; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:05-05-2006 16:11:35 ShowBase(info): Got window event: origin=(0, 0) size=(800, 600) title="Panda" !undecorated !fullscreen foreground !minimized open !cursor_hidden
python(20592,0xa000ed98) malloc: *** Deallocation of a pointer not malloced: 0x2862160; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Abort trap


Definitely not healthy... is this behavior familiar to anyone here?

Thanks for your help.
paul
 
Posts: 10
Joined: Mon May 01, 2006 4:23 am

Postby drwr » Fri May 05, 2006 11:15 am

Yikes! I've never seen that before--how about you, Roger, did you ever come across that while developing OSX?

I assume pview still runs fine without reporting these error messages?

It certainly sounds like something's out of sync between panda and direct. There might be a problem in the large elapsed time (days?) between when you checked out panda and when you checked out direct, if some low-level changes have been added in the interim--if you haven't done this already, it might be a good idea to cvs update all three trees (dtool, panda, direct), and then make install all three trees again. Maybe make clean install for good measure.

Other things you can try: you can follow the suggested advice, and set MallocHelp to try to figure out who's generating the errant free(); that might give us a clue. I know nothing about this MallocHelp thing; I guess that's an OSX feature.

Also, does it only happen when you open a window? For instance, suppose you set "window-type none" in your Config.prc file--do you still get error messages like this when you start?

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby Fixer » Fri May 05, 2006 4:30 pm

Apple's manpage on malloc (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/malloc.3.html) describes MallocHelp and the other environment variables.

Essentially, apple's build of the malloc tools (maybe only the debug or developer build; I can't remember) is instrumented to cause it to spit out useful diagnostic information if it finds a handful of environment variables set. If you set the MallocHelp environment variable to any value, you will get the full list of options (which is also documented in the above manpage).

I do wonder at that message, though, because it sounds like something is trying to free memory it doesn't own. Maybe this message should be showing up in Windows and/or Linux and isn't? I'm not as familiar with either of their malloc packages as I am OS X... how do they respond if you pass a random number to free()?
Fixer
 
Posts: 190
Joined: Tue May 17, 2005 7:03 pm
Location: Pittsburgh, PA

Postby drwr » Fri May 05, 2006 5:05 pm

They generally corrupt the heap and then crash messily. If something like this were happening on one of the standard builds, we'd certainly know about it by now. This has to be a problem specific to this build.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby Lithidd » Sat May 06, 2006 11:18 am

I'm following along eagerly; I've been looking to play with Python and some 3d stuff for a while. I've previously been toying around with Ogre3D, but the Ogre python bindings have been something of a trial to get working under Mac OS X (which is where I do my dev work).

I've gotten to the same place, so results are definitely repeatable, but I'm stuck as to how to proceed.
Lithidd
 
Posts: 2
Joined: Sat May 06, 2006 11:15 am

Postby Roger » Sat May 06, 2006 1:28 pm

Wow No I have not experienced this problem. Were would I start with this.

Hmm Off the top of my head .. Paul your checkout of direct is at least a week difrent from the lower branches of the tree. May be wotj looking at time sinking your checkout. Besides that hmmmmm

Just an Idea..

read the manpage 3 for malloc

Either get it to core or run python under gdb and set it to abort on error
Back trace and see if there are any clues in there!

I can assure you I had some big project up and running in panda.


Roger
Roger
 
Posts: 31
Joined: Thu Feb 16, 2006 3:59 pm

Postby Fixer » Thu May 11, 2006 7:11 am

Hey everyone!

I'm glad to see this port coming along so well!

I've been trying to follow along, but I seem to have gotten stuck while making the main panda branch:

Code: Select all
cd ./src/putil && make install
g++ -ftemplate-depth-30 -c -o Opt3-osx/putil_putil_composite1.o -I. -I/Users/mtomczak/Panda3d/panda3d/panda -I../express -I../pandabase -I/usr/local/panda/include -I/Library/Frameworks/Python.framework/Headers    -O2 putil_composite1.cxx
In file included from animInterface.cxx:19,
                 from putil_composite1.cxx:1:
animInterface.h:25:23: error: cycleData.h: No such file or directory
animInterface.h:26:29: error: cycleDataReader.h: No such file or directory
animInterface.h:27:29: error: cycleDataWriter.h: No such file or directory
animInterface.h:28:28: error: pipelineCycler.h: No such file or directory
In file included from animInterface.cxx:20,
                 from putil_composite1.cxx:1:
clockObject.h:29:34: error: cycleDataStageReader.h: No such file or directory
clockObject.h:31:20: error: thread.h: No such file or directory
In file included from animInterface.cxx:21,
                 from putil_composite1.cxx:1:
bamReader.h:35:32: error: pipelineCyclerBase.h: No such file or directory


I recently synced to the head of the CVS repository, and I'm afraid I can't find these files anywhere. Does anyone know where I should be looking?

Thanks,
Mark
Fixer
 
Posts: 190
Joined: Tue May 17, 2005 7:03 pm
Location: Pittsburgh, PA

Postby drwr » Thu May 11, 2006 11:02 am

Did you put -d on the cvs update command to get new directories? These files are all in the new directory named panda/src/pipeline.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby Fixer » Sat May 13, 2006 8:13 am

Ah, that's got it! Thank you for the help. I always forget the nooks and crannies in CVS that other source control systems assume should be done automatically.

"CVS: The Worst Solution That Is Still Better Than Everything That Came Before It" :wink:
Fixer
 
Posts: 190
Joined: Tue May 17, 2005 7:03 pm
Location: Pittsburgh, PA

Postby Fixer » Sun May 14, 2006 10:53 am

Now that my CVS repository contains all the needed pieces, I was also able to run pview. It looks good, though we may have a slight user interface problem: a lot of people are still going to have Macintoshes with only (gasp!) one mouse button. So I can't rotate or scale my pview image.

Perhaps I can add some compile-time hooks to at least get pview to recognize meta-keys as substitutes for right and middle-click.

Take care,
Mark
Fixer
 
Posts: 190
Joined: Tue May 17, 2005 7:03 pm
Location: Pittsburgh, PA

Postby kaweh » Sun May 14, 2006 6:30 pm

i got cvs today and got pview running on 10.4

there was just one change i had to do to "dtool/Config.osx.pp" to get pass a compilation problem of the panda tree (the problem was described in this thread, seems the fixe didn't make it into CVS?):

line 17, Config.osx.pp

#define SYSTEM_IGATE_FLAGS -D__ppc__ -D__const=const -Dvolatile -D__BIG_ENDIAN__ -D__inline__=inline -D__GNUC__ -D__FLT_EVAL_METHOD__=0

(i just added -D__FLT__EVAL_METHOD__=0 define)

but i'm not quite sure how to proceed from here.

i cd'd into the "direct" subdirectory

ppremake
make install

and i still seem not to have the correct "direct" available (though it seems i have libdirect).

Python 2.4.3 (#1, Mar 30 2006, 11:02:15)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import direct
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named direct
>>> import libdirect
>>>

running genPyCode seems to stumble because of that

g5:~ kaweh$ genPyCode
Traceback (most recent call last):
File "/usr/local/panda/bin/genPyCode.py", line 9, in ?
from direct.ffi import DoGenPyCode
ImportError: No module named direct.ffi
g5:~ kaweh$

any hints?

great work by everyone involved! i hope i will be able to run the tutorial soon. ;)
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby kaweh » Mon May 15, 2006 1:49 pm

ok, i figured that "direct" is not only a c++ module, but a python module. it seems it needs to be installed into "/usr/local/panda/lib" by hand (or - the way i did it" added to PYTHONPATH). is that correct?

running genPyCode does more now, though i had to edit genPyCode.py with my setup. i had to remove libtoontown (can't find) and libotp (can't find either) from genPyCode.py

DoGenPyCode.codeLibs = r'libpandaexpress libpanda libpandaphysics libdirect libpandafx libprc'.split()

now if i start genPyCode.py i get even an output... until it fails with libprc.

g5:~ kaweh$ genPyCode
Importing code library: libpandaexpress
Found extensions for class: Ramfile
Found extensions for class: StreamReader
Found extensions for class: HTTPChannel
Importing code library: libpanda
Found extensions for class: NodePath
Found extensions for class: Mat3
Found extensions for class: VBase4
Found extensions for class: NodePathCollection
Found extensions for class: VBase3
Importing code library: libpandaphysics
Importing code library: libdirect
Found extensions for class: CInterval
Importing code library: libpandafx
Importing code library: libprc
Traceback (most recent call last):
File "/usr/local/panda/bin/genPyCode.py", line 27, in ?
DoGenPyCode.run()
File "/Users/kaweh/Projects/panda3d/direct/src/ffi/DoGenPyCode.py", line 290, in run
generateNativeWrappers()
File "/Users/kaweh/Projects/panda3d/direct/src/ffi/DoGenPyCode.py", line 253, in generateNativeWrappers
exec('import %s as module' % moduleName)
File "<string>", line 1, in ?
ImportError: Loaded module does not contain symbol _initlibprc

this is all from CVS yesterday and i tried to follow the instructions in this thread as good as possible (as stated, i got pview to run).

now i'm stuck. i looked at dtool to understand libprc but to no avail till now.

any hints are appreciated.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby drwr » Mon May 15, 2006 5:28 pm

ok, i figured that "direct" is not only a c++ module, but a python module. it seems it needs to be installed into "/usr/local/panda/lib" by hand (or - the way i did it" added to PYTHONPATH). is that correct?

That is correct. If you define:
Code: Select all
#define INSTALL_PYTHON_SOURCE 1

in your Config.pp file, ppremake is supposed to generate Makefiles that copy the Python files into /usr/local/panda/lib. Or you can just put the source directory on your PYTHONPATH, as you have done.

running genPyCode does more now, though i had to edit genPyCode.py with my setup. i had to remove libtoontown (can't find) and libotp (can't find either) from genPyCode.py

libotp and libtoontown are closed-source modules used within the VR Studio. They are not part of the public Panda distribution, and should not be instrumented. They were added to genPyCode.py when you ran ppremake, based on the definition of GENPYCODE_LIBS in your Config.pp. An early post in this thread by Roger incorrectly indicated that this GENPYCODE_LIBS line should include libtoontown and libotp; a later post corrected this. You should correct GENPYCODE_LIBS and re-run ppremake and then make install, to install a correct genPyCode.py.

libprc, similarly, doesn't belong on this list. Is that library mentioned by GENPYCODE_LIBS? Remove it if it is. If it's not explicitly mentioned by GENPYCODE_LIBS, I'm not sure how it got into your genPyCode.py file.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby kaweh » Tue May 16, 2006 12:30 pm

thanks a million, david. worked out great.

i can now do a

import direct.directbase.DirectStart
run()


from Python 2.4 and it works! yay!

next step: tutorial 1

import direct.directbase.DirectStart

#Load the first environment model
print 'start'
environ = loader.loadModel("/Users/kaweh/Projects/panda3d/models/panda.egg")
print 'done'


it never reaches the "print 'done'" statement, but i get a Abort Trap.

g5:~/Projects/pandatest kaweh$ p pandatest.py
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
:05-16-2006 19:43:01 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
osxGraphicsStateGuardian::osxGraphicsStateGuardian()
:display: Unable to set window properties: size=(800, 600)
:audio(error): LoadLibrary() failed, will use NullAudioManager
:audio(error): dlopen(libmiles_audio.dylib, 6): image not found
:audio: NullAudioManager
:audio: NullAudioManager
Python(21039) malloc: *** Deallocation of a pointer not malloced: 0x281def8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:audio: NullAudioManager
:audio: NullAudioManager
Python(21039) malloc: *** Deallocation of a pointer not malloced: 0x281df28; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:05-16-2006 19:43:02 ShowBase(info): __dev__ == 0
start
:loader: loading file type module: pandaegg
:egg2pg: Reading /Users/kaweh/Projects/panda3d/models/panda.egg
Abort trap


it seems to hang in the loading code. any hints how to debug that?

i got CVS for all modules at the same time, so it's most probably not a de-sync (on saturday or sunday).

anyways i will go on testing this until we have that baby running on OS X. :)

ps: pview loads the model without any problems. with pview i get this output

:egg2pg: Reading ./models/panda.egg
:gobj: Loading texture /Users/kaweh/Projects/panda3d/models/maps/panda_torso.rgb
:gobj: Loading texture /Users/kaweh/Projects/panda3d/models/maps/panda_head.rgb
:gobj: Loading texture /Users/kaweh/Projects/panda3d/models/maps/panda_viser.rgb
:gobj: Loading texture /Users/kaweh/Projects/panda3d/models/maps/panda_hat.rgb
:egg2pg: Flattened 1 nodes.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby drwr » Tue May 16, 2006 1:35 pm

So you're hitting the same problem that stopped paul, earlier in this thread.

It's interesting that it works fine in pview, but fails when Python gets into the mix.

What version of gcc do you have? We had a similar problem when we first went to Fedora Core 4 on Linux, which shipped with gcc 4.0.1; a later version of gcc turned out to solve the problem.
Code: Select all
gcc --version


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby kaweh » Tue May 16, 2006 4:11 pm

seems i have an older version. i'll check my Xcode and tools version on my machine and see what i find out.

g5:~/Projects/panda3d kaweh$ gcc --version
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby kaweh » Tue May 16, 2006 4:19 pm

i have Xcode 2.1 (with gcc 4.0.0) and currently i download Xcode 2.2.1 (with at least gcc 4.0.1), i will recompile and let you know the results.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby kaweh » Tue May 16, 2006 9:03 pm

unfortunatly moving to Xcode 2.2.1 and gcc 4.0.1 didn't solve the problem. from python the loader crashes, pview is fine with the same model.

g5:~/Projects/pandatest kaweh$ gcc --version
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5250)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

it's late, i'll see what i can find out tomorrow. ;)
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby drwr » Wed May 17, 2006 1:17 am

4.0.0 and 4.0.1 both demonstrated the problem in FC4. Is there an earlier version of gcc available?

Roger, what version of gcc were you using?

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby kaweh » Wed May 17, 2006 1:22 am

i see gcc-3.3 on my system, is that version usable. can this be set for compilation (sorry, i'm not really an unix expert)?

thanks!
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby Roger » Wed May 17, 2006 4:22 pm

Well .. Let me try the same test you are doing ..
1. Ill grab head of tree.
2. Build dtool pand and direct
3. see if pview laods egg file.
4. See if python loads eggfile. Hop I can do all this from a telnet session ;)


Report Results and let you all know .. go from there

Roger
Roger
 
Posts: 31
Joined: Thu Feb 16, 2006 3:59 pm

Postby Roger » Wed May 17, 2006 5:36 pm

hmmm Yes really not sure were to go ..

I did what you did and all seems to be ok..


python test.py
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
osxGraphicsPipe
(2 aux display modules not yet loaded.)
:05-17-2006 15:25:21 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
osxGraphicsStateGuardian::osxGraphicsStateGuardian()
:display: Unable to set window properties: size=(1280, 1024)
:audio(error): LoadLibrary() failed, will use NullAudioManager
:audio(error): dlopen(libmiles_audio.dylib, 6): image not found
:audio: NullAudioManager
:audio: NullAudioManager
:audio: NullAudioManager
:audio: NullAudioManager
:05-17-2006 15:25:21 ShowBase(info): __dev__ == 0
start
:loader: loading file type module: pandaegg
:egg2pg: Reading ./panda.egg
:gobj: Loading texture /Users/roger/player/models/maps/panda_torso.rgb
:gobj: Loading texture /Users/roger/player/models/maps/panda_head.rgb
:gobj: Loading texture /Users/roger/player/models/maps/panda_viser.rgb
:gobj: Loading texture /Users/roger/player/models/maps/panda_hat.rgb
:egg2pg: Flattened 1 nodes.
done
:display: Closing osxGraphicsWindow
osxGraphicsStateGuardian::~osxGraphicsStateGuardian()



g++ -v
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)


Well hmm looks like we are in trouble before we hit the loading message.
That line that reads
Python(21039) malloc: *** Deallocation of a pointer not malloced: 0x281def8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug


Means we are in sum deep trouble. Do you all get this when you just load the module

I something like this .. test.py file

import direct.directbase.DirectStart
print 'start'
print 'done'

Roger
Roger
 
Posts: 31
Joined: Thu Feb 16, 2006 3:59 pm

Postby kaweh » Thu May 18, 2006 6:01 am

i was wondering: which version of Python are you using exactly? because i use the universal build (though on a G5) which is already 2.4.3, but there is a PPC-only 2.4.1 version. maybe there is a problem, we are not aware of?

Code: Select all
g5:~/Projects/pandatest kaweh$ python
Python 2.4.3 (#1, Mar 30 2006, 11:02:15)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'2.4.3 (#1, Mar 30 2006, 11:02:15) \n[GCC 4.0.1 (Apple Computer, Inc. build 5250)]'


and if i try the reduced version (just import direct.directbase.DirectStart), i get following output. as it says "Python" of the beginning of the each problematic malloc, it might be a version clash between Python and panda? other than that the output would be the same as yours.

Code: Select all
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
:05-18-2006 13:14:32 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
osxGraphicsStateGuardian::osxGraphicsStateGuardian()
:display: Unable to set window properties: size=(800, 600)
:audio(error):   LoadLibrary() failed, will use NullAudioManager
:audio(error):     dlopen(libmiles_audio.dylib, 6): image not found
:audio: NullAudioManager
:audio: NullAudioManager
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a8ef8; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:audio: NullAudioManager
:audio: NullAudioManager
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a8f28; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
:05-18-2006 13:14:32 ShowBase(info): __dev__ == 0
start
done
:display: Closing osxGraphicsWindow
osxGraphicsStateGuardian::~osxGraphicsStateGuardian()
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a8f40; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a8f10; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a9528; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a9518; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a9548; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Python(1468) malloc: ***  Deallocation of a pointer not malloced: 0x28a9538; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby kaweh » Thu May 18, 2006 6:15 am

there is a update package for Python 2.4.3 on http://pythonmac.org/packages/py24-fat/. i got it, but it doesn't change the behaviour.

i still wonder if that's a Python problem.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby kaweh » Fri May 19, 2006 6:38 am

my first gdb debugging ever, so i'm not sure if this is helpful at all:

Code: Select all
(gdb) bt
#0  0x90047e4c in kill ()
#1  0x9012dff4 in abort ()
#2  0x00590868 in dlfree (mem=0x0) at dlmalloc.c:4252
#3  0x2c96bda8 in load_egg_file (filename=@0x1, cs=3221221024) at load_egg_file.cxx:99
#4  0x2c96bea8 in LoaderFileTypeEgg::load_file (this=0x0, path=@0xa000416c) at loaderFileTypeEgg.cxx:74
#5  0x03490fbc in Loader::load_file (this=0x1, filename=@0x28aa2b0, options=@0x28a9da0) at loader.cxx:469
#6  0x0361b544 in Dtool_Loader_load_sync_1093 (self=0x0, args=0x28a9da0, kwds=0x28a8eb0) at ./loader.I:130
#7  0x0028b7fc in PyEval_EvalFrame (f=0x607fd0) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/ceval.c:3563
#8  0x0028da5c in PyEval_EvalCodeEx (co=0x16c56a60, globals=0x0, locals=0x25, args=0x60812c, argcount=2, kws=0x6088e4, kwcount=0, defs=0x16c3221c, defcount=2, closure=0x0) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/ceval.c:2736
#9  0x0028ba18 in PyEval_EvalFrame (f=0x608790) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/ceval.c:3656
#10 0x0028da5c in PyEval_EvalCodeEx (co=0x4d420, globals=0x0, locals=0x25, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/ceval.c:2736
#11 0x0028dbe4 in PyEval_EvalCode (co=0x0, globals=0x0, locals=0xa000416c) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/ceval.c:484
#12 0x002b5ba8 in PyRun_FileExFlags (fp=0xa000db44, filename=0xbffff8b1 "pandatest.py", start=2, globals=0x1fa50, locals=0x1fa50, closeit=1, flags=0x4d420) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/pythonrun.c:1265
#13 0x002b5dbc in PyRun_SimpleFileExFlags (fp=0xa000db44, filename=0xbffff8b1 "pandatest.py", closeit=1, flags=0xbffff60c) at /Volumes/Data/Users/ronald/Universal/python24-fat/Python/pythonrun.c:860
#14 0x002c0bfc in Py_Main (argc=-2147483648, argv=0xbffff778) at /Volumes/Data/Users/ronald/Universal/python24-fat/Modules/main.c:501
#15 0x0000257c in _call_objcInit () at /SourceCache/Csu/Csu-58/crt.c:361
#16 0x00002424 in _start (argc=2, argv=0xbffff778, envp=0xbffff784) at /SourceCache/Csu/Csu-58/crt.c:205


i looked at the line in code and examined the variables in gdb. everything seemed fine as far as i can tell. there is something fishy happening. :)
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby Roger » Fri May 19, 2006 11:51 am

Well if I am reading this right.

dlfree (mem=0x0)

We are freeing a null pointer some where.

Hmmmmmmmmm

Roger
Roger
 
Posts: 31
Joined: Thu Feb 16, 2006 3:59 pm

Postby drwr » Fri May 19, 2006 11:54 am

Ah, I begin to understand. There is something fishy happening there; we had to put in a hack to work around an apparent compiler bug in gcc.
Put:
Code: Select all
#define DO_MEMORY_USAGE

in your Config.pp, then ppremake and make install everywhere (e.g. dtool, panda, direct, and/or pandatool).

This will turn off the need to use that hack.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby kaweh » Sat May 20, 2006 6:02 pm

thanks david. i will give this a try.

update: unfortunatly i did re-get from CVS (to get a clean env again) and now i can't compile panda anymore (and me idiot had deleted the old tree):

Code: Select all
g++ -ftemplate-depth-30 -c -o Opt2-osx/glgsg_glgsg.o -I. -I/Users/kaweh/Projects/panda3d/panda -I../cull -I../display -I../downloader -I../effects -I../event -I../express -I../glstuff -I../gobj -I../gsgbase -I../lerp -I../linmath -I../mathutil -I../pandabase -I../pgraph -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda/include -I/Library/Frameworks/Python.framework/Headers -I/usr/include   -D_DEBUG -Wall -g -O2 glgsg.cxx
../glstuff/glGraphicsStateGuardian_src.cxx: In destructor 'virtual GLGraphicsStateGuardian::~GLGraphicsStateGuardian()':
../glstuff/glGraphicsStateGuardian_src.cxx:282: error: no matching function for call to 'GLGraphicsStateGuardian::GraphicsStateGuardian()'
../display/graphicsStateGuardian.h:72: note: candidates are: virtual GraphicsStateGuardian::~GraphicsStateGuardian()
make[1]: *** [Opt2-osx/glgsg_glgsg.o] Error 1
make: *** [install-glgsg] Error 2


as it's late here in vienna, i'll try to fix this tomorrow.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

Postby drwr » Sat May 20, 2006 8:25 pm

This sort of thing happens from time to time when you're working on the CVS trunk. I just checked in a fix.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby kaweh » Sun May 21, 2006 9:36 am

unfortunatly that didn't help.

again pview has no problem:

Code: Select all
g5:~/Projects/pandatest kaweh$ pview
:display: loading display module: libpandagl.dylib
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
osxGraphicsStateGuardian::osxGraphicsStateGuardian()
:display: Unable to set window properties: size=(800, 600)
:display: Closing osxGraphicsWindow
3125 frames in 6.22945 seconds.
501.649 fps average (1.99342ms)
g5:~/Projects/pandatest kaweh$


but the situation within the python interpreter got worse:

Code: Select all
g5:~/Projects/pandatest kaweh$ python
Python 2.4.3 (#1, Apr  7 2006, 10:54:33)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import direct.directbase.DirectStart
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
:05-21-2006 16:46:58 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
osxGraphicsStateGuardian::osxGraphicsStateGuardian()
Abort trap


i get a exception i didn't have before.

gdb debugging seems to be useless now (at least for me):

Code: Select all
(gdb) file python
Reading symbols for shared libraries ... done
Reading symbols from /usr/local/bin/python...done.
(gdb) run pandatest.py
Starting program: /usr/local/bin/python pandatest.py
Reading symbols for shared libraries . done

Program received signal SIGTRAP, Trace/breakpoint trap.
0x8fe0100c in __dyld__dyld_start ()
(gdb) bt
#0  0x8fe0100c in __dyld__dyld_start ()
#1  0x00000000 in ?? ()
Cannot access memory at address 0x0
Cannot access memory at address 0xfeedface
Previous frame inner to this frame (corrupt stack?)


David, are you using dlmalloc in panda? is it possible to make panda use the normal malloc routines? or am i reading this wrongly?

Roger, i still suspect that there was a problem between Python (me using the latest unversial build) and panda. what version of python are you using exactly?

sorry, i don't have better news.
kaweh
 
Posts: 173
Joined: Thu Mar 30, 2006 7:15 am
Location: Vienna, Austria

PreviousNext

Return to Compiling or Editing the Panda Source

Who is online

Users browsing this forum: mgracer48 and 1 guest