• 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: NSOperation communicating progress?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperation communicating progress?


  • Subject: Re: NSOperation communicating progress?
  • From: Todd Heberlein <email@hidden>
  • Date: Mon, 04 Feb 2013 14:35:41 -0800

> Again, everything seems to work fine. The one problem is I get the following warning at the very end:
>
> 	CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.

To close out this discussion in case anyone runs across it in the future trying to debug the same thing. I had multiple errors, but the final one was that I had registered to be notified when my NSInvocationOperation finished.

    [myOp addObserver:self forKeyPath:@"isFinished" options:NSKeyValueObservingOptionNew context:NULL];

And then in my method

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

I closed a window that had an NSProgressIndicator. The problem is that the method is actually called not on the main thread (I think it was the thread created to process my NSInvocationOperation). Closing these GUI objects from this other thread seemed to be the final problem generating the warning above.

I moved the code to another method, -finishedReadingAuditFile, and then created another NSInvocationOperation to call it on the main thread

NSInvocationOperation   *tmpOperation;
tmpOperation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(finishedReadingAuditFile) object:nil];
[[NSOperationQueue mainQueue] addOperation:tmpOperation];

And the run-time warning went away.

Todd

_______________________________________________

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: NSOperation communicating progress?
      • From: Graham Cox <email@hidden>
    • Re: NSOperation communicating progress?
      • From: Mike Abdullah <email@hidden>
References: 
 >NSOperation communicating progress? (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Re: KVO, which thread?
  • Next by Date: Re: NSOperation communicating progress?
  • Previous by thread: Re: NSOperation communicating progress?
  • Next by thread: Re: NSOperation communicating progress?
  • Index(es):
    • Date
    • Thread