mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.02k stars 827 forks source link

Desktop App randomly crashes on latest test build #646

Closed jasonblais closed 7 years ago

jasonblais commented 7 years ago

I confirm (by marking "x" in the [ ] below: [x]):


Summary Desktop App randomly crashes on latest test build

Steps to reproduce

No repro steps so far.

Reproduced on

On latest test build from https://github.com/mattermost/desktop/pull/645

Observed behavior

Win10 crash report:

Application: Mattermost 3.7.1
Platform: Windows_NT 10.0.14393 x64
Error: The GPU process has crached
    at App.app.on (C:\...l\mattermost\app-3.7.1\resources\app.asar\main_bundle.js:7832:9)
    at emitTwo (events.js:106:13)
    at App.emit (events.js:194:7)

MacOS crash report:

Crashed Thread:        Unknown

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       0x000000000000000a, 0x000000010eaccae0
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Bus error: 10
Termination Reason:    Namespace SIGNAL, Code 0xa
Terminating Process:   exc handler [0]

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000104  rbx: 0x000000000005ae00  rcx: 0x000070001899ebb8  rdx: 0x000000000005ae00
  rdi: 0x00006000001ad0a8  rsi: 0x0005ae000005b500  rbp: 0x000070001899ec50  rsp: 0x000070001899ebb8
   r8: 0x0000000000000000   r9: 0x0000000000000061  r10: 0x0000000000000000  r11: 0x0000000000000246
  r12: 0x00006000001ad0a8  r13: 0x0000000000000016  r14: 0x0005ae000005b500  r15: 0x000000000005b500
  rip: 0x00007fff9f6cebf2  rfl: 0x0000000000000247  cr2: 0x000034c45a10c000

Logical CPU:     0
Error Code:      0x02000131
Trap Number:     133
jasonblais commented 7 years ago

^Both happened around the same time on pre-release.mattermost.com. However, no obvious errors in Server Logs, and no performance issues detected that could be related.

yuya-oc commented 7 years ago

I believe the issue is not related to servers.

The error itself was added at #626 via Electron's gpu-process-crashed event. However perhaps we should not finish the app because Electron might recover the process. electron/electron#832

jasonblais commented 7 years ago

Got it. Yeah I think if Electron recovers the process then we should keep the app open when possible. But otherwise having the dialog is helpful when the app does actually crash.

Given two people (out of ~4 who tried testing it) experienced the crash, it might occur quite frequently.

yuya-oc commented 7 years ago

As written at electron/electron#832, I tried killing the gpu process by using Process Explorer. The window turned black just for a moment, then a new gpu process spawned. After that, the window is still correctly shown. After killing three times, it seems that Electron will not use the gpu process while the app is running.

So probably we can fix this issue by ignoring the event as well as before. (Probably console log is enough)

jasonblais commented 7 years ago

@yuya-oc I think that sounds good

jasonblais commented 7 years ago

Closed by https://github.com/mattermost/desktop/pull/647