Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Occasionally crashes on Electron 16 #62

Open
1 task done
craftzdog opened this issue Dec 15, 2021 · 0 comments
Open
1 task done

Occasionally crashes on Electron 16 #62

craftzdog opened this issue Dec 15, 2021 · 0 comments

Comments

@craftzdog
Copy link

Prerequisites

I'm using this module in my app.

Description

The renderer process crashes occasionally with the following stacktrace in the main process:

node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Helper (Renderer).app/Contents/MacOS/Electron Helper (Renderer)[8617]: ../../third_party/electron_node/src/api/callback.cc:272:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
 1: 0x1161d8855 node::FatalException(v8::Isolate*, v8::TryCatch const&) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x1161d862f node::FatalException(v8::Isolate*, v8::TryCatch const&) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x1161305af node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x1047f5ea5 Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*, Nan::AsyncResource*) const [/path/to/app/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node]
 5: 0x1047f4dca KeyboardLayoutManager::HandleKeyboardLayoutChanged() [/path/to/app/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node]
 6: 0x10f3edc82 uv_async_send [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10f3ff81b uv_free_interface_addresses [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x10f3ee09f uv_run [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x10f5676a3 ElectronInitializeICUandStartNode [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x1125c42db _TIFFSwab64BitData [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x1125deda3 _TIFFSwab64BitData [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x112621421 base::mac::CxxPersonalityRoutine(int, _Unwind_Action, unsigned long long, _Unwind_Exception*, _Unwind_Context*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x112620582 base::mac::CxxPersonalityRoutine(int, _Unwind_Action, unsigned long long, _Unwind_Exception*, _Unwind_Context*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x112620b4f base::mac::CxxPersonalityRoutine(int, _Unwind_Action, unsigned long long, _Unwind_Exception*, _Unwind_Context*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
15: 0x7ff81e79184d __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
16: 0x7ff81e7917b5 __CFRunLoopDoSource0 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
17: 0x7ff81e791534 __CFRunLoopDoSources0 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
18: 0x7ff81e78ff6b __CFRunLoopRun [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
19: 0x7ff81e78f52d CFRunLoopRunSpecific [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
20: 0x7ff81f5f775e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] [/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation]
21: 0x112621c19 base::mac::CxxPersonalityRoutine(int, _Unwind_Action, unsigned long long, _Unwind_Exception*, _Unwind_Context*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
22: 0x1126205f2 base::mac::CxxPersonalityRoutine(int, _Unwind_Action, unsigned long long, _Unwind_Exception*, _Unwind_Context*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
23: 0x1125e030a _TIFFSwab64BitData [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
24: 0x1125aa221 _TIFFSwab64BitData [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
25: 0x115f42d6f device::MapperSwitchPro(device::Gamepad const&, device::Gamepad*) [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
26: 0x1104bc08d cdef_copy_rect8_16bit_to_16bit_sse4_1 [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
27: 0x1104baa8b cdef_copy_rect8_16bit_to_16bit_sse4_1 [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
28: 0x1104bb389 cdef_copy_rect8_16bit_to_16bit_sse4_1 [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
29: 0x10f3ffe06 ElectronMain [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
30: 0x104439aa0  [/path/to/app/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Helper (Renderer).app/Contents/MacOS/Electron Helper (Renderer)]
31: 0x10f33b4fe

Steps to Reproduce

It randomly happens and I cannot find a way to reproduce it at the moment.

Versions

  • keyboard-layout 2.0.17
  • Electron 16.0.4
  • macOS 12.0.1

Additional Information

Looks like the exception happens via KeyboardLayoutManager::HandleKeyboardLayoutChanged.
I haven't changed the keyboard layout but perhaps it is invoked when switching between English to Japanese input?
I'm using Google Japanese Input.
I would be happy to contribute. Please let me know where to fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant