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.
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:
Answer on silent installation here
Comprehensive answer on MSI logging
https://www.advancedinstaller.com/user-guide/read-log.html
I am getting a build error after a while, and I am unsure as to why.
Any ideas or hints?
I was missing the
libc6:i386
package, which contains
/lib/ld-linux.so.2
needed to load shared libraries.
Without this, it prevented me from running various shared libraries, and merely said "no such file or directory" which is a crap error message imho since the file is clearly there, just not executable.
I have a strange problem when running DTEXEC to run a SSIS package.
my command is dtexec /Project /Package.
I get no error but get a screen that simply says
"Started DD-MM-YY", no error, just nothing.
Has anyone ever seen this before, read the MSDN documentation to no avail.
Found the answer, I was specifying the whole "path" in the package name for the package. I needed to do /package "Package.dtsx" instead of "C:/Blah/Package.dtsx"
Hope it helps someone else
Can anyone help me.
I have deleted a number of test packages I had in SSIS.
Now when I run one of the remaining ones I get a build error.
Error 1 Cannot create the output file "G:\SQL\Proj\bin\Budgets_Delete.dtsx": Could not find file 'G:\SQL\Proj\Budgets_Delete.dtsx'
This is an old package that I have deleted. The package I am running seems to work OK I just get this error message every time.
and this does not allow me to create Delpoyment Utility.
Please help me. EVEN I re saved the package, but no luck
I used the script found here
... And every time that I generate this dynamic package, it needs to open the script task and click "Ok" because the "The binary code for the script is not found." error aways appears. Is there a way to solve this without BIDS ? Thanks and sorry my bad english.
I got this error when a SSISDB was upgraded to 2016 from 2012 and the package was not re-deployed using newer visual studio with project set to deploy to SQL Server 2016 in the project deployment properties.
This is often caused to to an error or omission in the code in the script task. If you are certain that the code is correct you can go to the script properties and set the PrecompileiIntoBindaryCode to False, the default is set to true. This is under the Properties or in the Script option of the properties window.
This worked for us
From Project properties, change TargetServerVersion to SQL Server 2019 (Or desired version)
open the .dtsx file for each package in Notepad++ or other text editor
remove the following for each dtsx file (there will be 1 occurence per script component in packages)
<PropertyGroup>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
save the .dtsx file
go back into Visual Studio and rebuild the project file (as well rebuild individual script task)
I just ran into this error, after I changed my package deployment configuration to 2012. In the script some references we no longer linked. I had to reset the version of the .Net framework in the VS script environment, references were now legit, rebuild success.
In Visual Studio 2017, SSIS 2017 solution, had same error on a script task. Compared to another solution with similar process and discovered the issue was the Reference which had an error did not have a path listed for the dll. Removed the reference and added again. This resolved the issues.
Uninstall VS 2015 and SSDT 14.
Re Install VS 2015 and SSDT 14.
Open a new Integration project and import the SSIS project using the ispac file
Open the task having the error
Click On Edit Script.
Then either do this:
In Build tab click on Run code analysis on solution or Build or Clean and then Build
Save All the solution
Close the window
Click on OK in the task window.
OR just click on edit script and then OK button
The error should go off
This is for Visual Studio 2015 Community/SSDT 14
use SSMS V17.8.1 and upgrade your SSISDB and it will work, I tried it.
For me, I found that using string interpolation caused the issue.
For example:
This line caused the error:
command += $"test {property.Name}";
Changing it to this fixed the error:
command += "test " + property.Name;
After changing from VS 2017 to VS 2019, I saw this error in SQL Server / Integration Services Catalog / "My Package" / Validate... These messages are also visible in Standard Reports / All Executions.
My particular error messages were "VS_ISBROKEN" in the SSIS.Pipeline and "The binary code for the script is not found." in my scripting task.
I opened up the scripting task (C#) and changed the project target to x86 instead of None (MSIL), rebuilt it, closed the scripting solution, pressed Ok to keep the script changes, saved, built and deployed.
That worked for me.
Addendum:
It turns out that I was deploying a single package using VS2019 while the original Project was deployed using VS2017.
I think that the two deployments are not 100% compatible, and recommend that users either deploy an entire project, or deploy a package update using the same version as was used for the initial release.
You should probably ignore my suggestion above about changing project target.
Check your references, make sure all external references are added to the server's GAC.
For adding your dll(for example csvhelper.dll) in GAC you can use the following command in cmd.
C:\test>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools\gacutil.exe" -i csvhelper.dll
**Put your dll in a folder (for example in test folder)
**Pay attention which version of .Netframework you have(Here I used .net4.7)