Random slowdown/freeze, possibly due to "Find all files"

Got a problem you cannot solve? Try here.
Post Reply
Jeff Doe
Posts: 5
Joined: Fri Sep 17, 2010 1:53 am

Random slowdown/freeze, possibly due to "Find all files"

Post by Jeff Doe »

Hi all, we are having trouble with the "checkvc91"-script that comes with selecting the "Microsoft Visual C++ Runtime 9.0 (includes ATL and MFC) Service Pack 1" Application Runtime.
We actually select both the 32-bit and the 64-bit version and then wrap them in a separate script that checks the OS to see which one of them should be called.
The problem that we have is that when we run our installer, when its execution reaches the "checkvc91"-script, the installation simply pauses there. It doesn't hang/crash the installer it self; the cancel button is functional.
It doesn't happen every time either. If we start the installation and it freezes, pressing cancel and starting it again might make it work, so it doesn't seem to be a problem with calling the script it self.
We are fairly certain that it is the "Find all Files" call: everything else in that script and the 64/32-bit "wrapping"-script we added, is mundane, e.g. setting variables, if-else-end statements. The call to see what "bitness" the OS has is done elsewhere in the main script and works without problems there.
For some reason it happens more often on some computers than others, I couldn't even begin to guess why. We had a computer to test on, where we ran the installer a total of 9 times. It worked once and froze the other times. Then I commented out the line that calls the "checkvc91"-script, rebuilt, and then it worked 5 times out of 5, no problems.
I don't know how it may matter, but the file the script looks for, mfc90.dll, is present on the machine, in a subfolder at the location the script is set to search.

I hope someone has a solution, or can point me to a thread with one. I tried searching the forums, but when the search-function deems the words "find all files" to be too common to allow me to search for them, one gets rather stunted.
Jeff Doe
Posts: 5
Joined: Fri Sep 17, 2010 1:53 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Jeff Doe »

Ok, slight update. Figured the version number might be useful;
InstallAware 9 R2 (Build Moya.sp2.052710)
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by mills »

You're right that the Find All Files can be problematic, however it shouldn't freeze the installer, but it should be working in the background and may take a while to complete. This is one of few scripts that implements this. We haven't found a better way to determine if VC++ is already installed...

It sounds like you've done a bit of editing to your script. If you create a basic setup and add the VC runtime, it will appear as if the setup hasn't even started most of the time.

You may want to create a dialog with a progress bar, label and button to look like this:
scrolling_marquee.jpg
scrolling_marquee.jpg (12.5 KiB) Viewed 11923 times
Then, edit your code like this to display it:

Code: Select all

Set Variable PROGRESSMODE to MARQUEE
Display Dialog: marquee, use as progress dialog (non-modal)
 
Find All Files in path $WINDIR$\WinSxS\mfc90.dll (include subfolders), write result into variable VC91
 
Hide Dialog
Set Variable PROGRESSMODE to 
This will give you (and more importantly your customers) the sense that something is happening.

It does seem that the system being tested on causes the length of pause to differ quite dramatically and it seems like 64 bit OS' take longer than 32 bit.

I've heard reports that it can take as much as 3 minutes for the find all files to complete.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Jeff Doe
Posts: 5
Joined: Fri Sep 17, 2010 1:53 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Jeff Doe »

Hi mills.
Thank you for your answer. I have to tell you however that it can take substantially longer than 3 minutes for it to complete. During one test, it was left running for near 30 minutes before we canceled it.
Though I thank you for the suggestion, I have already placed a dialog with a progress bar set to "MARQUEE" in the installer. It is how we where able to determine where the problem was.
However, just putting up a progress bar and perhaps informing the user that "This may take several minutes" is not sufficient when it can take such a long time, so I think the big question is; are you working on a solution?
Does anyone else have a workaround? I was thinking that maybe I can call up a command prompt and search for it, something like
where /R C:\Windows\WinSxS\ /Q mfc90.dll
It took about 20 seconds to run that on my machine. I will try it in the meantime.
Jeff Doe
Posts: 5
Joined: Fri Sep 17, 2010 1:53 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Jeff Doe »

Ok, this thing is definitely hanging, not just taking a long time to complete; we started the installer at about 4 pm on Wednesday, watched it get to the point where the 'Find all files'-command is called and then left it there. At 10 am on Friday (!) it was still stuck there. It should be noted that on that particular computer, the winsxs folder only have 176 files and 43 subfolders. Th mfc90.dll file is present in one of them.

Trying to work around the problem didn't work either; the where-command is Windows Vista only and using the dir-command was doomed from the start since Installaware takes the return value from the command (meaning its errorcode) rather than the result of its search.

So I restate my question:
Installaware, are you working on fixing this?
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by mills »

Could you upgrade to the latest version of InstallAware and verify if the problem still persists? There have been some changes that have been intended to improve the Find All Files command. If that doesn't fix it, we'll go from there to see if we can find the source of the problem and/or a remedy.

Install trial (enter your email to receive password):
http://installaware.com/downloads-product-downloads.htm

Then regenerate and install the license:
http://www.installaware.com/myinstallaware
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Jeff Doe
Posts: 5
Joined: Fri Sep 17, 2010 1:53 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Jeff Doe »

Sadly, upgrading to the latest version didn't help. How will this proceed now? Is there anything you need from us to help you figure out what the problem is? I don't know what might be useful in this situation though.
Obliterator
Posts: 53
Joined: Fri May 01, 2009 11:54 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Obliterator »

Was any progress ever made on this issue?
I suddenly find a few of my customers reporting this issue in the wild.
In my case, it appears related to the VCxx pre-requisite check (I show a dialog showing progress during the pre-requisite check and it freezes showing C:\Windows\SxS\amd64_microsoft.vc90.mfc_xxxx on the status line).
So far as I can tell, the Find All Files call is freezing.
I'm using IA9R2SP3 (so a newer build than that reported in the thread).
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by FrancescoT »

Dear User,

I didn't know about it.
Actually I can only suppose that the problem has been solved ... I haven't received any user report about a possible similar issue at least, with the last 3 InstallAware major releases.

Could you try to verify what happens using last IA version available (Trial) to build your project?

Let me know.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Obliterator
Posts: 53
Joined: Fri May 01, 2009 11:54 am

Re: Random slowdown/freeze, possibly due to "Find all files"

Post by Obliterator »

Turns out the 'Find all files' and VC pre-requisite check was a complete red-herring.
It just happens to leave that status message showing as it was the last status message update.
Find all files is working perfectly in IA9R2SP3.

I added some debug messages to my installer (as nothing useful was showing in the log file as it before the MSI stage).
Anyhow, on the clients machine, it got straight past the find all files call and in fact past the VC checking script entirely.
Turns out later in my script I tried to append something to a variable which hadn't been initialised.
This was causing the setup to freeze at runtime.

Normally, references to undefined variables are detected at compile time, but it seems the compiler doesn't check assignments inside strings.
Of course this might be detected in IA15 or it might not freeze in IA15! But it certainly causes IA9R2SP3 to freeze at runtime.

To replicate the problem, simply append something to a non-defined variable:
Set Variable MYVAR to $MYVAR$$NEWLINE$Freeze (where MYVAR has not been defined previously)

To resolve the problem, simply define MYVAR prior to the append call:
Set Variable MYVAR to
Set Variable MYVAR to $MYVAR$$NEWLINE$Freeze

Just posting incase this helps anyone else out.
Thanks for your quick feedback.
Post Reply