Configure Windows Error Reporting to capture a full Codesys.exe dump, because the Event ID 1000 entry identifies a user-mode CODESYS crash but does not establish which Windows update or application component caused it.
1. Capture the CODESYS crash dump
CODESYS V2.3 is a 32-bit application under Program Files (x86), so configure both standard and WOW64 Windows Error Reporting locations. Microsoft recommends full process dumps for repeatedly crashing third-party applications and then supplying those dumps to the application vendor.^1^
Run this from an elevated Command Prompt:
mkdir C:\WER
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpFolder /t REG_EXPAND_SZ /d "C:\WER" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpCount /t REG_DWORD /d 10 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpType /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpFolder /t REG_EXPAND_SZ /d "C:\WER" /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpCount /t REG_DWORD /d 10 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps\Codesys.exe" /v DumpType /t REG_DWORD /d 2 /f
Reproduce the crash and check C:\WER for a .dmp file. Exception 0xc000041d indicates an unhandled exception during a user callback; it does not, by itself, identify the defective component.^2^
Analyze the dump with WinDbg and !analyze -v, or send it to WAGO/CODESYS support. Because Codesys.exe is both the faulting application and module, Microsoft’s documented escalation path is the third-party vendor rather than Microsoft application support.^1^
2. Correlate it with an exact update
Do not assume every recently installed KB is responsible. Record the last updates on one affected server:
Get-HotFix |
Sort-Object InstalledOn -Descending |
Select-Object -First 15 HotFixID, Description, InstalledOn
Get-HotFix is the supported PowerShell method for listing installed hotfixes.^3^
Also inspect:
- Event Viewer → Windows Logs → Application for CODESYS events at the crash time.
- Applications and Services Logs → Microsoft → Windows → WindowsUpdateClient → Operational.
- Compare the KB installation time with the first CODESYS failure on both Server 2019 and 2022.
Microsoft’s Server update guidance specifically recommends correlating Application, System, and WindowsUpdateClient events around the update time.^4^
3. Test rollback only after establishing correlation
If the same KB immediately precedes the failure on multiple machines:
- Back up the CODESYS project and communication configuration.
- Take a VM checkpoint or system backup.
- On one nonproduction server, open Control Panel → Programs and Features → View installed updates.
- Select the correlated cumulative update and choose Uninstall.
- Restart, then repeat the exact operation that crashed.
- If CODESYS works again, pause that KB through your normal WSUS/update-management process while escalating with the dump, KB number, and before/after test results.
Rollback is a diagnostic and temporary mitigation, not proof of a general Server 2019/2022 defect. No supplied Microsoft release-health entry documents this exact combination of CODESYS [IP Address], Server 2019/2022, and 0xc000041d.
Conditional CODESYS-specific workaround
If CODESYS closes specifically when downloading to the PLC, a closely matching CODESYS V2.3 report recovered by performing Reset (Original) and then restoring the communication settings and baud rate.^5^
Use this only if that is your crash point. Reset (Original) can remove the controller application/configuration, so preserve the project and PLC parameters and schedule downtime first. If CODESYS instead crashes at startup or while editing, this workaround is not established for that symptom; provide WAGO with the dump and the exact triggering KB.
After investigation, remove the two LocalDumps\Codesys.exe registry keys so full dumps do not continue consuming disk space.^1^
References
- The application or service crashing behavior troubleshooting guidance
- [Task Scheduler] Ask for details about the return code 0XC000041D - Microsoft Q&A
- Gets the most recent hotfix installed on the local computer by retrieving all hotfixes, sorting them by installation date, and selecting the latest one.
- Windows Server update troubleshooting guidance
- CODESYS Forge - CODESYS Forge / Talk / Codesys V2.3 🇬🇧: Codesys closes instantly after I try to download to PLC