Skip to content
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

NSIS installer crashes on Windows 10 #7921

Open
jsimomaa opened this issue Dec 4, 2023 · 4 comments
Open

NSIS installer crashes on Windows 10 #7921

jsimomaa opened this issue Dec 4, 2023 · 4 comments

Comments

@jsimomaa
Copy link

jsimomaa commented Dec 4, 2023

  • Electron-Builder Version: 24.9.1
  • Node Version: v20.9.0
  • Electron Version: 27.1.2
  • Electron Type (current, beta, nightly): current
  • Target: nsis

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:

# сhecks registry for previous installation path
ReadRegStr $perUserInstallationFolder HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation
${if} $perUserInstallationFolder != ""
StrCpy $INSTDIR $perUserInstallationFolder
${else}
StrCpy $0 "$LocalAppData\Programs"
System::Store S
# Win7 has a per-user programfiles known folder and this can be a non-default location
System::Call 'SHELL32::SHGetKnownFolderPath(g "${FOLDERID_UserProgramFiles}", i ${KF_FLAG_CREATE}, p 0, *p .r2)i.r1'
${If} $1 == 0
System::Call '*$2(&w${NSIS_MAX_STRLEN} .s)'
StrCpy $0 $1
System::Call 'OLE32::CoTaskMemFree(p r2)'
${endif}
System::Store L
StrCpy $INSTDIR "$0\${APP_FILENAME}"
${endif}

@jsimomaa
Copy link
Author

jsimomaa commented Dec 4, 2023

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

Copy link
Contributor

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
Copy link

okjake commented Sep 17, 2024

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
Copy link

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:

@github-actions github-actions bot removed the Stale label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants