Setting Breakpoints in XCode - Comically slow

  • Setting a breakpoint in XCode 2.4.1 , I see a jump from 1% - 100% CPU
    (say hi to the spinning beach ball) and the whole process takes
    around 8-10 seconds to set ONE breakpoint. This is on a G5 with 2
    gigs of memory and around 800mb free ram.

    Is anyone else seeing this sort of thing? I am asking here because I
    am assuming there is just something wrong on my machine, I cant
    believe something would ship with this sort of blocking code. I
    noticed something else,  when Xcode says Checking Dependencies , its
    blocking for me in this case as well! The whole interface is locked
    with a spinning beach ball.  This effects the entire XCode
    application including any separate projects that may be open, the
    whole UI is frozen dead until its done checking dependencies. Now,
    this may not be a big deal on small projects, but I have a large
    project and this can take into the minutes with Xcode being totally
    locked when certain files are edited. I might be able to work around
    so its not constantly checking so many dependencies but what the heck
    is the deal with this? Once again I can't believe they would release
    like this (how hard is it to make a thread!?!?) , so I am a little
    worried about my system having a more serious issue. I will check out
    XCode with some debugging tools to see what  is going on, but thought
    I would mention these initial observations and see if its just my
    machine or if these are well known problems.

    Regards,
    Adam
  • If you haven't already, try turning off predictive compilation.

    --
    Scott Ribe
    <scott_ribe...>
    http://www.killerbytes.com/
    (303) 722-0567 voice
  • Thanks Scott, I did have predictive compilation on, and have now
    turned it off.  Hopefully doing that will at least allow me to keep
    working without this nonsense occuring every few hours, although my
    weirdness seems to be happening when I try to use the debugger :-)
    After posting my initial problem XCode ended up locking up when I
    started a debug session. I got a backtrace from gdb which is shown
    below, I noticed some other posts about hangs in objc_msgSend_rtp
    when using XCode and when you have not rebooted your system in a
    while (my uptime was 8 days). After rebooting, breakpoints were
    setting again at a "normal" speed. This seems like a bug to me and I
    am to understand that objc_msgSend_rtp was introduced in Tiger. I
    will send my findings to Apple.

    #0  0xfffeff18 in objc_msgSend_rtp ()
    #1  0x95833bb8 in -[PBXFileReference resolvedAbsolutePath] ()
    #2  0x9584e768 in -[PBXContainer fileReferenceForPath:] ()
    #3  0x9593a52c in -[PBXProject relativeFileReferenceForPath:] ()
    #4  0x9586251c in -[PBXProject breakpointsForFileReference:] ()
    #5  0x991590ec in -[PBXSourceFileDocument _breakpointsForProject:] ()
    #6  0x99158c68 in -[PBXSourceFileEditor _computeBreakpointMarkers] ()
    #7  0x991659f4 in -[PBXSourceFileEditor _projectItemsDidChange:] ()
    #8  0x92be0ae4 in _nsnote_callback ()
    #9  0x90805078 in __CFXNotificationPost ()
    #10 0x907fd114 in _CFXNotificationPostNotification ()
    #11 0x92bcaeec in -[NSNotificationCenter
    postNotificationName:object:userInfo:] ()
    #12 0x95868c48 in -[PBXProject _processEndOfEvent] ()
    #13 0x92c63aa0 in __NSFirePerformTimer ()
    #14 0x907dd76c in __CFRunLoopDoObservers ()
    #15 0x907dda0c in __CFRunLoopRun ()
    #16 0x907dd4ac in CFRunLoopRunSpecific ()
    #17 0x93298b20 in RunCurrentEventLoopInMode ()
    #18 0x9329812c in ReceiveNextEventCommon ()
    #19 0x93298020 in BlockUntilNextEventMatchingListInMode ()
    #20 0x9379eae4 in _DPSNextEvent ()
    #21 0x9379e7a8 in -[NSApplication
    nextEventMatchingMask:untilDate:inMode:dequeue:] ()
    #22 0x9379acec in -[NSApplication run] ()
    #23 0x9388b87c in NSApplicationMain ()
    #24 0x00009b08 in ?? ()
    #25 0x0000980c in ?? ()

    Also, XCode did hang again after about an hour or so after the reboot
    (while starting debug again).  The back trace below shows the second
    hang although this time in nsnoteinfo_equal_obs, if that happens
    again I will report this as well to Apple:

    #0  0x92be2760 in _nsnoteinfo_equal_obs ()
    #1  0x90807f0c in __CFXNotificationUnregisterTable ()
    #2  0x90807c04 in _CFXNotificationUnregister ()
    #3  0x92be2744 in -[NSNotificationCenter removeObserver:name:object:] ()
    #4  0x99165c2c in -[XCProjectBasedSelection dealloc] ()
    #5  0x99165bd0 in -[XCProjectItemSelection dealloc] ()
    #6  0x92bbd908 in NSPopAutoreleasePool ()
    #7  0x92beeab0 in __NSFireMainThreadPerform ()
    #8  0x9080eae0 in __CFRunLoopPerformPerform ()
    #9  0x907de4fc in __CFRunLoopDoSources0 ()
    #10 0x907dda2c in __CFRunLoopRun ()
    #11 0x907dd4ac in CFRunLoopRunSpecific ()
    #12 0x93298b20 in RunCurrentEventLoopInMode ()
    #13 0x932981b4 in ReceiveNextEventCommon ()
    #14 0x93298020 in BlockUntilNextEventMatchingListInMode ()
    #15 0x9379eae4 in _DPSNextEvent ()
    #16 0x9379e7a8 in -[NSApplication
    nextEventMatchingMask:untilDate:inMode:dequeue:] ()
    #17 0x9379acec in -[NSApplication run] ()
    #18 0x9388b87c in NSApplicationMain ()
    #19 0x00009b08 in ?? ()
    #20 0x0000980c in ?? ()

    On Sep 29, 2007, at 10:52 AM, Scott Ribe wrote:

    > If you haven't already, try turning off predictive compilation.
    >
    > --
    > Scott Ribe
    > <scott_ribe...>
    > http://www.killerbytes.com/
    > (303) 722-0567 voice
    >
    >
    >
  • Also, make sure you're using DWARF debugging format instead of STABS. That
    helped a lot with my debug problems. I think the default may still be
    STABS...

    --
    Scott Ribe
    <scott_ribe...>
    http://www.killerbytes.com/
    (303) 722-0567 voice
  • > #1  0x95833bb8 in -[PBXFileReference resolvedAbsolutePath] ()

    FYI, this exact problem has been discussed before. I don't remember the
    outcome, but you might try searching on keywords having to do with resolving
    source file paths...

    --
    Scott Ribe
    <scott_ribe...>
    http://www.killerbytes.com/
    (303) 722-0567 voice
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today