Re: First cocoa app & crashes
Re: First cocoa app & crashes
- Subject: Re: First cocoa app & crashes
- From: Michael Norris <email@hidden>
- Date: Tue, 19 Nov 2002 11:01:45 +1300
Oli,
- Use distributed objects (see documentation or the list archives at
cocoa.mamasam.com for more information).
- In 10.2, use NSObject's
"performSelectorOnMainThread:withObject:waitUntilDone:" method,
which will save you the trouble of distributed objects but somewhat
limit your architectural options (in that everything has to be in
the same class).
If you seriously consider threading your app, it might be worth
getting a hold of O'Reilly's "Building Cocoa Applications" by
Garfinkel & Mahoney, which has a good section on Cocoa threading.
2. Regarding your crash problem, it is difficult to say what the
problem is without seeing your code, but I can tell you this: when
you see that type 10 or 11 error it is (at least in my experience)
almost always because you released something you shouldn't have. I
would look very carefully at your code and think about all of your
"releases" and whether you might be releasing one of your objects
one too many times. I would definitely look at the crash log and
try to determine which release actually caused the problem.
I agree: a crash that occurs during an autorelease is almost
definitely due to autoreleasing something that's already been
released or autoreleased. If it's crashing on an objc msg-send, it
probably means that obj doesn't exist any more....
-mike
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.