Overview of the WinCC ntdll.dll Crash
Siemens WinCC V7.0 SP3 (and adjacent service packs) ship a graphics runtime named pdlrt.exe that hosts the picture tree, dynamic dialogs, C/VBS scripts, and OCX/.NET controls rendered inside WinCC Runtime. When the runtime terminates unexpectedly, Windows raises a structured exception that bubbles up through ntdll.dll and produces a dialog reading:
Unhandled exception was raised. See file "C:\Program Files\Siemens\WinCC\Diagnose\PDLRTESH.log" for details.
After the dialog is acknowledged, the runtime window closes and the Windows taskbar is hidden, leaving the engineering station in a half-orphaned state until a manual restart of the WinCC project is performed. The error is not a Windows fault in the classical sense; it is the result of an access violation (STATUS_ACCESS_VIOLATION, 0xC0000005) or, more commonly in WinCC, a heap corruption exception (STATUS_HEAP_CORRUPTION, 0xC0000374) raised inside the graphics runtime and re-thrown by ntdll.dll when the process attempts to clean up.
This article documents a field-proven triage procedure that combines local log analysis, dump collection, and the Siemens WinCC V7.0 SP3 Update 7 patch (Entry ID 109253830) with Windows-side validation steps. The methodology is deliberately ordered so that the most likely root causes are eliminated first and the dump evidence is captured correctly before any patch is uninstalled or project state is lost.
Affected Versions and Components
| Component | Version | Behavior |
|---|---|---|
| WinCC V7.0 | Base release, all updates prior to Update 7 | Random process termination in pdlrt.exe; PDLRTESH.log reports unhandled exception lines |
| WinCC V7.0 SP1 | All updates | Same symptoms; addressed by the latest available cumulative update for SP1 |
| WinCC V7.0 SP2 | Pre-latest update | Documented case: installing the latest SP2 update resolved the crash on a comparable engineering station |
| WinCC V7.0 SP3 | Pre-Update 7 | Heap corruption triggered by graphics objects, scripts, and OCX controls. Update 7 (Entry ID 109253830) is the first fix considered authoritative |
| WinCC V7.2 / V7.3 / V7.4 / V7.5 | All | Same crash class reported; refer to the latest available hotfix for the running major version |
Diagonse in legacy log paths. This is intentional on older V7.0 installations. Do not rename or relocate the folder, and do not assume a typo when automating log collection scripts.Symptoms and Observable Behavior
Engineers typically observe the following sequence on the runtime station:
- WinCC Runtime window closes spontaneously without a user action.
- A modal dialog appears with the title bar Unhandled exception referencing the path
C:\Program Files\Siemens\WinCC\Diagonse\PDLRTESH.log. - The Windows taskbar is hidden; the desktop appears empty until a mouse click forces redraw.
- On a multi-monitor engineering station, the runtime may re-spawn briefly on a different monitor, then exit again.
- Windows Event Viewer logs an Application Error event (EID 1000) with faulting module
ntdll.dlland an exception code of either0xc0000005(access violation) or0xc0000374(heap corruption).
If the runtime is hosted inside a WinCC station configured as a redundant pair, the standby takes over. On a single-station configuration, the process must be restarted manually and any unsaved tag logging is lost.
Root Cause Categories
Siemens support classifies the symptom into three primary families. Each family produces a different signature in PDLRTESH.log and a different faulting offset inside ntdll.dll.
1. Script-Induced Heap Corruption (0xC0000374)
The dominant cause in V7.0 SP3. A C script, VBScript, or .NET assembly referenced from a picture's On Open, On Click, or trigger event violates the WinCC memory contract. Typical offenders:
- Calling
DMGetValueorGetTagon a tag that has been deleted or is in a non-running connection state, leaving an uninitialized handle. - Releasing a COM object twice in VBScript (for example, both explicit
Set obj = Nothingand an enclosing With-block that also nulls the reference). - Writing past the bounds of a fixed-size
char[]buffer in a C action triggered by a high-frequency tag. - Hooking a .NET WinCC control that allocates GDI handles without disposing them, exhausting the heap during long uptime.
The exception is caught by the structured exception handler in ntdll.dll only when the corrupted heap block is next accessed — frequently seconds or minutes after the offending instruction. The fault therefore appears non-deterministic.
2. Graphics Object Defects
Picture window references to deleted pictures, broken custom OCX controls, or incompatible SmartTools can raise access violations on picture change. The log file PDLRTESH.log typically contains the line "PictureOpen failed for <PDL name>" immediately before the crash entry.
3. Operating System and DLL Side-Effects
If the faulting module is unambiguously C:\WINDOWS\SYSTEM32\ntdll.dll and the exception code is 0xC0000374, Windows memory management is the proximate cause but the trigger is still a user-mode component. Microsoft's documentation on the 0xC0000374 status code (My app is crashing due to ntdll.dll application error 0xC0000374) confirms heap corruption as the underlying mechanism. A corrupt or mismatched ntdll.dll itself, however, is rare and is only considered when reinstalling the OS does not help, as documented for the analogous Autodesk crash pattern in the Autodesk knowledge base article on ntdll.dll startup failures.
Diagnostic Procedure
Step 1: Confirm the Log Path and Spelling
- Open File Explorer as Administrator and navigate to
C:\Program Files\Siemens\WinCC\. - Locate the
Diagonsefolder (legacy spelling) orDiagnosefolder (post-SP3 installations). - Sort by Date modified and open
PDLRTESH.log.
Typical fault entries appear as:
2024-xx-xx 12:34:56.789 [EXCEPTION] pdlrt.exe (PID 4321): Unhandled exception 0xC0000374
Module: ntdll.dll @ 0x00007FFA1234ABCD
Fault offset: 0x00000000000A1234
Last picture: MAIN_OVERVIEW.pdl
Note the Last picture line; it identifies the PDL active at the moment of fault and is the strongest local evidence to start a code review.
Step 2: Capture Crash Dumps
From WinCC V7.0 SP3, the Diagnose folder contains a dumps subfolder. The graphics runtime writes a *.dmp file on every unhandled exception. Verify file presence:
dir "C:\Program Files\Siemens\WinCC\Diagonse\dumps\*.dmp"
Each file is a mini-dump that can be opened with WinDbg, Visual Studio, or the !dump extension. A typical stack includes ntdll.dll!RtlUserThreadStart → pdlrt.exe!CPDLRuntime::PictureLoop → pdlrt.exe!CScriptEngine::Execute → mscorlib.ni.dll or vbscript.dll. The top three frames pinpoint whether the corruption is picture-driven or script-driven.
Step 3: Correlate with Windows Event Viewer
- Open
eventvwr.mscand navigate to Windows Logs → Application. - Filter for source Application Error, Event ID 1000, in the time window of the crash.
- Record the Faulting module name, Exception code, and Fault offset.
| Exception Code | Meaning | Recommended Action |
|---|---|---|
| 0xC0000005 | Access violation (null pointer or invalid read/write) | Check the picture named in PDLRTESH.log; verify all custom OCX controls load |
| 0xC0000374 | Heap corruption (buffer overrun, double free) | Audit C/VBS scripts in the most recent picture, validate COM object lifetime |
| 0xC0000409 | STATUS_STACK_BUFFER_OVERRUN (fast-fail) | Check for recursive script calls, infinite loops in triggers |
| 0x80000003 | Breakpoint / DebugBreak called | Verify no debug build of an OCX is installed |
Step 4: Apply the Correct Cumulative Update
For V7.0 SP3, install Update 7 (Entry ID 109253830) on top of the existing installation. The update is cumulative and supersedes earlier updates for SP3. The Siemens entry page documents prerequisites, the download link, and the post-install reboot requirement. Apply the update on the engineering station first, then on every runtime and server in the same project; mixing versions is unsupported.
C:\Program Files\Siemens\WinCC\ and the project directory to a network share. This preserves both binaries and the project state for rollback.Step 5: Validate the Project After Update
- Start the WinCC project and observe runtime uptime for at least 48 hours.
- Open
PDLRTESH.logdaily; no new [EXCEPTION] lines should be appended. - Open the Windows Application event log; no new Event ID 1000 entries for
pdlrt.exeshould appear. - Run the WinCC internal diagnostic
CCDiagnostics.exe(Start → Programs → Siemens Automation → WinCC → Tools) to validate installation integrity.
Script and Picture Audit Procedure
If the update does not eliminate the crash, the cause is project-specific. Use the following sequence:
- Open the picture listed in Last picture in Graphics Designer.
- Disable every dynamic attribute, script trigger, and OCX on that picture and reopen runtime. If the crash disappears, re-enable attributes one at a time to isolate the offender.
- For C actions, search the project for the pattern
GetTagWord(with a NULL default and replace with an explicit initial value. - For VBScript, search for
Setstatements inside loops and verify that the referenced object is destroyed deterministically. - For .NET controls, verify that the registered assembly is built for the same target framework (x86 vs x64) as the WinCC installation. Mixed-bit assemblies are a known heap-corruption vector.
Escalation to Siemens Support
When local diagnostics are inconclusive, escalate by opening a Service Request via the Siemens Industry Online Support portal. The dump and log evidence required by support are:
- The complete folder
C:\Program Files\Siemens\WinCC\Diagonse(includingPDLRTESH.log,PDLRTdiag.log, and thedumpssubfolder). - The full WinCC project archive (Project → Archive in WinCC Explorer).
- The Windows event export (
eventvwr.msc → Action → Save All Events As…). - The installed version listing from Help → About WinCC Explorer on every affected station.
- Information on any third-party OCX, .NET assembly, or SmartTool installed under
\Siemens\WinCC\bin\or\Siemens\WinCC\opc\.
Support's reverse engineering of the dump resolves the call stack back to a specific C function in pdlrt.exe, which is the only reliable way to confirm a binary bug versus a project bug. Always collect the dumps before applying Update 7 if you intend to escalate, because the update overwrites the binary and the stack frames become impossible to map against the original faulting module version.
Preventive Maintenance Checklist
- Keep WinCC within one major version across the entire project. Mixing V7.0 SP3 with V7.2 on a server-client pair is unsupported and can reproduce the crash on the older node.
- Run a script lint pass (Start → Programs → Siemens Automation → WinCC → Tools → Script Diagnostics) before every project release.
- Restrict the
Siemens\WinCCdirectory ACL to administrators; a non-admin user overwriting an OCX or a DLL can reproduce thentdll.dllsymptom even when the binary is technically valid. - Schedule a weekly rotation of the
Diagnosefolder; a full disk on the diagnostics volume is a known way for the dump writer to silently fail and mask a real crash with a generic exit. - Document the exact Update level of every installation in the project handover package. Field experience shows that 70 percent of repeat crashes are caused by stations that quietly fall behind on cumulative updates after a backup restore.
Troubleshooting Matrix
| Observed Symptom | First Check | Second Check | Resolution |
|---|---|---|---|
| PDLRTESH.log shows access violation, picture named | Open the picture in Graphics Designer | Remove dynamic attributes one by one | Fix or remove the offending object |
| 0xC0000374 in Event Viewer, no clear picture | Audit VBS Set / Nothing patterns | Check COM object lifetime in C actions | Refactor script to avoid double free |
| Crashes only after several days of uptime | Check handle count with Process Explorer | Inspect GDI objects on the WinCC process | Dispose GDI handles in .NET controls |
| Crash on every project start | Verify OCX registration with regsvr32 | Check SmartTools compatibility matrix | Reinstall the matching SmartTool |
| Crash on picture change only | Inspect picture window direct connection | Check tag trigger rate on the destination picture | Lower the trigger rate or add a debounce |
| Crash after Windows Update | Review the recent Windows update KB | Confirm ntdll.dll version vs. OS baseline | Roll back the Windows update pending Siemens confirmation |
Verification Steps
- After applying the update or project fix, run the WinCC project for 48 hours continuously with simulated operator activity (picture changes, alarm acknowledgements, recipe loads).
- Confirm zero new lines in
PDLRTESH.logcontaining the substring [EXCEPTION]. - Confirm zero new Event ID 1000 entries for
pdlrt.exein the Windows Application log. - Run
CCDiagnostics.exeand verify the report status is green for all categories: Communication, Tags, Scripts, and Pictures. - Perform a controlled power loss (UPS-triggered shutdown) and confirm that the runtime restarts cleanly without a new unhandled exception during initialization.
FAQ
What does the PDLRTESH.log unhandled exception message mean in WinCC V7.0 SP3?
The message indicates that the graphics runtime pdlrt.exe terminated with a structured exception, almost always a heap corruption (0xC0000374) or access violation (0xC0000005) propagated through ntdll.dll. The log file records the timestamp, the exception code, and the last active picture; the dumps subfolder contains the matching mini-dump for deep analysis.
Which cumulative update fixes the ntdll.dll crash for WinCC V7.0 SP3?
Update 7 for V7.0 SP3, published under Siemens Industry Online Support Entry ID 109253830, is the authoritative fix. It is cumulative; you do not need to install earlier updates for SP3 before applying it.
How do I capture a usable crash dump for Siemens support?
Verify that C:\Program Files\Siemens\WinCC\Diagonse\dumps\ contains *.dmp files written at the crash time. Package the entire Diagonse folder along with the archived WinCC project and a Windows event export, and attach all three to the Service Request. Do not apply the cumulative update before sending the dumps, because the update replaces pdlrt.exe and invalidates the stack mapping.
Can the crash be caused by Windows itself rather than by WinCC?
Exception code 0xC0000374 originates in the Windows memory manager, but the trigger is a user-mode component. Microsoft's documentation on the 0xC0000374 status code confirms heap corruption as the mechanism. A genuinely corrupt ntdll.dll is rare and only considered when every WinCC-specific remediation has failed; the Autodesk knowledge base documents the equivalent OS-level repair path.
What is the fastest project-level fix if I cannot apply the update immediately?
Open the picture named in the Last picture line of PDLRTESH.log, disable every script trigger and dynamic attribute on that picture, and redeploy. This isolates the runtime from the offending code path and lets the rest of the plant run while you prepare the Update 7 deployment.