PDA

View Full Version : Setup hangs on Vista machine - (Not Responding)


tigran
09-20-2007, 01:08 PM
Hi. I have a setup with several screens. One of the screens calls a fairly large function when 'Next' button is pressed. Everything works fine on all operating systems except Vista. The setup simply pauses for less than 1 second (while function is being processed) and continues to the next dialog.

Now Vista behaves in a very different way. The function that would take less than 1 second to complete in XP, takes 3+ seconds in Vista. After approx 4 seconds of waiting for a function to return, the dialog is grayed out, and "(Not Responding)" message is appended to the dialog title.

Also:
- Once hanged, the window never recovers and the user is forced to cancel setup.
- Both XP in Vista machines have decent ram/processors.
- Log files do not show any errors. Setup simply stops and hence no more data is being logged into log file.

The function that slows down Vista and eventually causes application hang (at least that's what I think) does the following:

1. checks for around 20 HKEY_LOCAL_MACHINE / CURRENT_USER registry keys
2. checks if certain files (around 25) installed in their proper locations (where the locations are %ProgramFolder%, %SystemFolder%, or %AppFolder%)
3. If the file is located in step 2, reads its version info and returns this information.

As you can see, the function doesn't try to open file/folder dialog, enumerate drives, or do any kind of time-consuming actions.

Indigo Rose guys - I'm pretty sure you've been testing all kinds of installations on Vista machines. Can you suggest what causes the function processing to be so slow on Vista and how to avoid a dialog hang? I've spent 2 days trying to figure out the issue and couldn't find a cause of the problem.

Thanks in advance!!

tigran
09-20-2007, 02:24 PM
I ran some further test and confirmed that a function running longer than a couple of seconds will result in dialog hanging.

Can you advise and how to implement DoEvents() equivalent in SetupFactory?
Thanks!

Brett
09-20-2007, 02:25 PM
If there is Registry and file access at that time, that could be the hold-up. Vista is painful-slow when checking permissions on file system items in my experience. I was unzipping a file on Vista the other day and actually laughed out loud at how slow it was. Same with copying files on Vista in general. I honestly doubt that there is much that we can do in this case.

tigran
09-20-2007, 02:33 PM
How about adding a DoEvents() action which would pass control to UI?

GalacTek
09-20-2007, 03:48 PM
I had an issue something like this. I uninstalled SF7 and then reinstalled and it stopped locking up.

pww
09-20-2007, 03:48 PM
as I understand you have a single function that does 1 & 2 & 3, and that function hangs somewhere.
I would try to make separate functions for 1 (check a single reg key) and 2 (check if one file exists) that accept arguments and return a result. Each of these 2 functions will write to a log file after each call, with a time stamp.
This way you can see if it always hangs at the same place, and the approx. time for each call.

Adam
09-20-2007, 04:15 PM
I agree with pww, you should narrow down where in the code it is hanging and then we can go from there. If you can figure out which action is causing the hang then post back to this thread and maybe we can help.

Adam.

tigran
09-21-2007, 09:53 AM
Thanks a bunch for your responses guys!

I finally figured out the issue - my setup hang had nothing to do with Vista; instead, unlike XP, Vista wasn't crashing silently.

The source of the error was an external C++ dll that I was calling in the loop inside my function, which in turn was called by the dialog. One of the .dll functions had a memory leak, and after being called a dozen times or so, the memory leak would overflow the stack and cause a hang.

Once I fixed the memory leak in my external .dll, all the problems disappeared!

Adam
09-21-2007, 01:32 PM
Sweet

AJK