Xcode Errors

Discussion in 'Mac Programming' started by AlmostThere, Nov 23, 2006.

  1. macrumors 6502a

    Every time I try to build (any) project, I get the error message:

    Uncaught Exception:
    *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key

    Stack Backtrace:
    The stack backtrace has been logged to the console.

    with options to Continue (does nothing) or Quit

    I have tried trashing preferences (no difference), and am running 2.4.1

    Any ideas?
  2. macrumors 68000


    Feb 1, 2005
    Any project? Of any language? Using any API? How's that possible?

    Maybe a reinstall will help. Or you could let us have more information :)
  3. Moderator emeritus


    Jul 24, 2002
    Have you modified the defaults somehow? My guess is that XCode is trying to build an NSDictionary of the project configuration and you've managed to set a null somewhere you shouldn't.
  4. thread starter macrumors 6502a

    Current projects are Java and were building fine before.

    As far as I can see this is all languages. Creating a brand new c++ tool with the default code "Hello World!" code causes the same error. The same is true for a java tool, Cocoa project - I could try more but I am getting the picture.

    A reinstall is the next step, I suppose ...
  5. thread starter macrumors 6502a

  6. Moderator emeritus


    Jul 24, 2002
    Which points even more strongly to my suggestion. Try clearing out all the XCode stuff from your users Library. Or create a new user and see if it works for them.
  7. thread starter macrumors 6502a

    Uninstall - reboot - remove preferences - reboot - reinstall - reboot is letting me build again.
  8. Moderator emeritus


    Jul 24, 2002
    Well, at least it's working! If you ever work out exactly which preference it was let us know...
  9. thread starter macrumors 6502a

    Of course. In the meantime, I shall do my uttermost to break it again ;)

    FWIW and not that I have either the time or inclination to investigate, the stack trace is as follows:

    2006-11-23 14:05:26.305 Xcode[7787] ** INTERNAL ERROR: Uncaught Exception **
    Exception: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key
    0 0x956c1b90 -[TSException raise]
    1 0x9297be58 +[NSException raise:format:]
    2 0x92942464 -[NSCFDictionary setObject:forKey:]
    3 0x99279814 -[PBXAEEditorSpecification _modifiedFileDictionary]
    4 0x99279618 -[PBXAEEditorSpecification modifiedDocumentsArray]
    5 0x991106bc -[PBXExternalEditorInterface modifiedDocumentsFromExternalEditors]
    6 0x99110428 -[PBXProjectDocument editedFileDocuments]
    7 0x99110240 -[PBXProjectDocument saveEditedDocumentsIfNeededWithCancelTitle:]
    8 0x99331ee0 -[XCProjectSelection buildTargets:andDependencies:withAction:usingBuildStyles:usingBuildConfiguration:eek:verridingBuildSettings:notifyingObject:]
    9 0x991101e4 -[XCProjectSelection buildTargets:withAction:]
    10 0x90a441f0 _objc_msgSendv
    11 0x9295cc84 -[NSInvocation invoke]
    12 0x9295d234 -[NSInvocation invokeWithTarget:]
    13 0x92955030 -[NSObject(NSForwardInvocation) forward::]
    14 0x90a440ac __objc_msgForward
    15 0x937acc48 -[NSApplication sendAction:to:from:]
    16 0x938074b4 -[NSMenu performActionForItemAtIndex:]
    17 0x93807238 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
    18 0x93806ce0 -[NSMenu performKeyEquivalent:]
    19 0x938068c0 -[NSApplication _handleKeyEquivalent:]
    20 0x9908ba1c -[PBXExtendedApplication sendEvent:]
    21 0x93707d0c -[NSApplication run]
    22 0x937f8878 _NSApplicationMain
    23 0x00009b04
    24 0x00009808
    All identities removed.

    but it may be a little more meaningful to someone with a reasonable knowledge of Cocoa event handling.

Share This Page