Re: NSView viewWillDraw crash
Re: NSView viewWillDraw crash
- Subject: Re: NSView viewWillDraw crash
- From: Keith Duncan <email@hidden>
- Date: Fri, 11 Jan 2008 10:27:59 +0000
In particular, are you manipulating the view hierarchy -- removing
views from it -- from another thread or in any "figure out the rect
that needs to be refreshed" code?
Nope, no views are added/removed in any of my code.
Crashes in CFRelease or -release almost always indicate that some
object has been over-released. I'd pay special attention to any code
you have that either creates views or manipulates the view hierarchy
in other ways. Look for any -release or -autorelease method calls that
aren't properly balanced.
My thoughts exactly, however...
Run with NSZombieEnabled to see if you can catch anything that way
(unless you're using GC).
...I tried this along with CFZombieLevel, but it didn't log anything
though. This is a preference pane app with the System Preferences
started as a custom executable with NSZombie and CFZombieLevel set as
arguments so that should still work right?
From the original stack trace one of the return address' is in
NSBox's implementation of viewWillDraw. Now, my interface has two
boxes, one housing the other and a custom view. To investigate if I
was perhaps doing something in my custom view to cause the crash I
implemented viewWillDraw and simply called super - turns out that my
custom view isn't the problem because its viewWillDraw is never in the
return stack.
Of course, it is far more likely to be something in my code that is at
fault that something in the frameworks. The bug is also reproducible
to a certain extent though it isn't always in the same return stack
leading me to believe it is in fact a memory management bug. But if I
can't get NSZombies to work then how am I to proceed?
- Keith
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden