• 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
Re: Crash and dispatch queue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash and dispatch queue


  • Subject: Re: Crash and dispatch queue
  • From: "Zajkowski, James" <email@hidden>
  • Date: Thu, 17 Nov 2011 20:47:28 +0000
  • Thread-topic: Crash and dispatch queue

On Nov 17, 2011, at 1:49 PM, James Maxwell wrote:

> dispatch_async(queue,^{
>       [myObject doSomeHorrificCrunching];
>       [myObject saveDataToFile];
>    });

My first guess is the (parent) function that is calling dispatch_async, somewhere (or some other function it calls) is releasing or otherwise invalidating myObject, or something that myObject relies on, before doSomeHorrificCrunching completes.

You didn't mention if running it without the dispatch queue would crash it - although you did say switching to dispatch_sync does stop it from crashing.

You didn't mention if you are using the dispatch queue as a synchronizer for multiple access or not; that is, all the calls that touch myObject, are they issued from blocks on the same queue?

I'd probably start by nslogging points where threads might end and see if you're getting events out of order.

--Jim

_______________________________________________

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

References: 
 >Crash and dispatch queue (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: Crash and dispatch queue
  • Next by Date: Re: Crash and dispatch queue
  • Previous by thread: Re: Crash and dispatch queue
  • Next by thread: Re: Crash and dispatch queue
  • Index(es):
    • Date
    • Thread