Open maltheism opened 8 years ago
当frameless windows(frame:false) 时才会出现 NSWindow warning: adding an unknown subview: <WebContentsViewCocoa 的问题。 可能跟这里说的问题原因相似: http://m.blog.csdn.net/article/details?id=50237473 @rogerwang
Not sure if worth commenting but I get no crash dump related to this on nw.js v0.12.3 or earlier. Later versions result in the crash above.
For the record I get something similar when attempting to open frameless window with this code:
var new_win = gui.Window.open('source/index.html', { position: 'center', width: 540/2, height: 304/2, "inject_js_start": "js/inject.js", "frame": false, "transparent": true });
Can't reproduce this issue. I tried on Mac with nwjs-sdk-v0.21.5. I just see the following errors in the console, but nwjs app doesn't crash.
nwjs[15385:266173] NSWindow warning: adding an unknown subview: <WebContentsViewCocoa: 0x7ff13349b9e0>. Break on NSLog to debug
my computer:
This is my command:
/Users/yfzhu/Git/POS-CODE/POS-2017/cache/0.14.7-sdk/osx64/nwjs.app/Contents/MacOS/nwjs --load-extension=/Users/yfzhu/Git/POS-CODE/POS-2017/build/vue-devtools /Users/yfzhu/Git/POS-CODE/POS-2017/tmp/dev
The following is an error message
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2017-08-21 11:56:24.120 nwjs[22694:1894428] NSWindow warning: adding an unknown subview: <WebContentsViewCocoa: 0x7f925a6d3ce0>. Break on NSLog to debug.
2017-08-21 11:56:24.121 nwjs[22694:1894428] Call stack:
(
0 AppKit 0x00007fffcf51eaed -[NSThemeFrame addSubview:] + 109
1 nwjs Framework 0x00000001036c0df3 _ZN2v88UnlockerD1Ev + 20416739
2 nwjs Framework 0x00000001036c067c _ZN2v88UnlockerD1Ev + 20414828
3 nwjs Framework 0x00000001036bf7ea _ZN2v88UnlockerD1Ev + 20411098
4 nwjs Framework 0x00000001041abf42 _ZN2v88UnlockerD1Ev + 31865394
5 nwjs Framework 0x00000001040fa819 _ZN2v88UnlockerD1Ev + 31138569
6 nwjs Framework 0x00000001041c90d1 _ZN2v88UnlockerD1Ev + 31984577
7 nwjs Framework 0x00000001041caeaf _ZN2v88UnlockerD1Ev + 31992223
8 nwjs Framework 0x00000001041cb148 _ZN2v88UnlockerD1Ev + 31992888
9 nwjs Framework 0x00000001041e336c _ZN2v88UnlockerD1Ev + 32091740
10 nwjs Framework 0x00000001043bab82 _ZN2v88UnlockerD1Ev + 34023026
11 nwjs Framework 0x0000000103cf10f4 _ZN2v88UnlockerD1Ev + 26905572
12 nwjs Framework 0x0000000103adaf53 _ZN2v88UnlockerD1Ev + 24717891
13 nwjs Framework 0x0000000103c1e339 _ZN2v88UnlockerD1Ev + 26041897
14 nwjs Framework 0x00000001014ff808 ChromeMain + 15878584
15 nwjs Framework 0x0000000100a97f1b ChromeMain + 4968651
16 nwjs Framework 0x0000000100aba043 ChromeMain + 5108211
17 nwjs Framework 0x0000000100aba31c ChromeMain + 5108940
18 nwjs Framework 0x0000000100aba50b ChromeMain + 5109435
19 nwjs Framework 0x0000000100a8c5a1 ChromeMain + 4921169
20 nwjs Framework 0x0000000100ab066a ChromeMain + 5068826
21 nwjs Framework 0x0000000100a8bfa4 ChromeMain + 4919636
22 CoreFoundation 0x00007fffd1a2b321 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
23 CoreFoundation 0x00007fffd1a0c21d __CFRunLoopDoSources0 + 557
24 CoreFoundation 0x00007fffd1a0b716 __CFRunLoopRun + 934
25 CoreFoundation 0x00007fffd1a0b114 CFRunLoopRunSpecific + 420
26 HIToolbox 0x00007fffd0f6bebc RunCurrentEventLoopInMode + 240
27 HIToolbox 0x00007fffd0f6bcf1 ReceiveNextEventCommon + 432
28 HIToolbox 0x00007fffd0f6bb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
29 AppKit 0x00007fffcf504a54 _DPSNextEvent + 1120
30 AppKit 0x00007fffcfc807ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
31 AppKit 0x00007fffcf4f93db -[NSApplication run] + 926
32 nwjs Framework 0x0000000100a8cd36 ChromeMain + 4923110
33 nwjs Framework 0x0000000100a8c3f4 ChromeMain + 4920740
34 nwjs Framework 0x0000000100acfa53 ChromeMain + 5196803
35 nwjs Framework 0x0000000100663478 ChromeMain + 558632
36 nwjs Framework 0x0000000103a278e7 _ZN2v88UnlockerD1Ev + 23983063
37 nwjs Framework 0x0000000103a29eb2 _ZN2v88UnlockerD1Ev + 23992738
38 nwjs Framework 0x0000000103a236fd _ZN2v88UnlockerD1Ev + 23966189
39 nwjs Framework 0x0000000100a4e2e8 ChromeMain + 4666520
40 nwjs Framework 0x0000000100a4d796 ChromeMain + 4663622
41 nwjs Framework 0x00000001005dae92 ChromeMain + 66
42 nwjs 0x000000010055ed52 main + 530
43 nwjs 0x000000010055eb34 nwjs + 2868
)
Now I can reproduce this issue on another Mac with nwjs-sdk-v0.26.2.
Any way to get around this message? I need clean output.
set frame
to be true
and it goes away.
Is there any other solution?
two years passed, why frame crash still exists?
I'm receiving a crash dump when using transparent with no frame in package.json
Simple project to reproduce: https://github.com/AlizeeIOsys/420/tree/master/nodejs/Sample
Using nw.js v0.14.5 SDK OS: OS X El Capitan Version 10.11.4
Crash dump: