Bug 15284 – dmd installer hangs when updating installed windows version

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
installer
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2015-11-04T11:05:00Z
Last change time
2016-01-03T14:16:01Z
Assigned to
nobody
Creator
code

Attachments

IDFilenameSummaryContent-TypeSize
1564dmd-2.069.0_hangs_during_uninstall_process_explorer_info.pngProcess Explorer information about the installer, while it was hangingimage/png47613
1565dmd-2.069.0-fix15284_also_hangs_after_uninstall_process_explorer_info.pngdmd-2.069.0-fix15284 also hangs after uninstall process explorer infoimage/png45548

Comments

Comment #0 by code — 2015-11-04T11:05:17Z
Comment #1 by code — 2015-11-04T11:08:36Z
Could anyone with this problem check what files are left in the previous installation folder?
Comment #2 by gassa — 2015-11-04T13:04:42Z
Can't reproduce it here with a fresh install (Windows 2008 R2). The baddest thing I got is: ----- 0. The system is clean from any D-via-installers (I myself use zip archives). 1. Run dmd-2.067.0.exe and follow the defaults. 2. Run dmd-2.069.0.exe, it asks to uninstall and runs the process uninstall.exe. 3. Follow the defaults, it asks for recursive deletion (of the default path C:\D\dmd2). 4. After clicking Finish, the 2.069.0 installer resumes, BUT there is a new Au_.exe process (locally from C:\Users\<username>\AppData\Local\Temp\1\~nsu.tmp\) which AGAIN asks for recursive deletion of the default path. Whatever I choose (OK or Cancel or just ignore the Au_.exe window), the installer is able to proceed normally. ----- If I replace dmd-2.067.0.exe with dmd-2.068.1.exe or dmd-2.068.2.exe on step 1, there is no such effect. Perhaps there exists a version to use on Step 1 which would help reproduce a more severe problem? Can't try all of them right now.
Comment #3 by github-bugzilla — 2015-11-08T22:51:26Z
Commits pushed to stable at https://github.com/D-Programming-Language/installer https://github.com/D-Programming-Language/installer/commit/176b97aa59d9fe31712efd7e0c1d47033ce882e6 fix Issue 15284 - dmd installer hangs... - ExecWait seems to loop infinitely for some people and it doesn't wait for the uninstaller anyhow http://nsis.sourceforge.net/When_I_use_ExecWait_uninstaller.exe_it_doesn't_wait_for_the_uninstaller https://github.com/D-Programming-Language/installer/commit/252480ee76186214f7b80dfd4898c79d9cff9210 Merge pull request #160 from MartinNowak/fix15284 fix Issue 15284 - dmd installer hangs...
Comment #4 by code — 2015-11-08T23:34:02Z
Could someone please try and verify that this installer fixes the issue. https://dlang.dawg.eu/downloads/dmd.2.069.0~fix15824/
Comment #5 by petar.p.kirov — 2015-11-10T09:28:58Z
I hit the same problem when upgrading from DMD-2.069.0-b2 to DMD-2.069.0 (final release). Windows 8.1 Enterprise x64. I have attached the call stack obtained (while the installer was hanging) with Process Explorer.
Comment #6 by petar.p.kirov — 2015-11-10T09:30:04Z
Created attachment 1564 Process Explorer information about the installer, while it was hanging
Comment #7 by petar.p.kirov — 2015-11-10T09:37:29Z
(In reply to Martin Nowak from comment #1) > Could anyone with this problem check what files are left in the previous > installation folder? When the installer was hanging the C:\D\dmd2 folder was already deleted. (I also have dub installation there under C:\D\dub which was unchanged. I don't think there's a problem with it, because I haven't had such issues with any of the previous releases.)
Comment #8 by petar.p.kirov — 2015-11-10T09:45:46Z
I killed the hanging installer, downloaded DMD-2.0.68.0 and installed it successfully (it didn't detect any previous installation of DMD). Then I ran dmd-2.069.0.exe, it reported that there was an old version and I chose to uninstall it. The installer hang just after I clicked the Finish button on the uninstaller which had completed its work.
Comment #9 by petar.p.kirov — 2015-11-10T09:52:11Z
Created attachment 1565 dmd-2.069.0-fix15284 also hangs after uninstall process explorer info
Comment #10 by petar.p.kirov — 2015-11-10T10:06:28Z
The issue is more serious than I thought. I actually can't use dmd-2.069.0.exe at all, even though I have removed the previous installation of DMD. Now when I start the installer it just starts hanging after it starts (the setup wizard window is not shown at all).
Comment #11 by code — 2015-11-10T13:57:10Z
Overall I get the impression we should depart with an installer system where I have to host binary plugins myself [¹] (so they don't get lost) and spend over an hour to make the installer log something. There has been some recent development with NSIS-3.0, but I wonder what .msi installer tools are out there. [¹]: https://dlang.dawg.eu/downloads/others/nsisunz-dll-1_0.zip On topic I updated https://dlang.dawg.eu/downloads/dmd.2.069.0~fix15824/ to write an install.log into your C:\D folder. Seems like the installer always appends to the log. Can you please run that and send me the log? Maybe something in our updated VS/SDK detection is the cause for the hang.
Comment #12 by petar.p.kirov — 2015-11-10T16:34:41Z
(In reply to Martin Nowak from comment #11) > Overall I get the impression we should depart with an installer system where I have to host binary plugins myself [¹] (so they don't get lost) and spend over an hour to make the installer log something. > There has been some recent development with NSIS-3.0, but I wonder what .msi installer tools are out there. > > [¹]: https://dlang.dawg.eu/downloads/others/nsisunz-dll-1_0.zip I would like to see an installer written in D, so one can change anything he want in a single sane language. Obviously this is not trivial to do I don't expect anyone to write an installer system from scratch, but after reading the DMD installer script I got the feeling that if it wasn't for the GUI, it would take fewer lines to achieve the same in D and the code would be more comprehensible. I feel sorry for the poor soul who had to write this: [1] > > On topic I updated > https://dlang.dawg.eu/downloads/dmd.2.069.0~fix15824/ > to write an install.log into your C:\D folder. Seems like the installer > always appends to the log. Can you please run that and send me the log? > > Maybe something in our updated VS/SDK detection is the cause for the hang. After a few seconds I got a ~7MB file log file. You are right to think that the issue is due to the updated VS/SDK detection. The contents of install.log are: Call: 2674 Jump: 2691 Jump: 2708 Check previous dmd installation Check dmd already installed DetectVSAndSDK Call: 2564 Read VisualStudio\*\Setup\VC detect KitsRoot* detect KitsRoot* detect KitsRoot* detect KitsRoot* detect KitsRoot* [... repeated infinately ...] Previously I had a VS installed on this computer and later I uninstalled it, and probably some of the SDKs were left there. Is it possible that this is confusing the installer? Anyway, looking at this change [1], it looks like there is an infinite loop. 95% of the time when I referesh the call stack it is in kernelbase.dll:RegOpenKeyEx. [1]: https://github.com/D-Programming-Language/installer/blob/master/windows/EnvVarUpdate.nsh [2]: https://github.com/D-Programming-Language/installer/commit/818056aa2242d4ffb36807623d193f58e860a8e2#diff-b7d237f81c7c9c97afe3ee2097c8b267R395
Comment #13 by petar.p.kirov — 2015-11-10T21:27:47Z
*** Issue 15314 has been marked as a duplicate of this issue. ***
Comment #14 by github-bugzilla — 2015-11-10T22:11:32Z
Commit pushed to stable at https://github.com/D-Programming-Language/installer https://github.com/D-Programming-Language/installer/commit/92de353bec470a0b992819c05a93f9044adb9763 Merge pull request #161 from rainers/endless_sdkcheck fix Issue 15284 - dmd installer hangs when updating installed windows version
Comment #15 by code — 2015-11-11T02:08:22Z
This affects anyone that doesn't currently have a Windows SDK installed.
Comment #16 by code — 2015-11-11T03:10:54Z
I updated the compiler download. https://dlang.dawg.eu/downloads/dmd.2.069.0~fix15824/ If someone confirms the fix we'll build a new point release.
Comment #17 by restlessmonkey — 2015-11-11T03:15:37Z
Now it proposes me to install Visual studio and then installer works after I click "No"
Comment #18 by code — 2015-11-11T08:08:36Z
(In reply to Vitalii Minnakhmetov from comment #17) > Now it proposes me to install Visual studio and then installer works after I > click "No" You should click yes and install VS for 64-bit support ;).
Comment #19 by bugzilla — 2015-11-11T09:04:49Z
Thanks, everyone, for tracking this down and fixing it!
Comment #20 by code — 2015-11-22T23:54:18Z
(In reply to Martin Nowak from comment #11) > From Thomas Mader: > http://forum.dlang.org/post/[email protected] > @Martin: In reply to https://issues.dlang.org/show_bug.cgi?id=15284#c11. I switched the installers for my workplace from NSIS to InnoSetup [1] and was very satisfied with it. In my opinion it's superior to NSIS. It might be worthwile to strive to change but I might be wrong because I never looked on the Dlang installers. [1] http://www.jrsoftware.org/isinfo.php
Comment #21 by github-bugzilla — 2016-01-03T14:16:01Z