Changing tab width in prefs while Bundle Editor is open causes exception #2246

Closed
dmoagx opened this Issue Sep 30, 2015 · 1 comment

Projects

None yet

1 participant

@dmoagx
Collaborator
dmoagx commented Sep 30, 2015

Example:

<SPBundleCommandTextView: 0x60000016e4c0>
    Frame = {{0.00, 0.00}, {832.00, 384.00}}, Bounds = {{0.00, 0.00}, {832.00, 384.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {832.00, 384.00}, MaxSize = {10000000.00, 10000000.00}
: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled.
Key path: CustomQueryEditorTabStopWidth
Observed object: <NSUserDefaults: 0x60000004eca0>
Change: {
    kind = 1;
    new = 3;
}
Context: 0x0
2015-09-30 17:32:26.242 Sequel Pro[73404:303] (
    0   CoreFoundation                      0x00007fff9189125c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff921ece75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9189110c +[NSException raise:format:] + 204
    3   Foundation                          0x00007fff85d1eb3f -[NSObject(NSKeyValueObserving) observeValueForKeyPath:ofObject:change:context:] + 73
    4   Foundation                          0x00007fff85c08548 NSKeyValueNotifyObserver + 387
    5   Foundation                          0x00007fff85c07718 NSKeyValueDidChange + 453
    6   Foundation                          0x00007fff85c0c206 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
    7   CoreFoundation                      0x00007fff917cdf9f _CFPreferencesSetValueWithContainer + 239
    8   Foundation                          0x00007fff85c2dc10 -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 38
    9   AppKit                              0x00007fff885ebafa -[NSUserDefaultsController _setSingleValue:forKey:] + 147
    10  Foundation                          0x00007fff85c797ba -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 285
    11  AppKit                              0x00007fff885d444c -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 364
    12  AppKit                              0x00007fff885d4287 -[NSBinder setValue:forBinding:error:] + 245
    13  AppKit                              0x00007fff88acc4ee -[NSValueBinder _applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:] + 194
    14  AppKit                              0x00007fff88acc871 -[NSValueBinder applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:error:] + 621
    15  AppKit                              0x00007fff88606087 -[NSValueBinder performAction:] + 288
    16  AppKit                              0x00007fff88605f45 -[_NSBindingAdaptor _objectDidTriggerAction:bindingAdaptor:] + 133
    17  AppKit                              0x00007fff885940c0 -[NSControl sendAction:to:] + 56
    18  AppKit                              0x00007fff885e0c4d -[NSCell _sendActionFrom:] + 128
    19  AppKit                              0x00007fff889f1636 -[NSStepperCell _sendActionFrom:] + 104
    20  AppKit                              0x00007fff885fa085 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 828
    21  AppKit                              0x00007fff889f1473 -[NSStepperCell trackMouse:inRect:ofView:untilMouseUp:] + 118
    22  AppKit                              0x00007fff885f913d -[NSControl mouseDown:] + 706
    23  AppKit                              0x00007fff8857aa58 -[NSWindow sendEvent:] + 11296
    24  AppKit                              0x00007fff885195d4 -[NSApplication sendEvent:] + 2021
    25  AppKit                              0x00007fff883699f9 -[NSApplication run] + 646
    26  AppKit                              0x00007fff88354783 NSApplicationMain + 940
    27  Sequel Pro                          0x0000000100002392 main + 34
    28  Sequel Pro                          0x0000000100001a94 start + 52
    29  ???                                 0x0000000000000003 0x0 + 3
)

This is due to SPBundleCommandTextView subscribing to a pref key without actually implementing observeValueForKeyPath:ofObject:change:context:

@dmoagx dmoagx closed this in 465062d Sep 30, 2015
@dmoagx dmoagx added a commit that referenced this issue Oct 2, 2015
@dmoagx dmoagx Fix an exception when changing the tab indentation while the Bundle E…
…ditor is open (fixes #2246)
10fd5b3
@dmoagx dmoagx reopened this Oct 2, 2015
@dmoagx dmoagx added this to the 1.1.1 milestone Oct 30, 2015
@dmoagx
Collaborator
dmoagx commented Feb 20, 2016
@dmoagx dmoagx closed this Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment