Archive: setup executed by other program hangs...


setup executed by other program hangs...
Greetings...

I've some strange problem: when multi-language setup launched by other program (autorun.exe), which sets value for MUI_LANGDLL_REGISTRY_KEY -- setup hangs: it just displayed in processes list (task manager) with no activity (processor usage == 0). But when I starts it by myself (or without setting key) -- it works fine...

Best regards...


Does it happen when you don't preset the registry? Does it happen when you run it from another installer? Does it happen with other applications ran by autorun.exe? Do you have a script example reproducing the problem? Which version of NSIS are you using?


Originally posted by kichik
Does it happen when you don't preset the registry?
no. in this case setup works fine.

Originally posted by kichik
Does it happen when you run it from another installer?
it executed not by installer. it executed by some small autorun (using ShellExecute() (also tried CreateProcess)).
Both "Far file manager" and "Total commander" works fine (with and without records in registry). "Common application" also starts fine.

Originally posted by kichik
Does it happen with other applications ran by autorun.exe?
no. other applications starts fine.

Originally posted by kichik
Do you have a script example reproducing the problem?
yes. attached.

Originally posted by kichik
Which version of NSIS are you using?
2.21

While ago I made this http://forum.ccleaner.com/index.php?showtopic=6161 portable wrapper for CCleaner with NSIS and some of the users told me that it hangs a very long time when it's runs from CD via autorun and when it's executed normally from the CD it doesn't hang.

I have confirmed this my self in win2k, but in windows XP I couldn't reproduce it. MVI what operating system you are using?

The portable wrapper reads and writes in the registry when it starts so I think we have a pattern here.


I'm using Windows XP (pro sp2). Same problem appears on windows 98 and 2000.


Are you also running it from a CD?

Can you attach your wrapper application, preferably with source code, so I can have complete way to reproduce this?

Are you familiar with using a debugger? Could you attach a debugger to to the hung process and see what it's doing?


Originally posted by kichik
Are you also running it from a CD?
no. while testing i'm running it locally.

Originally posted by kichik
Can you attach your wrapper application, preferably with source code, so I can have complete way to reproduce this?
done.

Originally posted by kichik
Are you familiar with using a debugger? Could you attach a debugger to to the hung process and see what it's doing?
setup hangs somewhere in ntdll.dll. as there is no debug symbols i cant't say precisely...

Originally posted by kichik
Can you attach your wrapper application, preferably with source code, so I can have complete way to reproduce this?
Done. :) It won't do anything without CCleaner, but CCleaner isn't needed to reproduce the problem.

Originally posted by kichik
Are you familiar with using a debugger? Could you attach a debugger to to the hung process and see what it's doing?
I tried Dependency Walker. I din't expect it to hang, but it did. Last thing in the log is GetUserDefaultUILanguage Full log is in the attachment.

MVI, there's no attachment. {_trueparuex^}, I couldn't reproduce it with yours.

MVI, what's above ntdll.dll in the stack? Addresses in the installer will help as well.


Originally posted by kichik
{_trueparuex^}, I couldn't reproduce it with yours.
Try Dependency Walker. When I start to profiling the file it hangs and the file doesn't need to be on CD. That GetUserDefaultUILanguage actually was GetProcAddress call to that function, but I have noticed that it doesn't always hang on the same place when profiling.

MVI you said on your original post that the installer hangs with 0 processor usage. In my case the portable app work as hard as it can while it hangs.

{_trueparuex^}, worked fine for me with without depends.exe on both XP and 2000.

Are you sure it hangs before .onInit is called? That function does a lot in your code, including registering many external DLL files. You also said it hanged for a long while and not completely as in MVI's case.

MVI, can you attach the code again? Your last post has no attachment.


sorry.
http://users.i.com.ua/~hunter_/Autorun.rar

just after "pause" it 7c90eb94 (command ret)
then (after some "step over"s it "ups" to 01332693 where hangs again on call dword ptr ds:[13330C0h] and "here we go agin" :))


Which DLL is loaded at 01330000? Process Explorer can tell you that.

What's above it in the stack? Where is that loop called from?


MVI, never mind, I found the problem. It's just too good to be true... You pass SW_HIDE to ShellExecute in your program so the dialog comes up hidden. I read about it not too long ago but dismissed it because you said you've also tried CreateProcess.


Originally posted by kichik
{_trueparuex^}, worked fine for me with without depends.exe on both XP and 2000.

Are you sure it hangs before .onInit is called? That function does a lot in your code, including registering many external DLL files. You also said it hanged for a long while and not completely as in MVI's case.
Oh you are going to love this... I added messageboxs to beginning of .onInit to see if it gets in it and it did. Then I added messageboxes to .onInit to see where it hangs and it hangs somewhere in GetParameters function... Can you see where this is going? :( Shame on me shame on me... Well it's stuck on the first loop. To make it short it gets stuck in endless loop if the commandline doesn't have any quotes or any spaces in it, because one $R2 in the code should be $R0. :p

Shame on me shame on me. I am sorry I wasted your time. :(

Happy ending. How can I not love it? ;)