35

I’m having an issue to which I haven’t been able to find a solution just by searching here or on Google.

I’m building a project which is shared by multiple developers. For some reason I’m the only one with this issue. I checked out the code several times and even re-installed Xcode.

So what happens is that when I build the project the build process hangs forever. A process called “Interface Builder Cocoa Touch Tool” runs and starts accumulating RAM until it reached the Mac’s limit (which is 16 GB). At this point, as soon as I see that I kill the process and the build fails.

On the Console App I see this:

2014-10-02 4:45:16.013 PM Interface Builder Cocoa Touch Tool[875]: BUG in libdispatch client: kevent[EVFILT_VNODE] add: "Bad file descriptor" - 0x9
2014-10-02 4:45:17.956 PM Interface Builder Cocoa Touch Tool[875]: assertion failed: 13F34: libxpc.dylib + 29453 [75E30F22-514B-3A20-B82C-EDA43AF5C35C]: 0x8d

On Xcode I see the build getting stuck on “Compiling 1 of 1 story board files”, or “Compiling 1 of 1 asset catalogs”.

Even if I stop the build, the “Interface Builder Cocoa Touch Tool” process will continue running and accumulating RAM.

I do see two warnings related to the story board:

Base.lproj/MainStoryboard.storyboard Frame for "Scroll View" will be different at run time.
Base.lproj/MainStoryboard.storyboard: warning: Unsupported Configuration: Prototype table cells must have reuse identifiers

And I see two warnings for the assets:

../Images-2.xcassets: A 57x57 app icon is required for iPhone apps targeting releases of iOS prior to 7.0
../Images-2.xcassets: A 57x57@2x app icon is required for iPhone apps targeting releases of iOS prior to 7.0

But I don’t think these are the cause.

Here are Xcode’s and the Mac’s information:

2.5 Ghz, Core i7 with 16 GB of Ram. Os X 10.9.5. Xcode 6.0.1.

Any help is more than welcomed.

Thanks.

