New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron crash after close #10188

Closed
BOOMER74 opened this Issue Aug 3, 2017 · 13 comments

Comments

Projects
None yet
8 participants
@BOOMER74
Copy link

BOOMER74 commented Aug 3, 2017

  • Electron version: 1.7.4, 1.7.5
  • Operating system: Windows 10 x64 (all last updates)

Expected behavior

All good.

Actual behavior

Electron crash.

How to reproduce

Just start electron (without any app) and close.

Event log:

Имя сбойного приложения: electron.exe, версия: 1.7.4.0, метка времени: 0x59542618
Имя сбойного модуля: ntdll.dll, версия: 10.0.15063.447, метка времени: 0xa329d3a8
Код исключения: 0xc0000005
Смещение ошибки: 0x0000000000030e01
Идентификатор сбойного процесса: 0x22c0
Время запуска сбойного приложения: 0x01d30c5703cb17a4
Путь сбойного приложения: C:\Users\BOOMER\Desktop\electron-v1.7.4-win32-x64\electron.exe
Путь сбойного модуля: C:\WINDOWS\SYSTEM32\ntdll.dll
Идентификатор отчета: 1517ce40-79b8-4f39-931f-7d7688fd3cd0
Полное имя сбойного пакета: 
Код приложения, связанного со сбойным пакетом: 
Имя сбойного приложения: electron.exe, версия: 1.7.5.0, метка времени: 0x596d1933
Имя сбойного модуля: ntdll.dll, версия: 10.0.15063.447, метка времени: 0xa329d3a8
Код исключения: 0xc0000005
Смещение ошибки: 0x0000000000030e01
Идентификатор сбойного процесса: 0x248
Время запуска сбойного приложения: 0x01d30c570d8ac219
Путь сбойного приложения: C:\Users\BOOMER\Desktop\electron-v1.7.5-win32-x64\electron.exe
Путь сбойного модуля: C:\WINDOWS\SYSTEM32\ntdll.dll
Идентификатор отчета: 9dbc6e6a-5d74-4963-87aa-29eee44dcd47
Полное имя сбойного пакета: 
Код приложения, связанного со сбойным пакетом: 

On version 1.7.3 work fine.

@enlight

This comment has been minimized.

Copy link
Contributor

enlight commented Aug 3, 2017

Yep, I can reproduce this with the quick-start on 1.7.4.

Event Viewer -> Windows Logs -> Application:

Faulting application name: electron.exe, version: 1.7.4.0, time stamp: 0x59542618
Faulting module name: ntdll.dll, version: 10.0.15063.447, time stamp: 0xa329d3a8
Exception code: 0xc0000005
Fault offset: 0x0000000000030e01
Faulting process id: 0x3554
Faulting application start time: 0x01d30c79f89c35e1
Faulting application path: E:\Projects\Issue-With-Electron\node_modules\electron\dist\electron.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 098bbe39-6b3b-4b71-b530-9f56eab5a0b3
Faulting package full name: 
Faulting package-relative application ID: 

@groundwater groundwater added the bug 🐞 label Aug 3, 2017

@enlight

This comment has been minimized.

Copy link
Contributor

enlight commented Aug 5, 2017

Only the release build crashes, debug build is fine. Call Stack from crash:

ntdll.dll!RtlFreeHeap()
ucrtbase.dll!_free_base()
electron.exe!base::internal::PlatformThreadLocalStorage::OnThreadExit(void)
ntdll.dll!LdrpCallInitRoutine()
ntdll.dll!LdrpCallTlsInitializers()
ntdll.dll!LdrShutdownProcess()
ntdll.dll!RtlExitUserProcess()
kernel32.dll!ExitProcessImplementation()
ucrtbase.dll!exit()
ucrtbase.dll!exit()
electron.exe!__scrt_common_main_seh() Line 262
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
@enlight

This comment has been minimized.

Copy link
Contributor

enlight commented Aug 5, 2017

I'm pretty sure this crash was introduced in 1.7.4 by #9764. 1.7.3 doesn't crash, the revision preceding #9764 (3cc0429) doesn't crash, but ab174f5 does crash. That's as far as I could narrow it down because after #9764 went in the release build wouldn't link until #9854 was fixed in ab174f5. @alespergl is probably the best person to handle this one.

@zcbenz

This comment has been minimized.

Copy link
Contributor

zcbenz commented Aug 15, 2017

I can not reproduce this on Windows 10 1073/15063, it is not the latest update though, and I really don't want to have more than Windows 10 installs on my virtual machine.

But I do notice that electron now takes a few seconds to quit, which is rather suspicious and I'll look into it.

@bpasero

This comment has been minimized.

Copy link
Contributor

bpasero commented Aug 23, 2017

