Resolving WinCC 7.0 SP1 PDLRTSEH Unhandled Exception During Alarm Acknowledgment
Engineers running Siemens WinCC V7.0 SP1 in a redundant server configuration sometimes encounter an Unhandled exception error after pressing the Acknowledge all (or single-step acknowledge) function on an Alarm Table Control during runtime. The exception is written to C:\Program Files\Siemens\WinCC\Diagnose\PDLRTSEH.LOG, the WinCC Runtime terminates, and the alarm subsystem no longer loads correctly until the entire operator station is rebooted. The fault is intermittent, which makes it one of the more frustrating defects in long-running WinCC plants.
This reference consolidates the diagnostic workflow, the four most common root causes, and the field-proven remediation steps. It is written for commissioning engineers, HMI administrators, and plant-floor support staff who need to repair the runtime without re-imaging the server.
PDLRTSEH signature. WinCC V7.2+ projects running on TIA Portal V13+ use a different runtime (WinCC RT Professional) and follow a different diagnostic path.1. Problem Definition
1.1 Symptoms
- Runtime message: "Unhandled exception was raised. Look at file C:\Program Files\Siemens\Siemens\WinCC\Diagnose\PDLRTSEH.LOG for details."
- WinCC Explorer exits without user prompt immediately after the alarm acknowledgment action.
- After a warm restart of
WinCCExplorer.exe, the alarm views return empty or fail to subscribe; theCCAlarmservice reports no connection. - A full PC restart restores normal operation, but the defect re-occurs at random intervals (sometimes daily, sometimes weekly).
- The fault is most reproducible when three or more Alarm Table Controls are embedded in the same picture and a global acknowledge event triggers all three simultaneously.
1.2 Affected Configurations
| Component | Tested / Affected | Notes |
|---|---|---|
| WinCC Version | V7.0 SP1, V7.0 SP2, V7.0 SP3 (early) | HF cumulative update mitigates the issue |
| WinCC Option | Redundancy, Single-User, Client | Redundant pair shows higher occurrence |
| OS | Windows Server 2003 R2 x64, Server 2008 R2 | Both 32- and 64-bit variants affected |
| Picture Engine | PDLRT (legacy Graphics Runtime) | Generated log name PDLRTSEH
|
| Alarm Subsystem | Alarm Control (Classic), Alarm Table Control | Three controls per picture is the trigger threshold |
| Scripting | C scripts in Global Script, Project Functions | Uncompiled C is the most common co-factor |
1.3 Reading the PDLRTSEH.LOG
The PDLRTSEH.LOG file is appended each time the Structured Exception Handler (SEH) in the WinCC Graphics Runtime (PDLRT) catches a fatal fault. A typical excerpt:
==================================================
Date : 11.03.2014
Time : 14:22:07
ComputerName : HMI-SRV01
UserName : Operator
ProcessId : 0x0A14
ThreadId : 0x1F2C
ExceptionCode: 0xC0000005 (ACCESS_VIOLATION)
FaultingAddress: 0x00000000
Module : PDLRT.dll
Function : PDLRT_AlarmAcknowledge
Offset : 0x0001B7A2
--------------------------------------------------
Key fields to capture before opening a Siemens support request:
| Field | Interpretation | Remediation Hint |
|---|---|---|
ExceptionCode: 0xC0000005 |
Access violation - NULL pointer or freed object | Recompile all C functions; check ActiveX lifetime |
ExceptionCode: 0xC00000FD |
Stack overflow | Reduce recursion in C actions, split pictures |
Faulting Module: PDLRT.dll |
Fault inside Graphics Runtime | Apply WinCC hotfix, retest on a clean picture |
Faulting Module: CCAlgdsp.dll |
Fault inside Alarm Display | Reduce concurrent Alarm Table Controls |
Function: PDLRT_AlarmAcknowledge |
Triggered by alarm acknowledge | Check global acknowledge scripts |
PDLRTSEH.LOG to a separate folder immediately after the crash. WinCC truncates the file when the runtime restarts, which destroys forensic evidence that Siemens support will request.2. Root Cause Analysis
Siemens' diagnostics, published in support entry 22892165, classify the PDLRTSEH family of exceptions as non-fatal runtime errors raised by the Graphics Runtime's Structured Exception Handler. The four most common underlying causes, ordered by frequency observed in the field, are:
2.1 Uncompiled or Stale C Functions (Primary Cause)
WinCC stores C actions in two locations: the source (editable .pas/.c file) and the compiled header (@...@*.bck). If a project is copied, restored from backup, or migrated from V6.x, the compiled header may be out of date. Calling a stale C function from an alarm event triggers a NULL dereference inside PDLRT.dll.
2.2 External ActiveX Controls with Lifecycle Mismatches
Each Alarm Table Control hosts an OLE/ActiveX container. When a custom OCX (e.g. third-party trend, video, or barcode control) is embedded into the same picture and the picture is unloaded while a global acknowledge is in progress, the ActiveX container releases its interface while PDLRT is still walking the alarm object tree. The resulting IUnknown::Release on a freed pointer raises 0xC0000005.
2.3 Multiple Alarm Table Controls in One Picture
Embedding three or more Alarm Table Controls in a single base picture doubles the trigger rate. Each control subscribes to the same CCAlarm channel and processes the acknowledge asynchronously. When the user clicks Acknowledge all, the runtime fires the acknowledge into all three controls in the same dispatcher tick, and a known race condition in CCAlgdsp.dll pre-V7.0-SP3-HF3 corrupts the alarm list.
2.4 Redundancy Synchronization Race
On a WinCC redundant pair, the standby server mirrors the message frame of the master. If an alarm is acknowledged on the master and the standby is mid-synchronization, the message-frame callback may try to clear the same alarm on the standby, producing a double-free in the message-archive memory pool.
3. Pre-Diagnosis Checklist
Before applying any of the corrective actions below, gather the following information. This avoids repeated PC reboots and is the data Siemens support requires if a hotfix request is opened.
- Copy
C:\Program Files\Siemens\WinCC\Diagnose\PDLRTSEH.LOGto a dated backup folder. - Copy
C:\Program Files\Siemens\WinCC\Diagnose\WinCC_Sys_*.logand the most recentWinCC_Service_*.log. - Open WinCC Explorer > Tools > Status of Server Connections and screenshot the
CCAlarmrow. - Run
reg query "HKLM\SOFTWARE\Siemens\WinCC\RT" /v Versionand record the full version string (e.g.7.0.1.0). - Open the WinCC Information System (start menu) and navigate to Options > Redundancy > Diagnostic Files to confirm redundancy state.
- List the C functions present in Global Script > C-Editor and confirm whether Compile All Functions has been executed since the last project edit.
- List every ActiveX control registered on the picture that hosts the Alarm Table Control (right-click picture > Properties > Controls tab).
4. Solution 1 - Recompile All C Functions
Recompilation is the single highest-yield fix. It addresses both the uncompiled-source issue and most ActiveX-lifetime crashes by re-binding the function pointers to the current library version.
4.1 Procedure
- Close every WinCC Runtime instance on the affected server.
- Open WinCC Explorer > Global Script > C-Editor.
- Select Tools > Compile All Functions. The output window must show
0 errors, 0 warningsfor every*.cand*.pas. - Select Tools > Generate Header to refresh the
@...@*.bckshadow files. - Save the project (File > Save As with a new revision suffix such as
_fixed_compile.pcz). - Restart the WinCC Runtime in the configuration runtime first (File > Activate Runtime in the Graphics Designer) and confirm the alarm acknowledgment works for 10 minutes before deploying to operators.
4.2 Verification
Trigger a single alarm from the simulated alarm source (Internal > Tag > Simulation), acknowledge it, and observe PDLRTSEH.LOG. The file should not be appended. Repeat 50 cycles to confirm stability.
5. Solution 2 - Audit and Remove External ActiveX Controls
If recompilation does not eliminate the exception, or if the log shows Module: <3rd-party>.ocx, the embedded ActiveX is the trigger. The fix is to remove the OCX from the alarm picture and to relocate the functionality to a separate pop-up picture that is opened on demand.
5.1 Procedure
- In the Graphics Designer, open the picture that contains the Alarm Table Control.
- Open the Object Palette > Controls tab and identify every non-Siemens control (OCX with a CLSID that is not
{3D....WinCC...}). - Cut the controls and paste them into a new picture (
Pictures\Popups\Alarm_Extras.pdl). - Replace the embedded control in the alarm picture with a button that opens the popup via
OpenPicture("Alarm_Extras.pdl")in a C action triggered on click. - Recompile all C functions as in Section 4.
- Deploy and test.
5.2 Approved OCX Inventory
The following Siemens-shipped OCX classes are verified to coexist with multiple Alarm Table Controls and do not require relocation:
| CLSID | Class | Safe with 3x Alarm Control? |
|---|---|---|
{3D2D9BF0-3D7B-11D1-91B6-F4C7A0D40000} |
WinCC AlarmControl | Yes |
{3D2D9BF1-3D7B-11D1-91B6-F4C7A0D40000} |
WinCC OnlineTrendControl | Yes (separate picture preferred) |
{3D2D9BF2-3D7B-11D1-91B6-F4C7A0D40000} |
WinCC OnlineTableControl | Yes |
{3D2D9BF3-3D7B-11D1-91B6-F4C7A0D40000} |
WinCC FunctionTrendControl | Yes |
| Any non-Siemens CLSID | 3rd-party OCX | No - relocate |
6. Solution 3 - Reduce Concurrent Alarm Table Controls
If the project architecture cannot be changed to use a single Alarm Table Control, the runtime impact can be reduced by separating the controls into layered base pictures that are loaded on demand rather than all present at startup.
6.1 Pattern A - Direct Picture Change
Use three separate pictures, each containing one Alarm Table Control filtered by a different message class. Navigate between them with a header button. This eliminates the dispatcher collision entirely.
6.2 Pattern B - Picture Window with Conditional Loading
Place a Picture Window on the overview page. Set the Picture Name tag to the desired alarm picture via a C action. Only the currently selected alarm control is instantiated, so the multi-instance race cannot occur.
6.3 Pattern C - WinCC V7.2+ Migration
If the project can be migrated to WinCC V7.2 or later, the alarm display is reimplemented on the WinCC Unified graphics engine, which no longer uses the PDLRT runtime and removes the PDLRTSEH exception family. Migration is non-trivial for large projects and is recommended only when the hardware refresh is already scheduled.
7. Solution 4 - Apply WinCC Hotfixes
Siemens released a sequence of hotfixes for the PDLRTSEH exception family. The applicable hotfix depends on the installed service pack.
| WinCC Version | Hotfix | Symptom Addressed | Source |
|---|---|---|---|
| V7.0 SP1 | HF7 (or later cumulative update) | Alarm acknowledge in multi-control pictures | Siemens 22892165 |
| V7.0 SP2 | HF5 cumulative update | ActiveX lifetime crash in alarm picture | Siemens support request per WinCC V7.0 manual |
| V7.0 SP3 | HF3 (or later) | CCAlgdsp.dll double-free on multi-control acknowledge | Siemens support request |
| V7.0 SP3 HF8+ | No further action | All known PDLRTSEH alarm-acknowledge issues resolved | Release notes |
7.1 Hotfix Application Procedure
- Stop the WinCC Runtime and the
CCAlarm,CCMsgArch, andCCAlgDispservices. - Back up the project file (
<ProjectName>.MCP) and theGraCS,Library, andPASfolders. - Run the Siemens Setup Hotfix executable with administrative credentials.
- Reboot the server.
- Open the project, recompile all C functions (Section 4), redeploy.
8. Redundant Pair Specific Steps
When the issue occurs on a redundant pair, additional steps are required to verify that both servers are at the same WinCC version and the same hotfix level.
- Open Redundancy > Server Data on both servers. Confirm the partner server's Computer Name and Status are
Standby (synchronized). - Compare the registry key
HKLM\SOFTWARE\Siemens\WinCC\RT\Versionon both servers. Mismatches cause the message frame to fall out of sync and produce intermittentPDLRTSEHexceptions on the standby. - Open the Redundancy Control diagnostic window (Start > Programs > Siemens Automation > SIMATIC > WinCC > Redundancy Control). The Last message frame timestamp must be within 2 seconds of Current time on both servers.
- Disable automatic failover for the maintenance window and test acknowledge on the master, then on the standby, then trigger a forced failover and re-test.
9. WinCC Built-in Diagnostic Tools
Siemens ships several diagnostic tools that complement the PDLRTSEH.LOG. The most useful for this fault are:
| Tool | Path | Purpose |
|---|---|---|
| WinCC Diagnosis (CCDiag) | Start > Programs > Siemens > WinCC > Diagnosis |
Central diagnostic console; dumps active connections, alarm statistics, script errors |
| APDiag | Start > Programs > Siemens > WinCC > Tools > APDiag |
Traces process tag subscriptions - useful for tag-driven alarm acknowledgment |
| PDMDiag | Start > Programs > Siemens > WinCC > Tools > PDMDiag |
Process Data Manager tracing for the alarm archive |
| SQL Enterprise Manager / Management Studio | Microsoft SQL Server | Inspect the CC_AlgSp_<lang>_<NR> tables for orphaned alarm rows |
| Windows Event Viewer | eventvwr.msc |
Application log entries for WinCC Runtime and CCAlarm
|
9.1 APDiag Trace Procedure
- Start
APDiag.exewith administrative credentials. - Click Trace > Start and select the Alarm and Tag categories.
- Reproduce the acknowledge event.
- Stop the trace and export to
*.csvfor analysis. - Look for an alarm that changes state from
came intowent outwithout the interveningacknowledgedstate - this indicates the message-frame dropped the acknowledgment.
10. Verification Procedure
After every fix, run the following verification sequence on each affected server before returning it to production.
- Activate the runtime in configuration mode.
- Inject 100 simulated alarms of varying priority and class over 10 minutes.
- Perform Acknowledge all on each alarm table 10 times.
- Confirm
PDLRTSEH.LOGtimestamp is unchanged. - Confirm the runtime has not exited (Task Manager > WinCC Explorer Process stable).
- Deactivate the runtime, reactivate, and confirm the alarm tables load data within 5 seconds.
- Repeat the sequence on the redundant partner and trigger one forced failover.
11. Preventive Maintenance Schedule
To prevent recurrence in long-running plants, integrate the following items into the regular maintenance plan.
| Frequency | Action |
|---|---|
| Monthly | Compile all C functions in Global Script |
| Monthly | Verify WinCC Service Pack and Hotfix level on all servers in the redundancy pair |
| Quarterly | Audit embedded ActiveX controls in alarm pictures |
| Quarterly | Rotate PDLRTSEH.LOG and WinCC_Sys_*.log to a network share |
| Annually | Recreate the WinCC project from the .MCP backup to validate backup integrity |
| On any hotfix | Re-run the full verification procedure in Section 10 |
12. Escalation Path
If all four solutions above fail to eliminate the exception, escalate to Siemens Industry Online Support with the following package:
- Full WinCC version string (registry key above).
- The complete
PDLRTSEH.LOGfile. - Last 24 hours of
WinCC_Sys_*.log. - APDiag trace from the failure event.
- The compressed project file (
*.zipwith the.MCPand theGraCS,Library,PASfolders). - Screenshot of the Status of Server Connections dialog at the time of the failure.
Reference the original Siemens support entry 22892165 - How to use WinCC diagnostic tools when opening the request, and quote the ExceptionCode and FaultingAddress from the PDLRTSEH.LOG in the subject line to route the case to the runtime team.
13. Frequently Asked Questions
What does the PDLRTSEH.LOG file contain and where is it stored?
It is the structured exception log written by the WinCC Graphics Runtime (PDLRT.dll) when an unhandled exception is caught. The default path is C:\Program Files\Siemens\WinCC\Diagnose\PDLRTSEH.LOG. Each entry records the timestamp, computer name, user, process and thread ID, exception code (e.g. 0xC0000005), faulting module and offset. WinCC truncates the file when the runtime restarts, so copy it out before restarting.
Does the error only affect WinCC V7.0 SP1?
No. The same exception family appears on V7.0 SP2 and early V7.0 SP3 when the multi-control acknowledge race condition is triggered. It is fully resolved by V7.0 SP3 HF8 and later. Projects on the new WinCC Unified runtime (TIA Portal V13+) do not produce PDLRTSEH because they use a different graphics engine.
How do I compile all C functions in one step?
Open WinCC Explorer > Global Script > C-Editor, then select Tools > Compile All Functions. The status bar at the bottom shows 0 errors, 0 warnings on success. Follow with Tools > Generate Header to refresh the compiled header files. The runtime must be deactivated during this step or the write will be blocked silently.
Can external ActiveX controls coexist with the Alarm Table Control?
Yes, as long as they are placed in a separate picture that is opened on demand. Embedding a non-Siemens OCX in the same base picture as three or more Alarm Table Controls is the most common trigger of the PDLRTSEH exception. The recommended pattern is a popup picture opened with OpenPicture("name.pdl").
Why does the alarm subsystem fail to load after a warm restart of WinCC?
The unhandled exception corrupts the message-archive memory pool that the alarm display subscribes to. The CCAlarm service enters a faulted state and refuses new subscriptions until its internal queues are reset, which only happens on a process restart. A full PC restart reloads the service from clean memory, which is why the operator station appears to recover.