HotFudgeSunday
  • 1,403
  • 2
  • 23
  • 29
  • 1
    I'm getting the same 2 errors from Interface Builder Cocoa Touch Tool in my system.log. In my case, I'm seeing this happen when I try to open a storyboard in some projects. The activity indicator spins for several seconds, then I am returned to the login screen, the system having crashed (Apple makes every effort to hide this fact). Logging back in, all my windows open back up, including Xcode (back to the file opened before the storyboard). Other developers are not seeing this problem opening the same storyboards in the same projects. – Jeff Lockhart Oct 02 '14 at 22:47
  • Although, I see those same 2 errors when opening Xcode, even when it doesn't crash. So they could be unrelated. I don't see any other log items that point to the issue I'm having though. – Jeff Lockhart Oct 02 '14 at 23:10
  • @JeffLockhart You can open the Activity Monitor and check there when you click on that file. If you see that IB Process start to allocate Memory you can kill it. – HotFudgeSunday Oct 03 '14 at 13:45
  • The process doesn't go up too much in memory before it crashes. It's using ~515 MB before I attempt to open the storyboard. It climbs to ~530 MB before the screen goes gray and returns me to login. I have 8 GB of RAM. – Jeff Lockhart Oct 03 '14 at 18:16
  • 1
    your memory climbs to 530 MB? Ha! Mine climbs to 24 GB. How apple releases a half-cooked software like Xcode to developers is a mystery. Xcode is half-cooked since version 4. – Duck Oct 04 '14 at 05:41
  • Any update on this? I just got an out of memory warning on my machine and looked in Activity Monitor only to see 31GB of memory taken up by Interface Builder Cocoa Touch. I can't use Xcode at all at this point. Is there a good place to get info on this? – jonstaff Oct 05 '14 at 08:16
  • This is KILLING ME right now. I haven't been able to work on our storyboards at all because of this. Sometimes it happens when I add a constraint, sometimes it happens when I compile. Bottom line I can't do much of anything with the storyboard and that doesn't help me support the iPhone 6. Talking with Apple Technical but they haven't been able to reproduce. All of our machines experience this issue, but ONLY the project that uses constraints is affected. – MobileVet Oct 08 '14 at 15:02
  • @HotFudgeSunday just for kicks, if you turn off auto layout / remove constraints, do you still see the issue? After a lot of time spent, it looking like constraints are an issue. – MobileVet Oct 08 '14 at 15:03
  • Do you have IB_DESIGNABLE anywhere in your code? Get rid of it. – matt Oct 09 '14 at 00:24
  • I'm experiencing the same. Can I confirm if anyone is experiencing this with Xcode 6.1? Even though it's in beta, it might be a way to get this working - I haven't tested it yet but was wondering if anyone else has. – amitsbajaj Oct 13 '14 at 07:53
  • I've tested this on Xcode 6.1 and 6.0.1 on Mavericks and Yosemite and I'm having the same issue. None of the answers work. This is incredibly frustrating. – amitsbajaj Oct 17 '14 at 15:39
  • My configuration is almost identical to yours. XCode 6.0.1 hangs constantly trying to use IB to prepare my app for iPhone 6. All the problems started when I turned auto-layout ON to tweak my UI for the larger screen real-estate on the iPhone 6. It would eventually crash after consuming my 24g of RAM. – Dan Oct 17 '14 at 22:20
  • At this point I think this happens when the storyboard is corrupt and there's no way out of it. Unless you fix the XML, but IB's XML files are not exactly easy to figure out. I can probably handle an XIB, but a storyboard with several views is a huge file to have to debug. I still don't understand why IB error messages are so vague, though. – HotFudgeSunday Oct 18 '14 at 21:56
  • Hi @HotFudgeSunday - based on all of the comments and thoughts, do you have any thoughts with this? I'm still getting this, after trying each one of the comments/answers and it's wonderfully frustrating. – amitsbajaj Oct 20 '14 at 10:40
  • I experienced similar problem with Xcode6.0 and 6.0.1. But Apple released Xcode6.1 on Oct 20. Now, I have no problem with Xcode6.1. – kmugitani Nov 11 '14 at 08:42
  • Still happens for me in Xcode 7. – Nick Lee Apr 01 '16 at 17:04

13 Answers13

8

I had the exact same problem: opening the storyboard in xcode results in beach ball with the Interface Builder task consuming all the memory. I got it back working by editing the xml of the storyboard file and setting

useAutolayout="NO"

in the document node. Of cause this is not a solution to the problem (which seems to be a bug in xcode) because it screws all constraints, but at least I could open and compile the storyboard again.

momo
  • 125
  • 6
  • Agreed that turning off auto layout resolves the problem, but as you said, that isn't really a fix that is useful – MobileVet Oct 15 '14 at 19:19
  • Would turning off Auto Layout completely mess up the UI in Storyboard? (noob here with the same issue) @MobileVet – amitsbajaj Oct 17 '14 at 15:48
  • I had this problem crop-up when I tried to enable Auto Layout on an existing XIB. I had to restart my computer to get back to a normal state. – Chris Oct 23 '14 at 20:52
6

Apparently, there's a corrupted .xib file. I reverted the file that was getting stuck compiling. I'm researching what's the line that's making it crash.

EDIT

I reproduced the problem in the console: There is a serious bug ongoing here.

Felipes-MacBook-Pro:FitMob-ios fbaytelm$     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --target-device iphone --errors --warnings --notices --module fitmobAppStore --minimum-deployment-target 7.0 --output-partial-info-plist /Users/fbaytelm/Library/Developer/Xcode/DerivedData/fitmob-fpoxwngwxzwfqrebczuslduvfozr/Build/Intermediates/fitmob.build/Debug-iphonesimulator/fitmobAppStore.build/FMSplashViewController-PartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compile /Users/fbaytelm/Library/Developer/Xcode/DerivedData/fitmob-fpoxwngwxzwfqrebczuslduvfozr/Build/Products/Debug-iphonesimulator/fitmobAppStore.app/FMSplashViewController.nib /Users/fbaytelm/Documents/workspace/FitMob-ios/FitMob/Classes/Views/Common/FMSplashViewController.xib
2014-10-10 01:38:48.386 ibtoold[23113:213948] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6249/InterfaceBuilderKit/Utilities/IBAbstractMessageChannelInterfaceBuilderToolProxy.m:40
Details:  Failed to determine the value for availableFonts of UIFont.

Encountered an error communicating with Interface Builder Cocoa Touch Tool. If you choose to file a crash report or Radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.

Exception name: IBRemoteToolFailureException
Exception reason: Interface Builder Cocoa Touch Tool crashed

Last command:
valueForKeyPath:ofClassWithName:resultMarshaller:resultMarshallerContext:

Backtrace of last command:
  0  0x000000010d5dc3e1 (in IDEInterfaceBuilderCocoaTouchIntegration)
  1  0x000000010d5a4cd1 IBAskClassInTargetRuntimeForValueForKeyPathUsingResultMarshallerWithContext (in IDEInterfaceBuilderCocoaTouchIntegration)
  2  0x000000010d5a4b38 IBAskClassInTargetRuntimeForValueForKeyPathUsingResultMarshaller (in IDEInterfaceBuilderCocoaTouchIntegration)
  3  0x000000010d5d7bae (in IDEInterfaceBuilderCocoaTouchIntegration)
  4  0x000000010d5d7a35 (in IDEInterfaceBuilderCocoaTouchIntegration)
  5  0x000000010d5d8873 (in IDEInterfaceBuilderCocoaTouchIntegration)
  6  0x000000010d64cb26 (in IDEInterfaceBuilderCocoaTouchIntegration)
  7  0x000000010d67b46b IBUIValidateFontDescription (in IDEInterfaceBuilderCocoaTouchIntegration)
  8  0x000000010d6e9fe7 (in IDEInterfaceBuilderCocoaTouchIntegration)
  9  0x000000010762177f -[IBDocumentIssueGenerator updateIssuesForMembers:] (in IDEInterfaceBuilderKit)
 10  0x0000000107622790 -[IBDocumentIssueGenerator validateIssues:] (in IDEInterfaceBuilderKit)
 11  0x000000010667f37e -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
 12  0x000000010667f903 -[DVTDelayedInvocation invokeIfNeeded] (in DVTFoundation)
 13  0x000000010762289b -[IBDocumentIssueGenerator warnings] (in IDEInterfaceBuilderKit)
 14  0x00000001065aebbb (in ibtoold)
 15  0x00000001065a130f (in ibtoold)
 16  0x00000001065a4b21 (in ibtoold)
 17  0x00000001065aa3f7 (in ibtoold)
 18  0x00000001065aa947 (in ibtoold)
 19  0x00000001065aa817 (in ibtoold)
 20  0x0000000106599d4f (in ibtoold)
 21  0x00000001065a9fe1 (in ibtoold)
 22  0x00000001065a9238 (in ibtoold)
 23  0x00007fff90ff15c9 start (in libdyld.dylib)

Exception backtrace:
(null)
Exception info:{
    IBUnderlyingError = "Error Domain=IBMessageChannelErrorDomain Code=4 \"Failed to communicate with Interface Builder\" UserInfo=0x7fe7fbf43020 {NSLocalizedDescription=Failed to communicate with Interface Builder, NSLocalizedFailureReason=Interface Builder Cocoa Touch Tool crashed}";
}

Function: void IBAssertMarshallingFailure(NSString *__strong, NSString *__strong, NSString *__strong)
Thread:   <NSThread: 0x7fe7f941adf0>{number = 1, name = main}
Hints: None
Backtrace:
  0  0x00000001067982e4 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1  0x0000000106797a7b _DVTAssertionHandler (in DVTFoundation)
  2  0x0000000106797cde _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000107676973 IBAssertMarshallingFailure (in IDEInterfaceBuilderKit)
  4  0x000000010d5a4e1c IBAskClassInTargetRuntimeForValueForKeyPathUsingResultMarshallerWithContext (in IDEInterfaceBuilderCocoaTouchIntegration)
  5  0x000000010d5a4b38 IBAskClassInTargetRuntimeForValueForKeyPathUsingResultMarshaller (in IDEInterfaceBuilderCocoaTouchIntegration)
  6  0x000000010d5d7bae (in IDEInterfaceBuilderCocoaTouchIntegration)
  7  0x000000010d5d7a35 (in IDEInterfaceBuilderCocoaTouchIntegration)
  8  0x000000010d5d8873 (in IDEInterfaceBuilderCocoaTouchIntegration)
  9  0x000000010d64cb26 (in IDEInterfaceBuilderCocoaTouchIntegration)
 10  0x000000010d67b46b IBUIValidateFontDescription (in IDEInterfaceBuilderCocoaTouchIntegration)
 11  0x000000010d6e9fe7 (in IDEInterfaceBuilderCocoaTouchIntegration)
 12  0x000000010762177f -[IBDocumentIssueGenerator updateIssuesForMembers:] (in IDEInterfaceBuilderKit)
 13  0x0000000107622790 -[IBDocumentIssueGenerator validateIssues:] (in IDEInterfaceBuilderKit)
 14  0x000000010667f37e -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
 15  0x000000010667f903 -[DVTDelayedInvocation invokeIfNeeded] (in DVTFoundation)
 16  0x000000010762289b -[IBDocumentIssueGenerator warnings] (in IDEInterfaceBuilderKit)
 17  0x00000001065aebbb (in ibtoold)
 18  0x00000001065a130f (in ibtoold)
 19  0x00000001065a4b21 (in ibtoold)
 20  0x00000001065aa3f7 (in ibtoold)
 21  0x00000001065aa947 (in ibtoold)
 22  0x00000001065aa817 (in ibtoold)
 23  0x0000000106599d4f (in ibtoold)
 24  0x00000001065a9fe1 (in ibtoold)
 25  0x00000001065a9238 (in ibtoold)
 26  0x00007fff90ff15c9 start (in libdyld.dylib)
Felipe Baytelman
  • 544
  • 3
  • 12
  • 2
    You're doing some crazy debugging here. I hope you figured it out. I couldn't find a solution but I'll give you a point for trying so hard. Building from the terminal sounds like a great idea to try and pinpoint the error. – HotFudgeSunday Oct 15 '14 at 02:41
  • @HotFudgeSunday my thoughts exactly... doesn't quite resolve it, but A for effort. – MobileVet Oct 15 '14 at 19:18
  • Thanks! Apparently, the new builds of the OS and Xcode solved this issue. – Felipe Baytelman Oct 24 '14 at 21:26
3

I had two Xcode versions installed, 5 & 6. Not sure if this was the cause, but Apple indicated this does happen with people and that the appropriate action is to ensure that the correct version is 'selected'

xcode-select -p

Not sure this would have fixed the issue or not, but after removing both versions and then installing Xcode 6, things appear to have been resolved.

MobileVet
  • 2,958
  • 2
  • 26
  • 42
3

In Xcode, right-click on the storyboard file and select Open As -> Source Code. In the source code editor, change the value of "useAutolayout" to "NO". Then, you should be able to open your storyboard as Interface Builder. I ran into this annoying issue. Now, all of my storyboard files created in Xcode 5 can be open in Xcode 6 now.

Bin Zhou
  • 51
  • 2
2

I fixed the problem by changing the Builds For setting in the File Inspector for the storyboard from iOS6 & Later to iOS8 & Later It seems to work on iOS 7.0 & later, but changing it back to any of the iOS6 settings makes the problem recur.

user2002649
  • 710
  • 5
  • 9
1

I too have been having issues with storyboards causing freezes with XCode 6.0.1 on OS X 10.9.5.
I can't even start Xcode because it tries to re-open the storyboard.

Here's what I do to recover (until it happens again)

IMPORTANT: make sure you back up your storyboard file in case you accidentally delete it

  1. Completely close Xcode
  2. From a Terminal (or Finder): MOVE your storyboard file to a safe location
  3. Restart XCode and open your workspace or project
  4. In Xcode: remove the missing storyboard file from the project
  5. From a Terminal (or Finder): COPY your storyboard back to its original location
  6. Import the storyboard to Xcode (Add File or drag-drop from Finder)

At this point everything "usually" works for me: open the storyboard, build, run... I can keep working with the storyboard until the next time I re-open the project. Then it happens again and I have to repeat the same steps.

AndyDeveloper
  • 2,790
  • 1
  • 21
  • 23
  • Quite the operation... thanks for passing it along. I don't think it really addresses our infinite compile time issue due to IBCTT process going off into space. Interestingly, everything is currently working on my system (knock on wood). It did appear related to certain constraints and also a general patience for allowing the compiler to finish. Not sure exactly what changed, but I can now compile the project again. – MobileVet Oct 09 '14 at 13:39
  • @MobileVet I'm glad you got it to work. My freeze happens upon viewing the file so probably not the same issue. – AndyDeveloper Oct 09 '14 at 18:05
  • This process is not working !!! still blocking at the compile asset catalog xxx.xcassets – xeonarno Oct 10 '14 at 00:25
0

I too had this issue and think I have found the reason for the hanging; I removed some constraints from the storyboard and I no longer get this freeze during the build phase.

jwrnr
  • 1
0

I did a "binary search" to find which element was corrupting my .xib file.

Each time, I had to kill Xcode, delete Derived Data. Once I found the sub-view that was causing the problem, I removed and reconstructed it.

Felipe Baytelman
  • 544
  • 3
  • 12
0

I am not using Storyboards but I think the problem here may be at a higher level and not related to storyboards. I faced the same problem (xcode hangs while trying to build the app, activity monitor shows interface builder using 99% CPU).

The following worked for me - In the .xcodeproj file, changing the iOS Deployment Target from 6.0 to 7.0 fixed it instantly.

4mo1
  • 1
0

I fixed this issue by just resolved all warnings related to storyboard. For example: 1. I deleted unused prototype cell in TableView, because it will cause warning about something like "No reuse Identifier". 2. I deleted unused view controller.

Simon Tseng
  • 1
  • 1
  • 2
0

I believe the problem is related to the new font mechanism in interface builder. Remove all references to fonts in your project and I bet the problem goes away.

bobeast
  • 1
  • 2
0

I was getting the same "Compiling Storyboards" or "Compiling Asset Catalog" hang under Xcode 7.3.1. Activity Monitor showed multiple "Interface Builder Cocoa Touch Tool" processes running.

I was able to continue by:

  1. Closing the offending storyboard
  2. Closing the project
  3. Restarting Xcode, but do not open the project
  4. Open just the offending storyboard
  5. Closing the storyboard and restarting Xcode
  6. Open the project
Jamie McDaniel
  • 1,809
  • 19
  • 15
0

This happens for me in Xcode 8.2.1 if I bind the wrong thing in a view-based table view (p.s., I'm using Core Data). I was binding the second-deepest-level Table View Cell view’s value to my array controller, when I should have been binding the text field to the Table Cell View, with a path of objectValue.<attributeName>. The column object should be bound to nothing, and the Table View Content should be bound to the array controller via arrangedObjects.

This, at least, works, and lets Xcode (ibtool) compile the storyboard without consuming all available memory and crashing the system.

Rick
  • 3,298
  • 3
  • 29
  • 47