• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Main Thread Crashing in Multithreaded App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Main Thread Crashing in Multithreaded App
      • From: Quincey Morris <email@hidden>
    • Re: Main Thread Crashing in Multithreaded App
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Core Data : Multiuser ?
  • Next by Date: Re: Core Data : Multiuser ?
  • Previous by thread: Re: Core Data : Multiprocess (was Multiuser) ?
  • Next by thread: Re: Main Thread Crashing in Multithreaded App
  • Index(es):
    • Date
    • Thread