Re: Over-released Paragraph Style - Driving Me NUTS!
Re: Over-released Paragraph Style - Driving Me NUTS!
- Subject: Re: Over-released Paragraph Style - Driving Me NUTS!
- From: Seth Willits <email@hidden>
- Date: Mon, 23 Oct 2006 19:41:48 -0700
On Oct 23, 2006, at 7:17 PM, Murat Konar wrote:
It's not hard to reproduce. I have a 100% repeatable test case.
But I think Cameron is on to something: is your app multi-threaded?
I've been puzzling over your problem too and have been wondering if
your problem is related to threads or perhaps even multiple run loops.
This sounds an awful lot like an autorelease pool is getting
released and your paragraph style with it.
Yes, that's exactly what's happening.
The question is when the autorelease pool in question is getting
released. Normally, you have the autorelease pool that gets
released after every run loop iteration, and if you're in a
multithreaded situation, your threads may also have autorelease
pools associated with them. You need to make sure your object is
getting added to the proper autorelease pool or it can easily get
released out from under you.
Well, there are 4 threads according to the debugger, but I don't
create any of them and AFAIK they're all just typical background junk
(because of debugging?).
Thread 1 is the main thread as expected.
Thread 2:
#0 0x9002bbc8 in semaphore_wait_signal_trap
#1 0x900306ac in pthread_cond_wait
#2 0x9159a224 in pthreadSemaphoreWait
#3 0x915994c0 in CMMConvTask
#4 0x9002b508 in _pthread_body
Thread 3:
#0 0x9000ab48 in mach_msg_trap
#1 0x9000aa9c in mach_msg
#2 0x907dcb78 in __CFRunLoopRun
#3 0x907dc47c in CFRunLoopRunSpecific
#4 0x9298869c in +[NSURLConnection(NSURLConnectionInternal)
_resourceLoadLoop:]
#5 0x92961194 in forkThreadForFunction
#6 0x9002b508 in _pthread_body
Thread 4:
#0 0x9001f08c in select
#1 0x907ef40c in __CFSocketManager
#2 0x9002b508 in _pthread_body
There's nothing fancy going on in my code with respect to threads.
Certainly not at this point.
Multiple people have said ObjectAlloc *does* watch retain & release
cycles but despite checking the checkbox to enable that, I don't see
ObjectAlloc doing it. I'd really like to see if I'm doing something
wrong here or what.
--
Seth Willits
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden