• 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: Debugging -setNeedsDisplayInRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging -setNeedsDisplayInRect:


  • Subject: Re: Debugging -setNeedsDisplayInRect:
  • From: Markus Spoettl <email@hidden>
  • Date: Fri, 27 Jul 2012 10:35:01 +0200

On 7/27/12 5:10 AM, Nick Zitzmann wrote:
I've got a view that, according to Quartz Debug, is invalidating a large and
unnecessary portion of the view when certain user events happen.

The problem is, I have no idea what is causing this to happen. What
strategies are best for debugging the -setNeedsDisplayInRect: method to find
out specifically who is calling it where and with what frame?

I can't put a symbolic breakpoint on the method, because it gets called very
often, including when the app is activated, which causes Xcode to reactivate
itself and get in the way. I then changed the breakpoint to auto-continue and
just print the stack trace each time the method is called, but now I feel
like I'm looking for a needle within a huge console log. I really need it to
break when the rect is of a certain size, but the NSRect data structure is
more than twice as large as a CPU register on x86_64, so the structure is
placed on the stack, but how do I break on a variable buried within the
stack?

Why not overwrite -setNeedsDisplayInRect: put a little if logic to determine if that's a size you would like to have more info on, add a NSLog() inside and put your breakpoint on the NSLog() call?

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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: Debugging -setNeedsDisplayInRect:
      • From: Nick Zitzmann <email@hidden>
References: 
 >Debugging -setNeedsDisplayInRect: (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: When does NSInputStream's -getBuffer:length: actually work?
  • Next by Date: Re: FSEvents eventid (or perhaps event)'s life
  • Previous by thread: Debugging -setNeedsDisplayInRect:
  • Next by thread: Re: Debugging -setNeedsDisplayInRect:
  • Index(es):
    • Date
    • Thread