Old 26th March 2005, 04:57   #1
JWood
Guest
 
Posts: n/a
Install Error

I'm new to this but, with the help of the HM NIS Editor, I was quickly able to get an installation program that works great!

Unfortunately, one tester I have gets an error code at the end of the installation. The program appears to have been fully installed, but the following error appears:

>>>>>
Microsoft Visual C++ Runtime Library

Runtime Error!

Program: <my Exe>

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

[OK]
<<<<<

I have no idea where to start to address this. Can anyone give me any pointers?

Thanks.

Jonathan
  Reply With Quote
Old 26th March 2005, 09:39   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
NSIS itself doesn't use Microsoft Visual C++ Runtime Library, so it must be an error from a DLL you're trying to register. Make sure you're not distributing any DLLs that shouldn't be redistributed, like DLLs from the system directory.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 27th March 2005, 01:40   #3
JWood
Guest
 
Posts: n/a
Installation Error

Thanks. However, my application contains no DLLs that get registered. All included DLLs export standard C functions and are renamed to have a different extension than DLL. And I'm not distributing any files that I didn't create. My application uses Visual C++ but I do not use asserts to handle run-time errors.

I created a standard script using the HM NIS Editor and really don't understand the script language. The only change I made was to comment out the following line:

;!insertmacro MUI_PAGE_LICENSE "..\..\..\..\path\to\licence\YourSoftwareLicence.txt"

Because I have no license file. Everything else was created by the Wizards that come with the editor

Everything is working beautifully except for this error on one tester's system. I'm still at a loss.
  Reply With Quote
Old 27th March 2005, 04:30   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
could the error be in one of the dll's used by windows (comctl32,advapi32 etc.)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th March 2005, 17:21   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It's possible the user has some program which has hooked a DLL into the NSIS installer. Ask the user to provide a Dr. Watson log. It should contain a list of all loaded DLLs and some more information about the location of the crash.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th March 2005, 02:57   #6
JWood
Guest
 
Posts: n/a
I've now received a report of what could be the same error from another tester (he wasn't able to be as specific as the first tester). Both users are using Windows 2000 SP4. My tester's comments include the following:

"The error only happens when I choose to run setup from my
power user account, running setup as the administrator. If I run setup as my normal self, no error occurs. If I run set from the administrator account, no error occurs.

When the error happens, the install does not complete successfully. What is missing is the desktop shortcut and Start menu additions."

He says he doesn't have much in the way of debugging help. I'm not even sure what is needed for a Dr Watson log. Does anyone have any more ideas?

Again, I'm not distributing any files I didn't create. The executables consist of one EXE and several DLLs renamed with CYX and CYT extensions. Nothing needs to be registered.

Thanks!
  Reply With Quote
Old 29th March 2005, 18:34   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
See the following MSDN article for information on setting up and working with Dr. Watson:

http://www.microsoft.com/resources/d..._overview.mspx

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th March 2005, 22:24   #8
Serflaten
Guest
 
Posts: n/a
I am the tester seeing JWood's problem, and the MSDN articles appear to be the same information found in Windows Help. There it states:

------
When a program error occurs in Windows, the system searches for a program error handler. A program error handler deals with errors as they arise during the running of a program. If the system does not find a program error handler, the system verifies that the program is not currently being debugged and considers the error to be unhandled. The system then processes unhandled errors by looking in Registry Editor for a program error debugger
------


Since I see no entry for this in the Dr. Watson log, I have to assume the error is handled, possibly throwing up the 'unusual' error message.


Dr. Watson is set up to be the debugger in the registry, that entry looks like:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="drwtsn32 -p %ld -e %ld -g"
"UserDebuggerHotKey"=dword:00000000

I am thinking a couple big clues include:

- The error only happens when setup is run as the Admin. from my Power User account. (Opposed to running from current account which runs OK)
- When the error occurs, all the shortcuts are not present. In a normal installation, the shortcuts appear on screen before the exe.

I did not see this mentioned; the error occurs after pressing Finish on the final screen of Setup. The Task Manager shows setup has been removed and <JWood's exe> has been added to its list just prior to the error message. Other than missing shortcuts, all else seems to be in place, the program runs normally....

One other bit o' information. The final screen has a check box asking to launch the program (checked by default). If I uncheck that box (when running as Admin from PwrUser account), I see no error message, nor do I see any shortcuts installed.
  Reply With Quote
Old 29th March 2005, 22:33   #9
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Wait wait wait... Does <my Exe> refer to the program itself or the installer? If it's the program itself, JWood should know better than me how to debug his program. The fact the shortcuts are missing is probably a whole different problem.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th March 2005, 22:40   #10
Serflaten
Guest
 
Posts: n/a
Quote:
Originally posted by Anders
could the error be in one of the dll's used by windows (comctl32,advapi32 etc.)
What might I use to determine that? I have an MSDN Universal Subscription starting from 2004 and thought I might use WnDbg, (from Customer Support Tools) but it appears I'll have to do some major D/L to get that up and running. (I'm on a SLOW dial-up connection....) I ave the FEB Visual Studio 2005 CTP (which I think is going to give me things like SPY++) but have not installed it yet.

Really, I just want to help JWood determine if he needs to address this, and maybe learn a bit about debugging in the process! ;-)

LFS
  Reply With Quote
Old 29th March 2005, 22:48   #11
Serflaten
Guest
 
Posts: n/a
Quote:
Originally posted by Serflaten
... all else seems to be in place, the program runs normally....
That should read more like; The error stops that process, but launching the program from Explorer seems to proceed normally...
  Reply With Quote
Old 31st March 2005, 19:46   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Looking at the source code for CRT, it seems like the message is generated by abort. According to MSDN, when compiled in debug mode, abort will give an option to debug the application. Dr. Watson or any other debugger can then step in.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd April 2005, 21:25   #13
JWood
Guest
 
Posts: n/a
Quote:
Originally posted by kichik
Looking at the source code for CRT, it seems like the message is generated by abort. According to MSDN, when compiled in debug mode, abort will give an option to debug the application. Dr. Watson or any other debugger can then step in.
That may be. However, I have no idea what software is running when the error occurs. Therefore, I wouldn't begin to know how to compile it in debug mode. As far as I know, none of my software is running during the installation so I wouldn't have any compile options with regards to the error.

My scripts is simple. I used the HM NIS Editor Wizards to generate the script. My EXE was writting in MFC and does not need to be registered (although it may be--but I do not use abort to handle program errors). I have half a dozen DLLs but they were renamed with different extensions and do not need to be registered.

The installation works fine on my system but has failed on two of about 15 testers. Both testers were running similiar configurations.

I like other aspects of the installer but this is extremely frustrating.
  Reply With Quote
Old 5th April 2005, 17:13   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Serflaten said:
Quote:
I did not see this mentioned; the error occurs after pressing Finish on the final screen of Setup. The Task Manager shows setup has been removed and <JWood's exe> has been added to its list just prior to the error message. Other than missing shortcuts, all else seems to be in place, the program runs normally....
It's <JWood's exe> that crashes according to him, not the installer.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th April 2005, 18:34   #15
JWood
Guest
 
Posts: n/a
Quote:
Originally posted by kichik
It's <JWood's exe> that crashes according to him, not the installer.
I'm not 100% certain that is what is happening although the error message seems to suggest that.

What I don't understand is why my application is running at that time. If the installer is trying to register it or something, is there a way to control that? My application doesn't need to be registered. Also, I don't use abort() to handle errors. Maybe it is some MS code from the libs causing an error but why is my app even running?
  Reply With Quote
Old 5th April 2005, 19:49   #16
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Your program runs because you've asked for it to run. In the script attached to the other thread, you have MUI_FINISHPAGE_RUN defined. Serflaten also said:
Quote:
One other bit o' information. The final screen has a check box asking to launch the program (checked by default). If I uncheck that box (when running as Admin from PwrUser account), I see no error message, nor do I see any shortcuts installed.
According to him, the crash doesn't happen if your application isn't ran.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th April 2005, 19:57   #17
JWood
Guest
 
Posts: n/a
Question

Ah... I'm sorry. I missed that.

I'm not sure that clears things up, however. First off, the program runs normally after installation is complete. Why would it only fail when being run from the final Installation page?

Also, doesn't the installer create the desktop shortcut prior to showing the final page? How would a crash then prevent the shortcut from being installed?

Thanks.
  Reply With Quote
Old 5th April 2005, 20:10   #18
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Quote:
Why would it only fail when being run from the final Installation page?
I have no idea. It's your program, you should know better. NSIS just calls CreateProcess.

As I've said to Serflaten, the shortcuts are probably a whole different problem. According to the script attached to the other thread, they are created before the finish page is even created.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 20th May 2007, 08:39   #19
Richard Tamir
Junior Member
 
Join Date: May 2007
Location: Israel
Posts: 1
THE PROBLEM:
Install Error
I'm new to this but, with the help of the HM NIS Editor, I was quickly able to get an installation program that works great!

Unfortunately, one tester I have gets an error code at the end of the installation. The program appears to have been fully installed, but the following error appears:

>>>>>
Microsoft Visual C++ Runtime Library

Runtime Error!

Program: <my Exe>

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

[OK]
<<<<<

I have no idea where to start to address this. Can anyone give me any pointers?

Thanks.

Jonathan

THE SOLUTION:
I spent quite some time on this, even finding that a system restore did not fix it. Here's the trick that works:
1. uninstall winamp
2. create a new directory that will receive your new winamp install files; perhaps call it "winampvideo".
3. since winamp does not delete all files, move anything left after the uninstall to the new directory.
4. install winamp to the new directory.
5. VOILA!! It shall work.
6. don't ask me why, I just fooled around enough to find a way to get it to function.
7. BTW: many other programs around the internet are getting the same message, and no one has found the cause of the fault, to my knowledge.

RichardTamirATyahoo.com
Richard Tamir is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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