ShowDevTools method generates warnings on Mac OS X Yosemite when launching DevTools window. This seems to cause a crash later on in my app. Here's what Apple documentation states.
NSWindow has never supported clients adding subviews to anything other than the contentView. Some applications would add subviews to the contentView.superview (also known as the border view of the window).
NSWindow will now log when it detects this scenario: "NSWindow warning: adding an unknown subview:".
**Applications doing this will need to fix this problem**, as it prevents new features on 10.10 from working properly. See titlebarAccessoryViewControllers for official API.
- Code: Select all
2014-10-02 14:52:28.587 TestApp[11467:1415359] NSWindow warning: adding an unknown subview: <OpaqueView: 0x61800033cc00>
2014-10-02 14:52:28.842 TestApp[11467:1415359] Call stack:
(
0 AppKit 0x00007fff91236b2c -[NSThemeFrame addSubview:] + 107
1 Chromium Embedded Framework 0x0000000104216d4b -[UnderlayOpenGLHostingWindow initWithContentRect:styleMask:backing:defer:] + 1595
2 Chromium Embedded Framework 0x00000001020a35cd _ZN18CefBrowserHostImpl20PlatformCreateWindowEv + 797
3 Chromium Embedded Framework 0x0000000101ea6b41 _ZN18CefBrowserHostImpl14CreateInternalERK13CefWindowInfoRK13CefStructBaseI24CefBrowserSettingsTraitsE9CefRefPtrI9CefClientEPN7content11WebContentsE13scoped_refptrI14CefBrowserInfoEP6NSViewS8_I17CefRequestContextE + 1137
4 Chromium Embedded Framework 0x0000000101ea6579 _ZN18CefBrowserHostImpl6CreateERK13CefWindowInfo9CefRefPtrI9CefClientERK13CefStringBaseI20CefStringTraitsUTF16ERK13CefStructBaseI24CefBrowserSettingsTraitsEP6NSViewbS3_I17CefRequestContextE + 697
5 Chromium Embedded Framework 0x0000000101f1b74c _ZN19CefDevToolsFrontend4ShowE9CefRefPtrI18CefBrowserHostImplERK13CefWindowInfoS0_I9CefClientERK13CefStructBaseI24CefBrowserSettingsTraitsE + 348
6 Chromium Embedded Framework 0x0000000101eaa7fc _ZN18CefBrowserHostImpl12ShowDevToolsERK13CefWindowInfo9CefRefPtrI9CefClientERK13CefStructBaseI24CefBrowserSettingsTraitsE + 236
7 Chromium Embedded Framework 0x0000000101e099e7 _Z27browser_host_show_dev_toolsP19_cef_browser_host_tPK18_cef_window_info_tP13_cef_client_tPK23_cef_browser_settings_t + 919
8 TestApp 0x0000000100cf196f _ZN20CefBrowserHostCToCpp12ShowDevToolsERK13CefWindowInfo9CefRefPtrI9CefClientERK13CefStructBaseI24CefBrowserSettingsTraitsE + 415
9 TestApp 0x00000001000ffc5b _ZN17GCefClientHandler12ShowDevToolsE9CefRefPtrI10CefBrowserE + 219
10 TestApp 0x00000001000ffae3 _ZN17GCefClientHandler20OnContextMenuCommandE9CefRefPtrI10CefBrowserES0_I8CefFrameES0_I20CefContextMenuParamsEi17cef_event_flags_t + 131
11 TestApp 0x00000001000ffddc _ZThn8_N17GCefClientHandler20OnContextMenuCommandE9CefRefPtrI10CefBrowserES0_I8CefFrameES0_I20CefContextMenuParamsEi17cef_event_flags_t + 44
12 TestApp 0x0000000100cfd5e8 _Z44context_menu_handler_on_context_menu_commandP27_cef_context_menu_handler_tP14_cef_browser_tP12_cef_frame_tP26_cef_context_menu_params_ti17cef_event_flags_t + 552
13 Chromium Embedded Framework 0x0000000101e1d200 _ZN27CefContextMenuHandlerCToCpp20OnContextMenuCommandE9CefRefPtrI10CefBrowserES0_I8CefFrameES0_I20CefContextMenuParamsEi17cef_event_flags_t + 912
14 Chromium Embedded Framework 0x0000000101f3d994 _ZN14CefMenuCreator14ExecuteCommandE9CefRefPtrI16CefMenuModelImplEi17cef_event_flags_t + 692
15 Chromium Embedded Framework 0x0000000101f44253 _ZN16CefMenuModelImpl11ActivatedAtEi17cef_event_flags_t + 163
16 Chromium Embedded Framework 0x0000000101f45103 _ZN12_GLOBAL__N_118CefSimpleMenuModel11ActivatedAtEii + 51
17 Chromium Embedded Framework 0x0000000104213d7c -[MenuController itemSelected:] + 380
18 libsystem_trace.dylib 0x00007fff94499cd7 _os_activity_initiate + 75
19 AppKit 0x00007fff90d446d7 -[NSApplication sendAction:to:from:] + 410
20 AppKit 0x00007fff90d5e81a -[NSMenuItem _corePerformAction] + 382
21 AppKit 0x00007fff90d5e537 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
22 libsystem_trace.dylib 0x00007fff94499cd7 _os_activity_initiate + 75
23 AppKit 0x00007fff90dabdd6 -[NSMenu performActionForItemAtIndex:] + 131
24 AppKit 0x00007fff90dabd46 -[NSMenu _internalPerformActionForItemAtIndex:] + 35
25 AppKit 0x00007fff90dabb92 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 107
26 AppKit 0x00007fff90d5412b NSSLMMenuEventHandler + 724
27 HIToolbox 0x00007fff9085632c _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1260
28 HIToolbox 0x00007fff9085576e _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 386
29 HIToolbox 0x00007fff9086a286 SendEventToEventTarget + 40
30 HIToolbox 0x00007fff9089f795 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 428
31 HIToolbox 0x00007fff908d2e8d SendMenuCommandWithContextAndModifiers + 59
32 HIToolbox 0x00007fff908d2e34 SendMenuItemSelectedEvent + 188
33 HIToolbox 0x00007fff908d2d06 _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 96
34 HIToolbox 0x00007fff90a02bc1 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK14__CFDictionaryPK10__CFStringPP13OpaqueMenuRefPt + 1877
35 HIToolbox 0x00007fff90a01d44 _ZL26_HandlePopUpMenuSelection8P13OpaqueMenuRefP14OpaqueEventRefj5PointtjPK4RecttS6_S6_PK14__CFDictionaryPK10__CFStringPS0_Pt + 633
36 HIToolbox 0x00007fff90a01edb _HandlePopUpMenuSelectionWithDictionary + 287
37 AppKit 0x00007fff90daaa2c _NSSLMPopUpCarbonMenu3 + 5567
38 AppKit 0x00007fff90f0c97a -[NSCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 182
39 AppKit 0x00007fff91087cb6 -[NSMenu _popUpContextMenu:withEvent:forView:withFont:] + 197
40 Chromium Embedded Framework 0x00000001020ab030 _ZN23CefMenuCreatorRunnerMac14RunContextMenuEP14CefMenuCreator + 1808
41 Chromium Embedded Framework 0x0000000101f3cbc8 _ZN14CefMenuCreator17CreateContextMenuERKN7content17ContextMenuParamsE + 1560
42 Chromium Embedded Framework 0x0000000101eb274c _ZN18CefBrowserHostImpl17HandleContextMenuERKN7content17ContextMenuParamsE + 156
43 Chromium Embedded Framework 0x0000000101eb27b4 _ZThn16_N18CefBrowserHostImpl17HandleContextMenuERKN7content17ContextMenuParamsE + 52
44 Chromium Embedded Framework 0x0000000102b35185 _ZN7content15WebContentsImpl15ShowContextMenuERKNS_17ContextMenuParamsE + 85
45 Chromium Embedded Framework 0x0000000102b35204 _ZThn160_N7content15WebContentsImpl15ShowContextMenuERKNS_17ContextMenuParamsE + 52
46 Chromium Embedded Framework 0x00000001029c2c1b _ZN7content18RenderViewHostImpl13OnContextMenuERKNS_17ContextMenuParamsE + 331
47 Chromium Embedded Framework 0x00000001029ce4f3 _Z16DispatchToMethodIN7content18RenderViewHostImplEMS1_FvRKNS0_17ContextMenuParamsEES2_EvPT_T0_RK6Tuple1IT1_E + 179
48 Chromium Embedded Framework 0x00000001029c9a89 _ZN23ViewHostMsg_ContextMenu8DispatchIN7content18RenderViewHostImplES2_MS2_FvRKNS1_17ContextMenuParamsEEEEbPKN3IPC7MessageEPT_PT0_T1_ + 153
49 Chromium Embedded Framework 0x00000001029bff36 _ZN7content18RenderViewHostImpl17OnMessageReceivedERKN3IPC7MessageE + 6966
50 Chromium Embedded Framework 0x00000001029c4864 _ZThn24_N7content18RenderViewHostImpl17OnMessageReceivedERKN3IPC7MessageE + 52
51 Chromium Embedded Framework 0x0000000102993169 _ZN7content21RenderProcessHostImpl17OnMessageReceivedERKN3IPC7MessageE + 1881
52 Chromium Embedded Framework 0x00000001029935b4 _ZThn8_N7content21RenderProcessHostImpl17OnMessageReceivedERKN3IPC7MessageE + 52
53 Chromium Embedded Framework 0x0000000102f25c37 _ZN3IPC12ChannelProxy7Context17OnDispatchMessageERKNS_7MessageE + 407
54 Chromium Embedded Framework 0x0000000102f2d8c4 _ZN4base8internal15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS2_7MessageEEE3RunEPS4_S7_ + 164
55 Chromium Embedded Framework 0x0000000102f2d7bf _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS3_7MessageEEEEFvRKPS5_S8_EE8MakeItSoESB_SE_S8_ + 79
56 Chromium Embedded Framework 0x0000000102f2d70c _ZN4base8internal7InvokerILi2ENS0_9BindStateINS0_15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS4_7MessageEEEEFvPS6_S9_EFvSD_S7_EEESE_E3RunEPNS0_13BindStateBaseE + 140
57 Chromium Embedded Framework 0x00000001021898aa _ZNK4base8CallbackIFvvEE3RunEv + 74
58 Chromium Embedded Framework 0x0000000102186a76 _ZN4base11MessageLoop7RunTaskERKNS_11PendingTaskE + 1030
59 Chromium Embedded Framework 0x0000000102186e79 _ZN4base11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE + 89
60 Chromium Embedded Framework 0x0000000102187143 _ZN4base11MessageLoop6DoWorkEv + 323
61 Chromium Embedded Framework 0x00000001020bd9ae _ZN4base24MessagePumpCFRunLoopBase7RunWorkEv + 174
62 Chromium Embedded Framework 0x00000001020bcf5b _ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv + 43
63 CoreFoundation 0x00007fff92fe0661 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
64 CoreFoundation 0x00007fff92fd28bc __CFRunLoopDoSources0 + 476
65 CoreFoundation 0x00007fff92fd1e1f __CFRunLoopRun + 927
66 CoreFoundation 0x00007fff92fd1838 CFRunLoopRunSpecific + 296
67 HIToolbox 0x00007fff9087c43f RunCurrentEventLoopInMode + 235
68 HIToolbox 0x00007fff9087c1ba ReceiveNextEventCommon + 431
69 HIToolbox 0x00007fff9087bffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
70 AppKit 0x00007fff90b75911 _DPSNextEvent + 964
71 AppKit 0x00007fff90b750c0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
72 Chromium Embedded Framework 0x00000001020beae2 _ZN4base24MessagePumpNSApplication5DoRunEPNS_11MessagePump8DelegateE + 578
73 Chromium Embedded Framework 0x00000001020bd640 _ZN4base24MessagePumpCFRunLoopBase3RunEPNS_11MessagePump8DelegateE + 128
74 Chromium Embedded Framework 0x00000001021863ce _ZN4base11MessageLoop11RunInternalEv + 222
75 Chromium Embedded Framework 0x00000001021862c3 _ZN4base11MessageLoop10RunHandlerEv + 35
76 Chromium Embedded Framework 0x00000001021e7d23 _ZN4base7RunLoop3RunEv + 67
77 Chromium Embedded Framework 0x00000001021e7f7a _ZN4base7RunLoop12RunUntilIdleEv + 42
78 Chromium Embedded Framework 0x0000000101ee535f _ZN21CefBrowserMessageLoop22DoMessageLoopIterationEv + 47
79 Chromium Embedded Framework 0x0000000101f0555f _Z20CefDoMessageLoopWorkv + 351
80 Chromium Embedded Framework 0x0000000101df00fb cef_do_message_loop_work + 27
81 TestApp 0x0000000100ce4c7b _Z20CefDoMessageLoopWorkv + 27
82 TestApp 0x0000000100009576 __45-[AppDelegate applicationDidFinishLaunching:]_block_invoke_2 + 54
83 libdispatch.dylib 0x0000000116df02bb _dispatch_call_block_and_release + 12
84 libdispatch.dylib 0x0000000116dead43 _dispatch_client_callout + 8
85 libdispatch.dylib 0x0000000116df9d9f _dispatch_main_queue_callback_4CF + 1370
86 CoreFoundation 0x00007fff93015c59 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
87 CoreFoundation 0x00007fff92fd22ef __CFRunLoopRun + 2159
88 CoreFoundation 0x00007fff92fd1838 CFRunLoopRunSpecific + 296
89 HIToolbox 0x00007fff9087c43f RunCurrentEventLoopInMode + 235
90 HIToolbox 0x00007fff9087c1ba ReceiveNextEventCommon + 431
91 HIToolbox 0x00007fff9087bffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
92 AppKit 0x00007fff90b75911 _DPSNextEvent + 964
93 AppKit 0x00007fff90b750c0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
94 AppKit 0x00007fff90b69063 -[NSApplication run] + 594
95 AppKit 0x00007fff90b54524 NSApplicationMain + 1832
96 TestApp 0x000000010001bcb2 main + 34
97 TestApp 0x0000000100005fb4 start + 52
98 ??? 0x0000000000000006 0x0 + 6
)