interface nib crashes on simulation

Discussion in 'Mac Programming' started by dbrayford, Dec 20, 2010.

  1. dbrayford macrumors member

    Joined:
    Feb 22, 2010
    #1
    I have an application that builds and executes successfully on OS 10.5 and xcode 3.1. However, it crashes on OS 10.6 and xcode 3.2.5 when trying to simulate the interface nib file in interface builder, see crash message below.

    Does anyone know how I update an interface builder file to run on the latest OS?

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unlocking Focus on wrong view (<NSMatrix: 0x100549460>), expected <NSView: 0x100530970>'
     
  2. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #2
    I doubt that is the problem. Without seeing the code around where it is crashing, it's hard to diagnose, but you are probably calling something directly that you shouldn't.
     
  3. dbrayford thread starter macrumors member

    Joined:
    Feb 22, 2010
    #3
    When trying to open the nib file by double clicking on it in xcode I get the following crash and error message.

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    Application Specific Information:
    Assertion Message: An exception was raised while -[IBEditorController openEditorForObject:] was executing. This cannot be recovered from.

    Exception Name: NSInvalidArgumentException
    Reason: Unlocking Focus on wrong view (<NSMatrix: 0x116884300>), expected <NSView: 0x1157477b0>
    User Info: (null)
     
  4. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #4
    Is this one of the older-style package nibs? If you are talking about a file-type nib compiled from a xib, Interface Builder will not open those.
     
  5. dbrayford thread starter macrumors member

    Joined:
    Feb 22, 2010
    #5
    How do I find out if it is an older style nib file and if it is can I convert it to a newer type nib file?
     
  6. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #6
    You have to open up a Terminal

    ibtool --upgrade MyNib.nib
     
  7. dbrayford thread starter macrumors member

    Joined:
    Feb 22, 2010
    #7
    I ran the upgrade command in the terminal, but still get the same crash when trying to open the file.
    Code:
    Process:         Interface Builder [8900]
    Path:            /Developer/Applications/Interface Builder.app/Contents/MacOS/Interface Builder
    Identifier:      com.apple.InterfaceBuilder3
    Version:         3.2.5 (823)
    Build Info:      InterfaceBuilder-8230000~6
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [109]
    
    Date/Time:       2010-12-21 12:38:27.854 -0700
    OS Version:      Mac OS X 10.6.5 (10H574)
    Report Version:  6
    
    Interval Since Last Report:          95704 sec
    Crashes Since Last Report:           6
    Per-App Interval Since Last Report:  3599 sec
    Per-App Crashes Since Last Report:   4
    Anonymous UUID:                      883D1004-4E34-446D-A7B0-CFA3E1A85642
    
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    
    Application Specific Information:
    Assertion Message: An exception was raised while -[IBEditorController openEditorForObject:] was executing. This cannot be recovered from.
    
    Exception Name: NSInvalidArgumentException
    Reason: Unlocking Focus on wrong view (<NSMatrix: 0x116832b60>), expected <NSView: 0x115fa51f0>
    User Info: (null)
    
     
  8. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #8
    I'm sure this doesn't actually upgrade the nib. It probably makes a copy of it as a XIB, which you would then have to move into your project and replace the old one.
     
  9. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #9
    Interface Builder works with 2 kinds of files (IME): xib files, which are precursors to nib files, and nib packages. A nib package is actually a directory with several (usually 3) xml or plist sources in it. This type of package usually has an icon that looks like a square-ish gold plate with screw heads in the corners and will have an "Open Package" line in the CM when you right-click on it. If you have a nib that is a file rather than a package directory, you cannot open it with IB, you can only sort of view its keyed archive contents with PListEditor or the like.
     
  10. dbrayford thread starter macrumors member

    Joined:
    Feb 22, 2010
    #10
    interface builder crash when opening file

    I get the following error and crash after opening an existing interface builder project (version 3.2.5 on OS X 10.6.5). The project works on an earlier OS (OS X 10.5). Is there a way of fixing the project or do I have to create a new GUI of OS X 10.6.5?

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    Application Specific Information:
    Assertion Message: An exception was raised while -[IBEditorController openEditorForObject:] was executing. This cannot be recovered from.

    Exception Name: NSInvalidArgumentException
    Reason: Unlocking Focus on wrong view (<NSMatrix: 0x1006b7a80>), expected <NSView: 0x118333340>
    User Info: (null)
     
  11. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #11
    Sounds like there's something corrupted with the nib. Either try to install an older version of Xcode that originally created the file and open it there and re-save, or just recreate it from scratch -> probably best if it's not too complicated of a nib.

    What happens when you compile the project and run, loading the nib? Does it work or no?
     

Share This Page