Crash when attempting to print note (Ubuntu 22.04, deb package)

Bug report

Linux app crashes when attempting to print any note.

Terminal output:

[bugsnag] Loaded!
  app:info Initializing inkdrop app.. +0ms
  app:info Arguments: /usr/lib/inkdrop/inkdrop +3ms
  app:info Starting inkdrop app.. +97ms
  app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined } +41ms
  app:info Starting a session +104ms
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
[1225358:0527/130248.154167:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
Crashing due to FD ownership violation:
#0 0x565460471b03 <unknown>
#1 0x56546051ab5c <unknown>
#2 0x56546051ab21 <unknown>
#3 0x7f976dca4ef3 <unknown>
Trace/breakpoint trap

Environment

  • Platform: Ubuntu
  • Platform version: 22.04 LTS (GNOME 42)
  • App Version: 5.5.1

How to reproduce

  1. Install Inkdrop from DEB package on Ubuntu 22.04 LTS.

  2. Try to print a note with Ctrl+Shift+P.

  3. App window darkens, (GNOME “Force Quit”/“Wait” dialog may appear) then app crashes.

Hi Rando,

Thanks for the report.
Looks like a bug in Electron 16:

Will be planning to upgrade to the latest version in the future as it involves significant breaking changes.

I’ve tried to reproduce it on Ubuntu 22.04 but it didn’t crash. My environment:

❯ uname -a
Linux ubuntu 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

So, looks like it’s not an Electron’s bug. It could be an environment-dependent issue.
I can see it failed to initialize a sandbox in your error log.
Can you please try running Inkdrop with --disable-gpu-sandbox option?

Still crashes.

[bugsnag] Loaded!
  app:info Initializing inkdrop app.. +0ms
  app:info Arguments: /usr/lib/inkdrop/inkdrop +3ms
  app:info Arguments: --disable-gpu-sandbox +0ms
  app:info Starting inkdrop app.. +103ms
  app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined } +52ms
  app:info Starting a session +108ms
Crashing due to FD ownership violation:
#0 0x5604ac7eab03 <unknown>
#1 0x5604ac893b5c <unknown>
#2 0x5604ac893b21 <unknown>
#3 0x7f050d575ef3 <unknown>
Trace/breakpoint trap

Joplin (AppImage) also seems to be using Electron and has a similar crash when I attempt to print. It doesn’t recognize the “–disable-gpu-sandbox” flag, so I ran without it:

xdg-settings: invalid application name
Try 'xdg-settings --help' for more information.
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
[3192602:0601/215615.190912:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
(node:3192561) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15.  See https://github.com/electron/electron/issues/28511 for more information.
(Use `@joplinapp-desktop --trace-warnings ...` to show where the warning was created)
(node:3192561) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15.  See https://github.com/electron/electron/issues/28511 for more information.
(node:3192561) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15.  See https://github.com/electron/electron/issues/28511 for more information.
Crashing due to FD ownership violation:
#0 0x55f45fc54f83 <unknown>
#1 0x55f45fcfbfbc <unknown>
#2 0x55f45fcfbf81 close
#3 0x7f25b7cfbef3 <unknown>

Thanks for the report.
Yeah, it might be a bug in Electron but not resolved yet because it randomly happens: