Old 25th March 2014, 15:05   #1
PARTISAN
Junior Member
 
Join Date: Mar 2014
Posts: 3
Exclamation NSIS dlls crash at first run

Hi all!

I'm just finished working on my first NSIS installer and I have one annoying issue: sometimes installer crashed while it's performing install. This is looks like it just disappear without any message boxes or any other notification. It's happening only while testing on Windows XP once per 20-50 installs. Using NSIS Special Builds I can see execution log and last log entry is copying nsExec.dll to temp directory.
code:
nsExec::Exec: taskkill /S localhost /IM SomeProgramName.exe
Call: 1890
File: overwriteflag=1, allowskipfilesflag=2, name="C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nsf77.tmp\nsExec.dll"
File: wrote 6656 to "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nsf77.tmp\nsExec.dll"
*EOF*


Here is code snippet that executed at this log position
code:
Function ExecToInstallLog
Pop $0
${LogText} "nsExec::Exec: $0"
nsExec::ExecToStack /TIMEOUT=120000 $0
Pop $1
Pop $2
${If} $1 == 0
${LogText} "nsExec::Exec (success): $0"
${Else}
${LogText} "nsExec::Exec (failed): $0"
${LogText} "nsExec::Exec (error $1): $2"
${EndIf}
FunctionEnd

...

Push "taskkill /S localhost /IM SomeProgramName.exe"
Call ExecToInstallLog


This is first use of this library in installer, so I guess that crash happened in nsExec.dll. Few times I got the same with nsJSON.dll.
Provided info is exceedingly vague to make some conclusion, but I don't know any other way to get debug info. You can ask me test something.
P.S. Concrete program names was replaced due to customer's NDA
P.S.S. English isn't my native, so sorry if my post isn't clear enough.
PARTISAN is offline   Reply With Quote
Old 25th March 2014, 16:20   #2
PARTISAN
Junior Member
 
Join Date: Mar 2014
Posts: 3
Verson of NSIS - 3.0a2
PARTISAN is offline   Reply With Quote
Old 25th March 2014, 23:22   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,186
Are you compiling with "Unicode True"?

Does NSIS v2.46 have the same problem?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th March 2014, 10:51   #4
PARTISAN
Junior Member
 
Join Date: Mar 2014
Posts: 3
Quote:
Originally Posted by Anders View Post
Are you compiling with "Unicode True"?
No, should I check it?

Quote:
Originally Posted by Anders View Post
Does NSIS v2.46 have the same problem?
Yes, I also got this crash with NSIS v2.46, but it's not the same: it's happens on third nsExec.dll use. Here is the log:
code:
Call: 580
nsExec::Exec: taskkill /S localhost /IM SomeProgramName.exe
Call: 1893
File: overwriteflag=1, allowskipfilesflag=2, name="C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll"
File: skipped: "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll" (overwriteflag=1)
nsExec::Exec (failed): taskkill /S localhost /IM SomeProgramName.exe
nsExec::Exec (error 128): ERROR: The process "SomeProgramName.exe" not found.

Call: 580
nsExec::Exec: sc stop SomeServiceName
Call: 1893
File: overwriteflag=1, allowskipfilesflag=2, name="C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll"
File: skipped: "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll" (overwriteflag=1)
nsExec::Exec (success): sc stop SomeServiceName

Jump: 596
Call: 580
nsExec::Exec: sc delete SomeServiceName
Call: 1893
File: overwriteflag=1, allowskipfilesflag=2, name="C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll"
File: skipped: "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nswB2.tmp\nsExec.dll" (overwriteflag=1)
*EOF*



and code for this log
code:
Push "taskkill /S localhost /IM SomeProgramName.exe"
Call ExecToInstallLog
Push "sc stop SomeServiceName"
Call ExecToInstallLog
Push "sc delete SomeServiceName"
Call ExecToInstallLog

PARTISAN is offline   Reply With Quote
Old 28th March 2014, 08:47   #5
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 535
Send a message via ICQ to T.Slappy
Is installer running as administrator?

There is probably some issue with the service (performing operation times-out) and nsExec cannot handle it correctly.

I am sure NSIS is working fine

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
crash, disappear, dll, nsexec

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump