1

I am working with a 64-bit Windows installer on a 64-bit Windows 10 system that has intermittent crashing issues, where it will crash and close without displaying any kind of error message. This occurs when clicking through the installer's UI, it does not actually attempt to install anything. Collecting a crash dump, I saw that it listed the exception as an "unknown error) 0xC000409. When I ran the crash dump through Visual Studio's debugger in order to obtain information, the message said:

Unhandled exception at 0x00007FFCA685C56F (ntdll.dll) in msiexec__PID__9356__Date__11_01_2021__Time_01_46_34PM__594__Second_Chance_Exception_C0000409.dmp: RangeChecks instrumentation code detected an out of range array access.

The stack trace collected from the crash dump says the following:

ntdll!LdrpICallHandler+f
ntdll!RtlpExecuteHandlerForException+f  
ntdll!RtlDispatchException+244    
ntdll!KiUserExceptionDispatch+2e
ntdll!LdrpDispatchUserCallTarget+e  
msi!CMsiRecord::Release+12e
msihnd!CMsiHandler::CreateControls+18e    
msihnd!CMsiHandler::CreateNewDialog+6ba   
msihnd!CMsiHandler::RunWizard+564     
msihnd!CMsiHandler::DoAction+6e6  
msi!MsiUIMessageContext::ProcessMessage+1816      
msi!MsiUIMessageContext::RunInstall+1ed   
msi!RunEngine+1c9  
msi!MsiInstallProductW+11f
msiexec!DoInstallPackage+20e      
msiexec!ServerMain+1009 
msiexec!WinMain+36
msiexec!__mainCRTStartup+1a0      
kernel32!BaseThreadInitThunk+14
ntdll!RtlUserThreadStart+21

As far as I am aware, there were no major changes made to the installer recently. It just suddenly started getting reported that the installer was crashing, and this was the information that I was able to compile so far. My question is if there's any way to troubleshoot the installer during runtime so that I can get to the bottom of this, or are there any potential fixes I can explore applying? I've done lots of googling on this error and I haven't been able to find a related result yet.

I have also attempted to use ProcMon to see if a file is being blocked but have yet to find anything. I attempted to attach debuggers to the installer to produce a runtime failure, but because it appears to be going into Microsoft code, I can't get a look at the source or the information that it's working with.

I attempted to gather Windows Installer logs, but the log just cuts off at the moment of crashing without displaying any useful exception information. As best as I can gather, the crash occurs when the installer tries to create a dialog.

Coliwack
  • 11
  • 2
  • 14
  • Try to see if the Windows Event Viewer contains more information about the failure. Does the behavior persists on a clean machine? Maybe something on your development machine got corrupted during intensive testing/dev. – J.Tribbiani Nov 14 '21 at 17:26
  • From what you write I presume you have tested this crash issue on many machines and you see the problem on different machines? – Stein Åsmul Nov 14 '21 at 23:52
  • Yes, I have seen the crash on multiple machines. All I've seen come out of the event viewer is the error code, which didn't tell me much. – Coliwack Nov 15 '21 at 13:12
  • Any progress on this issue? – Stein Åsmul Nov 20 '21 at 00:22
  • Adding ! to the logging options is really important to make sure you get everything. Are you using standard MSI UI or do you have your own internal ui handler? Any custom actions? – Christopher Painter Nov 22 '21 at 01:57

1 Answers1

0

UPDATE: Some questions:

  • 1) Do you have any custom actions in the setup GUI?

  • 2) Is this a GUI-set from WiX or is it your own, custom GUI?

  • 3) These machines are not Windows 11 are they?

  • 4) Are you installing on a very clean virtual? The below entry in the stack trace makes me wonder if the Visual C/C++ Runtime is installed on the box in the appropriate version?:

    msiexec!__mainCRTStartup+1a0
    

This would seem to refer to "The C runtime Library (CRT)". Please check if it is installed: Microsoft Visual C++ Redistributable Latest Supported Downloads.


Logging

Verbose logging with extra debugging information (very slow) - Comprehensive answer on logging:

msiexec.exe /i C:\Path\Your.msi /L*vx! C:\Your.log

Quick Parameter Explanation:

/i = run install sequence 
/L*vx! C:\Your.log = verbose debug logging at specified path

The x adds extra debugging information, and the ! disables the log buffer. This means there is no lost log if there are any crashes.


Silent Installation

I am wondering if the crash comes from the setup GUI alone. If this is the case you might be able to install the setup silently successfully (since this bypasses the GUI entirely). Please try this? If this fails too, perhaps it is the Visual C/C++ runtime that is missing? Or likely something else. Logging is essential as explained above.

msiexec.exe /i c:\setup.msi /QN /L*V "C:\Temp\msilog.log"

Quick Parameter Explanation:

/L*V "C:\Temp\msilog.log"= verbose logging
/QN = run completely silently
/i = run install sequence 

You can throw in the exclamation mark for continuous logging (no log buffer) here as well, but that will slow the installation down a lot.


Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • To answer the questions: 1) There are custom actions running, but what I've seen from the logs so far suggests that they are succeeding. 2) I think except for the first two dialogs in the installer, it's all custom UI. 3) They're Windows 10 machines. It's gonna be a while before we even consider upgrading to anything besides. 4) I had been using this virtual machine for a while so I'm not sure how clean it is. This issue also occurs on the customer machines which have different prerequisits. – Coliwack Nov 15 '21 at 13:14
  • Also the installer installs several versions of the C++ redistributable by default. Most of the ones I work with do this, to the point where my VM has a bunch of them installed. – Coliwack Nov 15 '21 at 13:29
  • I attempted to debug by adding an exclamation point to the logging parameter. When I finally did get the installer to crash, it crashed while trying to load the CustomizeDlg, which I believe is a standard WiX dialog. – Coliwack Nov 15 '21 at 16:00
  • When you run validation on the MSI via Orca (Tools => Validate... => Go) - what errors and warnings do you get? There could be some errors lurking in the WiX GUI markup. And as a side note: Perhaps [try the shell extension shown at the bottom here](https://stackoverflow.com/a/69753033/129130) to help you run the setup with admin rights. Are your WiX sources on github? – Stein Åsmul Nov 15 '21 at 17:27
  • My sources are not on Github. I don't think I'd be able to post the source because I'm pretty sure it's proprietary. – Coliwack Nov 16 '21 at 14:01
  • Does the MSI validation tell you anything? Also: the GUI markup code could be the interesting part. There can be very strange errors there, but rarely anything that kills the setup entirely by crashing. – Stein Åsmul Nov 16 '21 at 14:03
  • My guess would be any custom actions invoked from the GUI. Can you locate them and tell us what they are doing? (if there are any). – Stein Åsmul Nov 16 '21 at 14:16
  • The last custom action that gets run, if it gets run, finishes successfully. The GUI is also entirely constructed in WiX. The last time I got it to crash the action succeeded. What am I looking for on the ICE validation? – Coliwack Nov 16 '21 at 15:29
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/239284/discussion-between-stein-asmul-and-coliwack). – Stein Åsmul Nov 16 '21 at 15:37
  • I'd like to investigate this on a complimentary basis. I can sign an NDA. – Christopher Painter Nov 22 '21 at 01:58
  • I think I have seen similar before. I really think it is a custom action issue. If we can look at the finished MSI we should be able to figure this out? – Stein Åsmul Nov 22 '21 at 02:15