[PD-dev] [GEM] ugly stuff found w/libMallocDebug

Me tigital at mac.com
Wed Feb 26 18:13:33 CET 2003


hi,

...I've been running GEM lately linked to libMallocDebug, which allows 
easier identification of memory related problems.  Recently it has been 
complaining about the following:

MallocDebug: free: target application attempted to free pointer that is 
not pointing to a malloc block: 0x28a6b0
MallocDebug: Call stack: (find symbols with /usr/bin/atos)
MallocDebug: Put a breakpoint at malloc_printf to diagnose.
stack backtrace: 0x012d0184 0x012d0270 0x012d0358 0x012ca7a4 0x0138ad14 
0x0138ac74 0x011fede0 0x011fe80c 0x011fef0c 0x00042184 0x00043690 
0x000422a0 0x000422a0 0x00043690 0x000422a0 0x000422a0 0x00043690 
0x000422a0 0x000422a0 0x00043690 0x000422a0 0x0004574c 0x00043398 
0x0002d780 0x000435f4 0x000427ec 0x000434c8 0x000434c8 0x000690dc 
0x00048268 0x0004a568 0x00002100 0x00001f80
MallocDebug: The address is not in memory used by the heap.

...when I use atos to find the symbols on this example, I get:

  atos -p 4913 0x012d0184
_printStack (in GEM.pd_darwin) (pix_mix.cpp:131)
  atos -p 4913 0x012d0270
_unlockedfree (in GEM.pd_darwin) (pix_mix.cpp:131)
  atos -p 4913 0x012d0358
_free (in GEM.pd_darwin) (pix_mix.cpp:131)
  atos -p 4913 0x012ca7a4
__ZdlPv (in GEM.pd_darwin) (pix_mix.cpp:131)
  atos -p 4913 0x0138ad14
__ZN9pix_image16singleImageCacheD4Ev (in GEM.pd_darwin) 
(pix_image.cpp:58)
  atos -p 4913 0x0138ac74
__ZN9pix_image16singleImageCacheD1Ev (in GEM.pd_darwin) 
(pix_image.cpp:59)
  atos -p 4913 0x011fede0
__ZN9pix_image10cleanImageEv (in GEM.pd_darwin) (pix_image.cpp:189)
  atos -p 4913 0x011fe80c
__ZN9pix_image8openMessEP7_symbol (in GEM.pd_darwin) (pix_image.cpp:71)
  atos -p 4913 0x011fef0c
__ZN9pix_image16openMessCallbackEPvP7_symbol (in GEM.pd_darwin) 
(pix_image.cpp:235)
  atos -p 4913 0x00042184
_pd_typedmess (in pd)
  atos -p 4913 0x00043690
_outlet_anything (in pd)
  atos -p 4913 0x000422a0
_pd_typedmess (in pd)
  atos -p 4913 0x000422a0
_pd_typedmess (in pd)
  atos -p 4913 0x00043690
_outlet_anything (in pd)
  atos -p 4913 0x000422a0
_pd_typedmess (in pd)
  atos -p 4913 0x0004574c
_binbuf_eval (in pd)
  atos -p 4913 0x00043398
_outlet_bang (in pd)
  atos -p 4913 0x0002d780
_bng_bang2 (in pd)

...I didn't translate any further, but the weird thing about this is 
that the first symbol is reported in pix_mix.cpp:131, which isn't even 
used in the patch!?!  (and previous encounters with the warning gave 
other sources 'unused'  in the patch)...Upon inspection, the line that 
_printStack refers to is always the last closing brace at the bottom of 
the file...

...I'm totally stumped on how to proceed tracking this, especially 
since the suggested "place a breakpoint at malloc_printf" is currently 
working, which makes things even more mysterious...

...any ideas?

l8r,
jamie





More information about the Pd-dev mailing list