@zcbenz @enlight we see this in VSCode with Electron 1.7.4 and 1.7.5 on Windows 10 1703 (OS Build 15063.540). Steps:

  • open Event Viewer on Windows
  • click on Application
  • start Electron
  • close Electron (click the close button on the Window)
  • refresh logs

=> you see a new entry for Electron

Faulting application name: electron.exe, version: 1.7.5.0, time stamp: 0x596d1933
Faulting module name: ntdll.dll, version: 10.0.15063.447, time stamp: 0xa329d3a8
Exception code: 0xc0000005
Fault offset: 0x0000000000030e01
Faulting process ID: 0x1c64
Faulting application start time: 0x01d31bf096c90894
Faulting application path: C:\Users\bpasero\Downloads\electron-v1.7.5-win32-x64\electron.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: 20458aeb-f829-4adf-a609-30e5e651e932
Faulting package full name: 
Faulting package-relative application ID: 

This reproduces with both 32bit and 64bit release.

Refs: Microsoft/vscode#33016

@enlight

This comment has been minimized.

Copy link
Contributor

enlight commented Aug 23, 2017

I'm on Win 10 1703/15603.540 too. I don't know if @zcbenz made any progress, but if no one has any better ideas I'd suggest trying to disable the allocator shim in the static_library libcc build (adding use_allocator_shim = false to https://github.com/electron/libchromiumcontent/blob/master/chromiumcontent/args/static_library.gn should do the trick I think).

Edit: The shim is already disabled, so never mind.

@alexeykuzmin

This comment has been minimized.

Copy link
Contributor

alexeykuzmin commented Aug 23, 2017

Windows 10 Enterprise 1703/15063.540
Electron latest master, commit 485b909, Tue Aug 22 15:03,
electron/libchromiumcontent@349396d, Sat Aug 12 21:52.

Faulting application name: electron.exe, version: 1.7.6.0, time stamp: 0x599d6b69
Faulting module name: ntdll.dll, version: 10.0.15063.447, time stamp: 0xa329d3a8
Exception code: 0xc0000005
Fault offset: 0x0000000000030e01
Faulting process id: 0x3eb8
Faulting application start time: 0x01d31c0a1bfe2d4b
Faulting application path: C:\Users\alkuzmin\Projects\electron\out\R\electron.exe
Faulting module path: C:\windows\SYSTEM32\ntdll.dll
Report Id: c0b808e4-f58c-41da-8cac-aa13f646e43f
Faulting package full name: 
Faulting package-relative application ID: 
@Tyriar

This comment has been minimized.

Copy link
Member

Tyriar commented Aug 23, 2017

Here's the diff between 1.7.3 and 1.7.4 v1.7.3...v1.7.4

@zcbenz

This comment has been minimized.

Copy link
Contributor

zcbenz commented Aug 24, 2017

@bpasero Can you get the crash trace of it? The easiest way is to set ELECTRON_DEFAULT_ERROR_MODE environment value to 1, and when Electron crashed a dialog would show, and you could use it to invoke Visual Studio to generate the crash trace.

@bpasero

This comment has been minimized.

Copy link
Contributor

bpasero commented Aug 24, 2017

@zcbenz I am not seeing this dialog popping up, though I can attach VS to the process and hit a breakpoint when closing the Window. Unfortunately this crash only reproduces with the release version of Electron, not the debug one.

I see this stack in VS:

image

@bpasero

This comment has been minimized.

Copy link
Contributor

bpasero commented Sep 8, 2017

I think this can be closed.

@BOOMER74

This comment has been minimized.

Copy link

BOOMER74 commented Sep 8, 2017

Yes, on 1.8.0 crash no reproducing.

@zcbenz zcbenz closed this Sep 11, 2017

fasterthanlime added a commit to itchio/itch that referenced this issue Sep 19, 2017

Closes #1519, closes #1521
Also:
  - Upgrade to electron v1.8.0 to avoid
  electron/electron#10188 (made tests slower)
  - Upgrade zopf to stop 'helpfully cleaning up stack traces' and improve
  stack trace filtering/formatting a lot in run-unit-tests
  - Add 'Run single test' task (bind it to F9!)
  - Prevent doing API requests in testing (it throws now)
  - Add test case for #1521 (kind of a first - first test of a fetcher,
  mocking API requests etc.)
  - Allow specifying API client for fetchers (for testing)
  - Print how long it took to gather/report coverage info
@damianobarbati

This comment has been minimized.

Copy link

damianobarbati commented Jul 24, 2018

I have this happening, 20mins after electron is running on electron@v2.0.5.

screen shot 2018-07-24 at 17 08 26

I thought a memory leak but I don't see memory expanding as the app keeps running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment