3

An electron app packaged using electron-packager is crashing and generating dump files.

I was able to use breakpad, minidump_stackwalk to view a part of the dump file. Here's a snapshot of the output,

7  0x7fff6026ec5d
rbp = 0x0000700005badf78   rsp = 0x0000700005badf60
rip = 0x00007fff6026ec5d
Found by: previous frame's frame pointer
8  Electron Framework + 0x2608a0
rsp = 0x0000700005bae028   rip = 0x000000010d94a8a0
Found by: stack scanning

Thread 18
 0  0x7fff60134562
rax = 0x0000000002000170   rdx = 0x0000000000000000
rcx = 0x0000700001a0fee8   rbx = 0x0000700001a10000
rsi = 0x0000000000000000   rdi = 0x0000000000000004
rbp = 0x0000700001a0ff50   rsp = 0x0000700001a0fee8
 r8 = 0x0000000000000fff    r9 = 0x00007fbc4b654000
r10 = 0x0000000000000000   r11 = 0x0000000000000246
r12 = 0x0000000000000001   r13 = 0x0000000000250015
r14 = 0x0000000000000000   r15 = 0x0000000000000004
rip = 0x00007fff60134562
Found by: given as instruction pointer in context
1  0x7fff6026ec4d
rbp = 0x0000700001a0ff78   rsp = 0x0000700001a0ff60
rip = 0x00007fff6026ec4d
  Found by: previous frame's frame pointer

Loaded modules:
0x10d6e7000 - 0x10d6e7fff  Electron Helper  0.0.0.0  (main)  (WARNING: No symbols, Electron Helper, 26BF611B7ACC305A9FC5C535A513256F0)
0x10d6ea000 - 0x11164ffff  Electron Framework  0.0.0.0
0x111ba5000 - 0x111bbffff  Squirrel  1.0.0.0
0x111be1000 - 0x111c44fff  ReactiveCocoa  1.0.0.0
0x111cb6000 - 0x111ccafff  Mantle  1.0.0.0
0x111cdc000 - 0x112beefff  libnode.dylib  0.0.0.0
0x112e7f000 - 0x1130e3fff  libffmpeg.dylib  0.0.0.0
0x116972000 - 0x1169bcfff  dyld  0.0.0.0

This information is not very useful in identifying the crash. Is there any way to obtain a stack trace of the application code where the crash occurred ?

Also, I'm not sure if the WARNING message is relevant or how to go about fixing it if it is.

I've looked at,

But there seems to be a lack of documentation about debugging electron crash reports.

endling
  • 84
  • 1
  • 7

2 Answers2

4

You're looking for the thread which says its crashed.

Without having all the debug symbols locally, minidump_stackwalk is not going to give you anything very useful. It looks like your stack traces above have not been decoded at all so even if you found the crashed thread you'd likely just see memory addresses.

If you can reproduce the crash locally, the quickest way to get a decoded stack trace will be to open a trial account with backtrace.io and point the electron crash reporter at their server. They already have all the Electron symbols and you'll get a decoded stack with very little effort.

In the long run, its a good idea to have your production application pointed at a remote server so you get stack traces automatically. We ended up going with Sentry.io as the whole stack is open source and you get native and JavaScript crashes on one place.

Tim
  • 7,746
  • 3
  • 49
  • 83
  • Thanks. I did create an account with backtrace.io and also uploaded the electron symbols from the [electron release page](https://github.com/electron/electron/releases) but the output in their console is not very different from what I posted. I get a missing symbols error, with missing module, path : Electron Helper version : 0.0.0.0 debug_file : Electron Helper debug_identifier : 26BF611B7ACC305A9FC5C535A513256F0 – endling Mar 07 '18 at 11:03
  • Was this on Windows or Mac? For Windows they should automatically get symbols from the electron symbol server without you having to upload the correct ones. For Mac there are two types of symbols available for download and I can't remember which ones they require... – Tim Mar 07 '18 at 11:08
  • Ah, I see `ReactiveCocoa` so was obviously on Mac. – Tim Mar 07 '18 at 11:08
  • Yes.. I uploaded *.darwin-x64-dsym.zip and *.darwin-x64-symbols.zip – endling Mar 07 '18 at 11:10
  • And you clicked the `Reprocess objects` button? Otherwise not sure what to suggest. – Tim Mar 07 '18 at 11:13
  • I did. I have 496 Valid Symbols and 1 missing symbol, `Electron Helper`. Ideally, does backtrace.io show the JavaScript code which triggered the crash ? I guess I'll try again.. – endling Mar 07 '18 at 11:20
0

You were correct to upload the *dsym.zip and the *symobols.zip, but I would double check that you are grabbing the correct version (e.g. v1.8.7, v2.0.0); the symbol files are only compatible with version they are specified for.

I would try to upload every symbol file for every OS, which it seems you have done, but also uploading the library itself; I found some libraries did not have a symbols or pdb file and so I uploaded the library itself and it worked (this is the case for electron-releases, where it is based off of electron, but is different enough so that the mapping is off).