electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.61k stars 1.74k forks source link

NSIS installer crashes on Windows 10 #7921

Open jsimomaa opened 10 months ago

jsimomaa commented 10 months ago

NSIS-installer randomly crashes for a fresh installation when installing for a single user.

Similar issues:

I was able to catch the crash in WinDBG:

image

And here is the actual crash:

(938.ab0): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\Users\JANIJA~1\AppData\Local\Temp\nspF21C.tmp\System.dll
eax=04a23400 ebx=0086de58 ecx=fbe86420 edx=04a24be0 esi=00002838 edi=04a23418
eip=6c191581 esp=0019db24 ebp=0019db60 iopl=0         nv up ei pl nz na po cy
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010203
System!Store+0x4a0:
6c191581 8a0411          mov     al,byte ptr [ecx+edx]      ds:002b:008ab000=??

And the stack: image

Only place in the source code that calls System::Store can be found here:

https://github.com/electron-userland/electron-builder/blob/b8d6905582b28a9b36f11308f9a72ebc32dc2c86/packages/app-builder-lib/templates/nsis/multiUser.nsh#L25-L41

jsimomaa commented 10 months ago

I've also got the dump file if that is of any help?

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

okjake commented 2 weeks ago

I can confirm that removing the System::Store calls here fixed the crashes for me - I'd submit a PR but I don't fully understand why they're necessary

pnedkovp commented 1 week ago

I have a similar issue with electron-builder version 24.13.3 on Windows 11. When I try to launch the nsis installer it crashes with the following error: Faulting module name: System.dll, version: 0.0.0.0, time stamp: 0x5c157efa Exception code: 0xc0000005 Fault offset: 0x00001581 Faulting process id: 0x0xF30 Faulting application start time: 0x0x1DB05CD5454D5C0 Faulting application path: Faulting module path: C:\Users\\AppData\Local\Temp\nsmD439.tmp\System.dll Report Id: 0e92fa50-e642-47bd-8aac-4b2d8e89f8f8 Faulting package full name: Faulting package-relative application ID: