FROM : Steve Sims
DATE : Wed Aug 25 01:06:09 2004
Thanks for the suggestion Sean and for making your NSZombie test app
available.
By using your example I have made sure that I'm enabling zombies
correctly within my app. From what I can tell it seems that I'm not
creating any zombie objects. I do, however, definitely have some kind
of malloc problem.
I have done a great deal of searching around today to try to establish
the cause of my EXC_BAD_ACCESS bug. The exception that I get is
inconsistent - it never seems to happen in the same place. Usually
though it is occurring somewhere deep within Quartz.
Often I will see a malloc error before my app crashes, reporting an
incorrect checksum for a freed object. If I use malloc_history to find
references to that block I often find that it was allocated and
deallocated within Quartz routines, however it is occasionally from
something completely different. This information though does not seem
very relevant...
It seems fairly clear to me that I have a memory corruption problem.
Somehow, somewhere, I'm asking for a chunk (or several chunks) of
memory and then overrunning those memory blocks.
How I'm managing to do that though is a bit of a mystery to me. I'm
fairly certain I allocate memory correctly everywhere I use it.
MallocDebug isn't providing me with any useful information since it
doesn't keep information after an application crash. GDB has allowed
me to verify that my data is intact, or at least seems to be, at the
time of crashes, but that hasn't helped me get any closer to working
out what the bug is.
I'm at a bit of a loss right now as to how to track this bug down
further. Any suggestions would be most gratefully received.
Steve
On 24 Aug 2004, at 02:20, Sean McBride wrote:
> Either way works, I just tried.
>
> In fact, I have been reading about/testing NSZombie stuff recently, and
> decided to make a simple test app illustrating its use. Feel free to
> take a look:
> <http://www.cam.org/~cwatson/>
>
> The biggest problems I had were:
> - be sure to set variables to YES/NO, not 1/0
> - NSZombie does not help with toll-free bridged classes
> - NSHangOnMallocError is apparently broken
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Wed Aug 25 01:06:09 2004
Thanks for the suggestion Sean and for making your NSZombie test app
available.
By using your example I have made sure that I'm enabling zombies
correctly within my app. From what I can tell it seems that I'm not
creating any zombie objects. I do, however, definitely have some kind
of malloc problem.
I have done a great deal of searching around today to try to establish
the cause of my EXC_BAD_ACCESS bug. The exception that I get is
inconsistent - it never seems to happen in the same place. Usually
though it is occurring somewhere deep within Quartz.
Often I will see a malloc error before my app crashes, reporting an
incorrect checksum for a freed object. If I use malloc_history to find
references to that block I often find that it was allocated and
deallocated within Quartz routines, however it is occasionally from
something completely different. This information though does not seem
very relevant...
It seems fairly clear to me that I have a memory corruption problem.
Somehow, somewhere, I'm asking for a chunk (or several chunks) of
memory and then overrunning those memory blocks.
How I'm managing to do that though is a bit of a mystery to me. I'm
fairly certain I allocate memory correctly everywhere I use it.
MallocDebug isn't providing me with any useful information since it
doesn't keep information after an application crash. GDB has allowed
me to verify that my data is intact, or at least seems to be, at the
time of crashes, but that hasn't helped me get any closer to working
out what the bug is.
I'm at a bit of a loss right now as to how to track this bug down
further. Any suggestions would be most gratefully received.
Steve
On 24 Aug 2004, at 02:20, Sean McBride wrote:
> Either way works, I just tried.
>
> In fact, I have been reading about/testing NSZombie stuff recently, and
> decided to make a simple test app illustrating its use. Feel free to
> take a look:
> <http://www.cam.org/~cwatson/>
>
> The biggest problems I had were:
> - be sure to set variables to YES/NO, not 1/0
> - NSZombie does not help with toll-free bridged classes
> - NSHangOnMallocError is apparently broken
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.






Cocoa mail archive

