Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Xcode crashes after successful build with BarBack enabled #1

Closed
a2 opened this issue Nov 3, 2014 · 5 comments
Closed

Latest Xcode crashes after successful build with BarBack enabled #1

a2 opened this issue Nov 3, 2014 · 5 comments
Assignees
Labels

Comments

@a2
Copy link

a2 commented Nov 3, 2014

Crash logs here.

@kylesluder
Copy link
Owner

I can't reproduce this with the latest Xcode downloaded from developer.apple.com. Can you please provide more details?

  • What kind of target are you building?
  • Are you just building, or building and running?
  • Are you running the Mac App Store version of Xcode?
  • Does this problem go away if you remove BarBack?
  • Do you have any other xcplugins installed?

@a2
Copy link
Author

a2 commented Nov 3, 2014

iOS app
Building and running
Yes
Yes
Nope

@kylesluder
Copy link
Owner

Are you running on the device or in the simulator?

Do you mind trying in the direct-download version of Xcode, in case I can't repro it in the MAS version?

@a2
Copy link
Author

a2 commented Nov 3, 2014

I don't recall but I believe simulator.

@kylesluder
Copy link
Owner

OK, I've reproed this and I think I've got it mostly figured out: if the tab bar has never been made visible while the current document has been open, Xcode will crash when trying to run the project.

Here's the backtrace, in case your link goes away:

UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Cannot remove an observer <NSKeyValueObservance 0x7fd23f0c5ba0> for the key path "currentLaunchSession.currentDebugSession.coalescedState" from <IDEExecutionEnvironment 0x7fd23e9224f0>, most likely because the value for the key "currentLaunchSession" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the IDEExecutionEnvironment class.
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff8f1e8634 exceptionPreprocess (in CoreFoundation)
1 0x00000001097022f4 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff8c0a76de objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff8f1e84fd +[NSException raise:format:](in CoreFoundation)
4 0x00007fff96f6cc5d -[NSKeyValueNestedProperty object:didRemoveObservance:recurse:](in Foundation)
5 0x00007fff96f4b571 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:](in Foundation)
6 0x00007fff96f4b369 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:](in Foundation)
7 0x00007fff96f6ca8d -[NSKeyValueNestedProperty object:didRemoveObservance:recurse:](in Foundation)
8 0x00007fff96f4b571 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:](in Foundation)
9 0x00007fff96f4b369 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:](in Foundation)
10 0x0000000109712a05 -[DVTSelectorBasedObservingToken _primitiveCancelObservation](in DVTFoundation)
11 0x00000001097125b0 -[DVTObservingToken cancel](in DVTFoundation)
12 0x0000000109713739 __91-[NSObject(DVTObservingConvenience) dvt_unregisterValueChangedCallbackForKeyPath:ofObject:]_block_invoke (in DVTFoundation)
13 0x00007fff95f0dc13 _dispatch_client_callout (in libdispatch.dylib)
14 0x00007fff95f0ee5e _dispatch_barrier_sync_f_invoke (in libdispatch.dylib)
15 0x0000000109738f6d DVTDispatchBarrierSync (in DVTFoundation)
16 0x000000010953d494 -[DVTDispatchLock performLockedBlock:](in DVTFoundation)
17 0x000000010957fc39 -[NSObject(DVTObservingConvenience) dvt_unregisterValueChangedCallbackForKeyPath:ofObject:](in DVTFoundation)
18 0x000000010ab55c0d -[IDERunPauseContinueToolbarButton _unregisterObservations](in IDEKit)
19 0x000000010ab55a3e -[IDERunPauseContinueToolbarButton _buttonIsMovingToWindowController:](in IDEKit)
20 0x000000010ab559ed -[IDERunPauseContinueToolbarButton viewWillMoveToWindow:](in IDEKit)
21 0x00007fff9539b8cf -[NSView _setWindow:](in AppKit)
22 0x00007fff953ab183 -[NSControl _setWindow:](in AppKit)
23 0x00007fff953ab03f -[NSButton _setWindow:](in AppKit)
24 0x00007fff8f109365 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation)
25 0x00007fff8f108a69 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:](in CoreFoundation)
26 0x00007fff95a89054 __21-[NSView _setWindow:]_block_invoke727 (in AppKit)
27 0x00007fff96f314ae -[NSISEngine withBehaviors:performModifications:](in Foundation)
28 0x00007fff9539a93a -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:](in AppKit)
29 0x00007fff9539c3b2 -[NSView _setWindow:](in AppKit)
30 0x00007fff8f109365 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation)
31 0x00007fff8f108a69 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:](in CoreFoundation)
32 0x00007fff95a89054 __21-[NSView _setWindow:]_block_invoke727 (in AppKit)
33 0x00007fff96f314ae -[NSISEngine withBehaviors:performModifications:](in Foundation)
34 0x00007fff9539a93a -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:](in AppKit)
35 0x00007fff9539c3b2 -[NSView _setWindow:](in AppKit)
36 0x00007fff8f109365 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation)
37 0x00007fff8f108a69 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:](in CoreFoundation)
38 0x00007fff95a89054 __21-[NSView _setWindow:]_block_invoke727 (in AppKit)
39 0x00007fff96f314ae -[NSISEngine withBehaviors:performModifications:](in Foundation)
40 0x00007fff9539a93a -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:](in AppKit)
41 0x00007fff9539c3b2 -[NSView _setWindow:](in AppKit)
42 0x00007fff95399783 -[NSView addSubview:](in AppKit)
43 0x00007fff95a4747a -[NSThemeFrame _moveTitlebarViewsToView:](in AppKit)
44 0x00007fff95a49069 __49-[NSThemeFrame _floatTitlebarAndToolbarFromInit:]_block_invoke (in AppKit)
45 0x00007fff95432489 +[NSAnimationContext runAnimationGroup:completionHandler:](in AppKit)
46 0x00007fff95a48ce1 -[NSThemeFrame _floatTitlebarAndToolbarFromInit:](in AppKit)
47 0x00007fff95a48958 -[NSThemeFrame addUnderTitlebarView:withAssociatedWithView:](in AppKit)
48 0x00007fff95b5d165 -[NSScrollView geometryInWindowDidChange](in AppKit)
49 0x00007fff9539c961 -[NSView _invalidateFocus](in AppKit)
50 0x00007fff953b86e2 -[NSView setFrameSize:](in AppKit)
51 0x00007fff953b7f13 -[NSView setFrame:](in AppKit)
52 0x000000010a8128e0 -[IDEEditorArea _addDebuggerBarToEditorArea](in IDEKit)
53 0x000000010a8125ef -[IDEEditorArea _moveDebuggerBarToEditorArea](in IDEKit)
54 0x000000010a73c0ff -[IDEEditorArea _updateDebuggerBarVisibility](in IDEKit)
55 0x000000010971322b __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke183 (in DVTFoundation)
56 0x000000010968f028 DVTInvokeWithStrongOwnership (in DVTFoundation)
57 0x00000001095428fc -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:](in DVTFoundation)
58 0x00007fff96ee8c73 NSKeyValueNotifyObserver (in Foundation)
59 0x00007fff96ee7e48 NSKeyValueDidChange (in Foundation)
60 0x00007fff96eec9ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:](in Foundation)
61 0x000000010a81245c -[IDEWorkspaceTabController setCurrentLaunchSession:](in IDEKit)
62 0x000000010a8d8c13 __37-[IDEWorkspaceTabController loadView]_block_invoke (in IDEKit)
63 0x000000010971322b __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke183 (in DVTFoundation)
64 0x000000010968f028 DVTInvokeWithStrongOwnership (in DVTFoundation)
65 0x00000001095428fc -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:](in DVTFoundation)
66 0x00007fff96f5b1b3 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:](in Foundation)
67 0x00007fff96ee8c73 NSKeyValueNotifyObserver (in Foundation)
68 0x00007fff96ee7e48 NSKeyValueDidChange (in Foundation)
69 0x00007fff96eec9ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:](in Foundation)
70 0x000000010a0a3415 -[IDEExecutionEnvironment setCurrentLaunchSession:](in IDEFoundation)
71 0x000000010a0a30a0 -[IDEExecutionEnvironment _handleLaunchSession:stateChange:](in IDEFoundation)
72 0x000000010a0908b1 -[IDEExecutionEnvironment observeValueForKeyPath:ofObject:change:context:](in IDEFoundation)
73 0x00007fff96ee8c73 NSKeyValueNotifyObserver (in Foundation)
74 0x00007fff96ee7e48 NSKeyValueDidChange (in Foundation)
75 0x00007fff96eec9ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:](in Foundation)
76 0x000000010a1b93ee __23-[IDERunOperation main]_block_invoke36 (in IDEFoundation)
77 0x0000000109738af7 __DVTSyncPerformBlock_block_invoke (in DVTFoundation)
78 0x00007fff8f10654c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK
(in CoreFoundation)
79 0x00007fff8f0f8655 __CFRunLoopDoBlocks (in CoreFoundation)
80 0x00007fff8f0f7e0e __CFRunLoopRun (in CoreFoundation)
81 0x00007fff8f0f7838 CFRunLoopRunSpecific (in CoreFoundation)
82 0x00007fff8d71343f RunCurrentEventLoopInMode (in HIToolbox)
83 0x00007fff8d7131ba ReceiveNextEventCommon (in HIToolbox)
84 0x00007fff8d712ffb _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
85 0x00007fff95384821 _DPSNextEvent (in AppKit)
86 0x00007fff95383fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:](in AppKit)
87 0x0000000109c6782d -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:](in DVTKit)
88 0x00007fff95377f73 -[NSApplication run](in AppKit)
89 0x00007fff95363424 NSApplicationMain (in AppKit)
90 0x00007fff94d755c9 start (in libdyld.dylib)

@kylesluder kylesluder self-assigned this Nov 6, 2014
@kylesluder kylesluder added the bug label Nov 6, 2014
kylesluder added a commit that referenced this issue Nov 10, 2014
…he window.

If the titlebar is visible, NSThemeFrame winds up moving toolbar buttons to a new view within the same window. IDERunPauseContinueToolbarButton seems to have a bug when it gets -viewWillMoveToWindow: with the same window as it's already inside of. This method calls down to a helper that unregisters existing KVO notifications and then registers new ones; I can't see why this pattern is failing, but it's a scenario that titlebar-less Xcode doesn't hit, so I'm just going to squelch the -viewWillMoveToWindow: notification.

Addresses issue #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants