Main Thread Crashing in Multithreaded App
Main Thread Crashing in Multithreaded App
- Subject: Main Thread Crashing in Multithreaded App
- From: "Carter R. Harrison" <email@hidden>
- Date: Fri, 06 Aug 2010 22:25:53 -0400
My Cocoa application's main thread is crashing with EXC_BAD_ACCESS when it becomes multithreaded. The crash always occurs in the main thread when the call stack is:
0 objc_msgSend
1 __CFArrayReleaseValues
2 _CFRelease
3 _CFAutoReleasePoolPop
4 -[NSAutoReleasePool drain]
5 -[NSApplication run]
6 NSApplicationMain
7 main
The call I'm making to establish the 2nd thread is:
[self performSelectorInBackground:@selector(executeQueryHelper:) withObject:[myMutableDictionary mutableCopy]];
That selector runs a whole lot of stuff that I know performs solidly when it runs by itself in the main thread, and that selector also cretes its own NSAutoReleasePool and then drains it at the end of the method. I opted to make a mutable copy of the dictionary that is passed into the 2nd thread in hopes to reduce any concurrency problems with the shared variable but that didn't seem to make any difference.
Anybody have any solid ideas on what to try next? Thanks in advance.
Carter
_______________________________________________
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