Jason8
2008-07-27 02:15:02 UTC
Hi:
What appears to be my last memory but is proving to be challenging. I
have my Framework setup so I can debug it, and all my tests run
sucesfully but I get this message when some of them run:
otest(3245,0xa0857fa0) malloc: *** error for object 0x132eb0: double
free
*** set a breakpoint in malloc_error_break to debug
So I added the break point as suggested:
(gdb) break malloc_error_break
And when it fins my breakpoint I get a stack trace that is no help. It
looks like something is being release from the autorelease pool that
is being setup automatically by my unit test system (built in
Objective-C stuff from Cocoa and XCode 3).
Can anyone comment on how I should tear this apart to find what is
being double freed? I'm really grasping at straws here. As I don't use
any autorelease in my code it must be something more 'automatic' that
Cocoa is doing or how I'm using it. All my releases and retains seem
in balance and I don't get any EXC_BAD_ACCESS messages - all runs
fine.
(gdb) backtrace
#0 0x96440131 in malloc_error_break ()
#1 0x9643b11f in szone_error ()
#2 0x9635f743 in szone_free ()
#3 0x918960e9 in -[NSConcreteMutableData dealloc] ()
#4 0x9186d57f in NSPopAutoreleasePool ()
#5 0x20104abe in -[SenTestCase performTest:] ()
#6 0x20104232 in -[SenTest run] ()
#7 0x20107768 in -[SenTestSuite performTest:] ()
#8 0x20104232 in -[SenTest run] ()
#9 0x20107768 in -[SenTestSuite performTest:] ()
#10 0x20104232 in -[SenTest run] ()
#11 0x201064f3 in +[SenTestProbe runTests:] ()
#12 0x0000283b in ?? ()
#13 0x00002b26 in ?? ()
#14 0x0000254e in ?? ()
#15 0x000024da in ?? ()
What appears to be my last memory but is proving to be challenging. I
have my Framework setup so I can debug it, and all my tests run
sucesfully but I get this message when some of them run:
otest(3245,0xa0857fa0) malloc: *** error for object 0x132eb0: double
free
*** set a breakpoint in malloc_error_break to debug
So I added the break point as suggested:
(gdb) break malloc_error_break
And when it fins my breakpoint I get a stack trace that is no help. It
looks like something is being release from the autorelease pool that
is being setup automatically by my unit test system (built in
Objective-C stuff from Cocoa and XCode 3).
Can anyone comment on how I should tear this apart to find what is
being double freed? I'm really grasping at straws here. As I don't use
any autorelease in my code it must be something more 'automatic' that
Cocoa is doing or how I'm using it. All my releases and retains seem
in balance and I don't get any EXC_BAD_ACCESS messages - all runs
fine.
(gdb) backtrace
#0 0x96440131 in malloc_error_break ()
#1 0x9643b11f in szone_error ()
#2 0x9635f743 in szone_free ()
#3 0x918960e9 in -[NSConcreteMutableData dealloc] ()
#4 0x9186d57f in NSPopAutoreleasePool ()
#5 0x20104abe in -[SenTestCase performTest:] ()
#6 0x20104232 in -[SenTest run] ()
#7 0x20107768 in -[SenTestSuite performTest:] ()
#8 0x20104232 in -[SenTest run] ()
#9 0x20107768 in -[SenTestSuite performTest:] ()
#10 0x20104232 in -[SenTest run] ()
#11 0x201064f3 in +[SenTestProbe runTests:] ()
#12 0x0000283b in ?? ()
#13 0x00002b26 in ?? ()
#14 0x0000254e in ?? ()
#15 0x000024da in ?? ()