You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
Electron Version:
9.2.1
Operating System:
macOS 10.14.6
Last Known Working Electron version:
8.5.0
Expected Behavior
Not crash when trying to load the module.
Actual Behavior
Crashes when trying to load the module
To Reproduce
I have put together 2 sample repositories to reproduce this bug. If there are any problems following these steps I will happily fix any problems with them.
$ mkdir electron_9_native_add_on_bug
$ cd electron_9_native_add_on_bug
$ git clone https://github.com/mastergberry/SimpleNativeAddon
$ git clone https://github.com/mastergberry/SimpleElectronApp
$ cd SimpleNativeAddon
$ yarn install
$ yarn build
$ cp build/Release/SimpleNativeAddon.node ../SimpleElectronApp/app/
$ cd ../SimpleElectronApp
$ yarn install
$ yarn dev
These steps above should start the application and then have it crash on boot. So far I have reproduced this on Windows and macOS, have not tried Linux yet.
My guess is it has something to do with the flags that cmake-js uses to compile versus node-gyp. From my testing disabling the inline functions on Windows is a temporary workaround...but this is a hacky solution. Hoping that there is a core issue that can be resolved here.
Hey @sofianguy sorry for the tag. Just wanted to inform you that this is also on 10.x.y and 11.x.y. I tested both.
Also this is happening on Windows as well. Here is the assembly crash from Visual Studio on Windows:
node::AsyncResource::CallbackScope::~CallbackScope:
00007FFE3FF416A0 mov qword ptr [rsp+8],rcx
00007FFE3FF416A5 sub rsp,28h
00007FFE3FF416A9 add rsp,28h
00007FFE3FF416AD jmp qword ptr [__imp_node::CallbackScope::~CallbackScope (07FFE3FF84238h)]
00007FFE3FF416B4 int 3
00007FFE3FF416B5 int 3
00007FFE3FF416B6 int 3
00007FFE3FF416B7 int 3
00007FFE3FF416B8 int 3
00007FFE3FF416B9 int 3
00007FFE3FF416BA int 3
00007FFE3FF416BB int 3
00007FFE3FF416BC int 3
00007FFE3FF416BD int 3
00007FFE3FF416BE int 3
00007FFE3FF416BF int 3
00007FFE3FF416C0 mov qword ptr [rsp+18h],rbx
00007FFE3FF416C5 mov qword ptr [rsp+20h],rbp
00007FFE3FF416CA push rsi
00007FFE3FF416CB push rdi
00007FFE3FF416CC push r14
00007FFE3FF416CE sub rsp,30h
00007FFE3FF416D2 mov rbx,qword ptr [rcx]
00007FFE3FF416D5 mov r14d,420h
00007FFE3FF416DB mov rsi,rcx
00007FFE3FF416DE mov rcx,qword ptr [rbx+20h]
00007FFE3FF416E2 lea ebp,[r14-10h]
00007FFE3FF416E6 mov rax,qword ptr [rcx-1]
00007FFE3FF416EA movzx edx,word ptr [rax+0Bh]
I'm not having much luck today getting a nicer error from Windows unfortunately. Sorry about that. You can still reproduce it by using the repositories I provided though.
Preflight Checklist
Issue Details
Expected Behavior
Not crash when trying to load the module.
Actual Behavior
Crashes when trying to load the module
To Reproduce
I have put together 2 sample repositories to reproduce this bug. If there are any problems following these steps I will happily fix any problems with them.
These steps above should start the application and then have it crash on boot. So far I have reproduced this on Windows and macOS, have not tried Linux yet.
Related issues: nodejs/nan#898 & wilix-team/iohook#241
My guess is it has something to do with the flags that cmake-js uses to compile versus node-gyp. From my testing disabling the inline functions on Windows is a temporary workaround...but this is a hacky solution. Hoping that there is a core issue that can be resolved here.
Additional Information
Crash log in macOS:
The text was updated successfully, but these errors were encountered: