-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Getting a crash log out of Element Desktop
Sometimes, Element Desktop crashes.
A crash manifests itself in two ways:
- The entire app crashes, causing it to disappear. This means the main Electron process has crashed.
- The app's screen goes entirely white. This means the render process of Electron has crashed.
If you instead experience JS errors, spinners that don't go away, or some other breakage - that's not technically a crash, and you should instead report the problem via submitting debug logs (top right menu -> Feedback -> Debug logs). This article is strictly for when you experience a crash of the Electron process.
In order for anyone to work on your issue, you'll need to create a crash log. How difficult this is depends on your system.
Open Console.app (in Applications -> Utilities) and go to Crash Reports. You should be able to see an entry that corresponds to Element crashing. Copy and paste the contents of that report into a comment on the defect issue that you've created.
It depends on your system. The overall idea is
- Configure your system to produce a "core dump" when Element crashes.
- Download debug symbols for Electron.
- Open the core dump in
gdb
, runbt
, and copy and paste the results.
The easiest way to obtain the debug symbols for Electron is to download them from https://github.com/electron/electron/releases. You will need to figure out which version of Electron is in use, which you can do with something like:
strings /opt/Element-Nightly/element-desktop-nightly | awk '/^Chrome\/[0-9.]* Electron\/(.*)/ { print $2 }'
... which should result in something like Electron/27.0.2
.
Once you have the Electron version, go to https://github.com/electron/electron/releases/tag/v<version>
, and download the file named electron-v<version>-linux-<platform>-debug.zip
. Unzip it, and copy the electron.debug
file from the debug
directory to /opt/Element-Nightly
(or /opt/Element
if you are using the release version).
You can then open your coredump in gdb with something like:
gdb /opt/Element-Nightly/element-desktop-nightly /path/to/core.dump
Then type bt<enter>
to produce a stack trace.
If, when you run gdb
, you see:
warning: the debug information found in "/opt/Element-Nightly/electron.debug" does not match "/opt/Element-Nightly/element-desktop-nightly" (CRC mismatch).
... then you probably downloaded the debug symbols for the wrong version of Electron.
Ubuntu normally writes crash files to /var/crash
. To extract the contents, do something like: apport-unpack _opt_Element-Nightly_element-desktop-nightly.1000.crash /tmp/elecrash
.
If the debug symbols are present before the crash occurs, the crash report may (?) include things like a Stacktrace
. Otherwise you can oepn the core dump with gdb
, as above.
See https://wiki.archlinux.org/title/Core_dump#Examining_a_core_dump
Windows generates crash dump files which you can send to an Element maintainer for analysis. These files contain an image of what you've been doing in Element, so this only a sensible option if you're not concerned about the privacy of your data.
The crash dump file will be located in %LOCALAPPDATA%\CrashDumps
on your system. This article has more details.