1

I had a problem with XCode - during debug session on device randomly see freeze and in Activity Monitor I see that XCode uses a lots of memory (over the physical RAM installed in MBP). I'm sending this CrashReport to Apple every time but without feedback till now :) Crash report below (part):

Date/Time:       2016-01-19 13:10:04 +0100
OS Version:      Mac OS X 10.11.2 (Build 15C50)
Architecture:    x86_64h
Report Version:  22

Command:         Xcode
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Version:         7.2 (9548)
Build Version:   7
Project Name:    IDEFrameworks
Source Version:  9548000000000000
App Item ID:     497799835
App External ID: 814662604
Parent:          launchd [1]
PID:             9533

Event:           hang
Duration:        1.70s (process was unresponsive for 81 seconds before sampling)
Steps:           17 (100ms sampling interval)

Hardware model:  MacBookPro11,1
Active cpus:     4

Fan speed:       2712 rpm

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------

Heaviest stack for the main thread of the target process:
  17  start + 1 (libdyld.dylib + 13741) [0x7fff829bb5ad]
  17  NSApplicationMain + 1176 (AppKit + 9504) [0x7fff94930520]
  17  -[NSApplication run] + 796 (AppKit + 524346) [0x7fff949ae03a]
  17  ??? [0x103f3cc6d]
  17  -[NSApplication sendEvent:] + 4382 (AppKit + 1365371) [0x7fff94a7b57b]
  17  ??? [0x10418726e]
  17  -[NSWindow sendEvent:] + 517 (AppKit + 1378101) [0x7fff94a7e735]
  17  -[NSWindow _reallySendEvent:isDelayedEvent:] + 2108 (AppKit + 8357653) [0x7fff95126715]
  17  -[NSTextView keyDown:] + 658 (AppKit + 2872026) [0x7fff94beb2da]
  17  -[NSView interpretKeyEvents:] + 204 (AppKit + 2872495) [0x7fff94beb4af]
  17  -[NSTextInputContext handleEvent:] + 109 (AppKit + 2872742) [0x7fff94beb5a6]
  17  -[NSTextInputContext _handleEvent:options:completionHandler:] + 1266 (AppKit + 2874067) [0x7fff94bebad3]
  17  -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:] + 131 (AppKit + 2874753) [0x7fff94bebd81]
  17  __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke955 + 131 (AppKit + 9379635) [0x7fff9521ff33]
  17  TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3199 (HIToolbox + 373232) [0x7fff90ab01f0]
  17  __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 253 (HIToolbox + 375610) [0x7fff90ab0b3a]
  17  __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 261 (HIToolbox + 376177) [0x7fff90ab0d71]
  17  __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 325 (HIToolbox + 376883) [0x7fff90ab1033]
  17  __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 251 (HIToolbox + 377285) [0x7fff90ab11c5]
  17  TSMKeyEvent_WithCompletionHandler + 721 (HIToolbox + 378063) [0x7fff90ab14cf]
  17  __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 437 (HIToolbox + 378588) [0x7fff90ab16dc]
  17  __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 296 (HIToolbox + 378936) [0x7fff90ab1838]
  17  SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 284 (HIToolbox + 379528) [0x7fff90ab1a88]
  17  SendFilterTextEvent_WithCompletionHandler + 236 (HIToolbox + 380335) [0x7fff90ab1daf]
  17  SendTSMEvent_WithCompletionHandler + 497 (HIToolbox + 380877) [0x7fff90ab1fcd]
  17  __SendFilterTextEvent_WithCompletionHandler_block_invoke + 189 (HIToolbox + 381631) [0x7fff90ab22bf]
  17  __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 400 (HIToolbox + 382060) [0x7fff90ab246c]
  17  SendTSMEvent_WithCompletionHandler + 417 (HIToolbox + 380797) [0x7fff90ab1f7d]
  17  SendEventToEventTargetWithOptions + 43 (HIToolbox + 31403) [0x7fff90a5caab]
  17  SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 404 (HIToolbox + 31816) [0x7fff90a5cc48]
  17  DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1231 (HIToolbox + 34750) [0x7fff90a5d7be]
  17  _NSTSMEventHandler + 324 (AppKit + 2880838) [0x7fff94bed546]
  17  -[NSTextInputContext handleTSMEvent:completionHandler:] + 3173 (AppKit + 2884119) [0x7fff94bee217]
  17  -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 101 (AppKit + 2884903) [0x7fff94bee527]
  17  __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 + 95 (AppKit + 2885044) [0x7fff94bee5b4]
  17  __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke176 + 4253 (AppKit + 9356087) [0x7fff9521a337]
  17  -[NSTextInputContext tryHandleTSMEvent_insertFixLenText_withContext:dispatchCondition:setupForDispatch:nestedWorkaroundCondition:nestedWorkaroundDispatchWork:loopCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 428 (AppKit + 9348239) [0x7fff9521848f]
  17  -[NSTextInputContext do_HandleTSMEvent_insertFixLenTextLoop:whileCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 181 (AppKit + 2886109) [0x7fff94bee9dd]
  17  __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2250 + 127 (AppKit + 9357239) [0x7fff9521a7b7]
  17  -[NSTextInputContext(NSInputContext_WithCompletion) insertText:replacementRange:completionHandler:] + 394 (AppKit + 2886519) [0x7fff94beeb77]
  17  ??? [0x103210cd9]
  17  -[NSTextView insertText:] + 318 (AppKit + 4173777) [0x7fff94d28fd1]
  17  ??? [0x1032114cd]
  17  -[NSTextView insertText:replacementRange:] + 2657 (AppKit + 2889896) [0x7fff94bef8a8]
  17  ??? [0x1031c00d6]
  17  -[NSTextStorage endEditing] + 111 (UIFoundation + 373935) [0x7fff89e2a4af]
  17  ??? [0x1031c0414]
  17  -[NSTextStorage processEditing] + 350 (UIFoundation + 374906) [0x7fff89e2a87a]
  17  -[NSTextStorage _notifyEdited:range:changeInLength:invalidatedRange:] + 152 (UIFoundation + 376220) [0x7fff89e2ad9c]
  17  -[NSLayoutManager processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:] + 47 (UIFoundation + 78036) [0x7fff89de20d4]
  17  ??? [0x103340e84]
  17  -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] + 219 (UIFoundation + 77292) [0x7fff89de1dec]
  17  -[NSLayoutManager(NSPrivate) _invalidateLayoutForExtendedCharacterRange:isSoft:invalidateUsage:] + 2191 (UIFoundation + 1047780) [0x7fff89ecece4]
  17  ??? [0x1033a6e09]
  17  -[NSTextView(NSSharing) updateInsertionPointStateAndRestartTimer:] + 1196 (AppKit + 1106930) [0x7fff94a3c3f2]
  17  -[NSLayoutManager rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:] + 80 (UIFoundation + 93836) [0x7fff89de5e8c]
  17  -[NSLayoutManager(NSPrivate) _rectArrayForRange:withinSelectionRange:rangeIsCharRange:singleRectOnly:fullLineRectsOnly:inTextContainer:rectCount:rangeWithinContainer:glyphsDrawOutsideLines:] + 99 (UIFoundation + 1029104) [0x7fff89eca3f0]
  17  -[NSLayoutManager(NSPrivate) _rectArrayForRange:withinSelectionRange:rangeIsCharRange:singleRectOnly:fullLineRectsOnly:inTextContainer:rectCount:rangeWithinContainer:glyphsDrawOutsideLines:rectArray:rectArrayCapacity:] + 783 (UIFoundation + 1015733) [0x7fff89ec6fb5]
  17  _NSFastFillAllLayoutHolesForGlyphRange + 1479 (UIFoundation + 1026498) [0x7fff89ec99c2]
  17  -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 1158 (UIFoundation + 987140) [0x7fff89ec0004]
  17  -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 983 (UIFoundation + 1214809) [0x7fff89ef7959]
  17  -[NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 245 (UIFoundation + 481773) [0x7fff89e449ed]
  17  -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 4189 (UIFoundation + 475944) [0x7fff89e43328]
  17  -[NSATSTypesetter layoutParagraphAtPoint:] + 167 (UIFoundation + 1211140) [0x7fff89ef6b04]
  17  -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 3418 (UIFoundation + 1203036) [0x7fff89ef4b5c]
  17  -[NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 2564 (UIFoundation + 1247217) [0x7fff89eff7f1]
  17  CTTypesetterCreateLine + 173 (CoreText + 85451) [0x7fff8a8d3dcb]
  17  TTypesetter::FillLine(std::__1::tuple*, unsigned int, unsigned char> const&, TLine&, CFRange, double, double) + 38 (CoreText + 446898) [0x7fff8a92c1b2]
  16  TLine::CopyStringRange(TLine const&, CFRange) + 209 (CoreText + 86265) [0x7fff8a8d40f9]
  16  TLine::AppendPartialRun(CTRun const*, CFRange) + 25 (CoreText + 86721) [0x7fff8a8d42c1]
  11  CTGlyphRun::CloneRange(CTRun const*, CFRange, TRun::SubrangingStyle) + 40 (CoreText + 86832) [0x7fff8a8d4330]
  7   _CFRuntimeCreateInstance + 421 (CoreFoundation + 13925) [0x7fff9571c665]
  3   _platform_bzero$VARIANT$Haswell + 80 (libsystem_platform.dylib + 23664) [0x7fff92bcfc70]
 *3   hndl_alltraps + 229 (kernel + 2027845) [0xffffff80003ef145]
 *3   user_trap + 847 (kernel + 1907535) [0xffffff80003d1b4f]
 *2   ??? (kernel + 1381338) [0xffffff80003513da]
 *1   vm_page_grab + 231 (kernel + 1600839) [0xffffff8000386d47] (running)
  • How much memory do you have - this error is probably simply running out of memory and swapping too much – Mark Jan 19 '16 at 13:20
  • Mark I'm using MBP (mid 2014) i5, 8GB RAM, 256GB SSD – SPaluchiewicz Jan 19 '16 at 19:44
  • I'm having a similar issue on Xcode 7.3.1. I'm running on an iMac with 24GB of RAM, and Xcode is consuming over 26GB of RAM. – itnAAnti Aug 1 '16 at 16:27
  • @itnAAnti do you use antivirus? (at this moment it's my only suspect) I have similar hardware at work (without antivirus) and it works fine. – SPaluchiewicz Aug 3 '16 at 7:26
  • @SPaluchiewicz, unfortunately, no, I don't use anti-virus. In testing, I bought and installed Watchdog, which automatically purges the DerivedData folder when needed... it did not help. I then completely removed and re-installed Xcode, which also did not help. It appears that there is a horrible memory leak in the scene editor... I only get crazy memory usage on days when I'm editing SpriteKit scenes. Restarting Xcode every hour or two while I'm heavily using the scene editor is an acceptable work-around for now. – itnAAnti Aug 12 '16 at 4:42

You must log in to answer this question.

Browse other questions tagged .