TIA Portal V16 Crash on Close: Fix Missing DLL Error

David Krause10 min read
SiemensTIA PortalTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

When TIA Portal V16 is closed on a Windows engineering station, the application throws an unhandled exception and terminates with a generic "TIA Portal has stopped working" dialog or an Event Viewer Application Error referencing a CLR / Win32 exception inside the S7O (SIMATIC OAM) common services stack. V17, V18, and V19 launched on the same workstation do not reproduce the fault. The reported fault is consistently reproducible at shutdown and frequently also surfaces during project close, library update, or after opening a multi-user session.

The root cause observed in field deployments is a missing or corrupted pair of shared managed DLLs in the Siemens common files folder:

  • S7O.CommonInterfaces.dll
  • S7O.CommonServices.dll

Expected path (Windows 64-bit):

C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\

On systems with German or non-English Windows, this is sometimes shown as C:\Programme\common files\Siemens\Automation\Simatic OAM\bin\. The location is identical; only the localized name of Program Files differs.

This symptom is specific to TIA Portal V16 (and V16 Update 1–V16 Update 7) on Windows 10 / Windows 11. Siemens bundles the OAM runtime into V17+, which is why V18/V19 do not fail on the same machine.

Affected Versions and Components

Component Version Behavior on close
TIA Portal V16 (incl. Update 1–7) 16.0.0.0 – 16.0.4.0 Crash if OAM bin folder is incomplete
TIA Portal V17 17.x Unaffected; self-contained OAM runtime
TIA Portal V18 18.x Unaffected; self-contained OAM runtime
TIA Portal V19 19.x Unaffected; self-contained OAM runtime
SIMATIC OAM Runtime (legacy) < V17 Required, shared via Common Files

Root Cause Analysis

The SIMATIC OAM (Open Automation Middleware) layer is a shared runtime used by TIA Portal V16 for inter-process communication, automation license management, project server access, and Team Engineering gateway services. On V16 the OAM binaries are installed into a system-wide folder so that add-ons (e.g., SIMATIC Energy Suite, PLCSIM V16, SinaSave, S7-PCT) can share them.

On shutdown, S7O.CommonServices.dll is responsible for tearing down the OAM session and releasing COM/CLR handles. S7O.CommonInterfaces.dll holds the interface metadata used during that teardown. If either DLL is missing, blocked by antivirus, or replaced by a zero-byte stub, the JIT-compiled cleanup path raises FileNotFoundException or SEHException and TIA Portal terminates.

Common reasons the files go missing:

  1. Antivirus / EDR quarantined the DLL after a heuristic hit (most common on Trend Micro, SentinelOne, CrowdStrike, Microsoft Defender with Controlled Folder Access enabled).
  2. Partial uninstall of a second SIMATIC product (e.g., PLCSIM V15 leftover in Add/Remove Programs) removed shared components.
  3. Disk cleanup or Storage Sense deleted the parent folder.
  4. User Account Control redirected the install path to %LocalAppData%\VirtualStore during an elevated install attempt.
  5. In-place upgrade from V15.x skipped shared-component registration.

Diagnostic Procedure

  1. Open the Windows Event Viewer (eventvwr.msc) and navigate to:
    Windows Logs → Application
  2. Filter for Source = .NET Runtime or Application Error matching the timestamp of the TIA Portal close.
  3. Look for entries referencing S7O.CommonInterfaces.dll or S7O.CommonServices.dll. Typical signatures:
    Application: TIA Portal.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException — Could not load file or assembly 'S7O.CommonServices, Version=16.0.0.0'
  4. Confirm the file system state:
    dir "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\"
  5. Verify expected contents. A healthy V16 install contains the following minimum set:
    S7O.CommonInterfaces.dll
    S7O.CommonServices.dll
    Siemens.Automation.ObjectFrame.dll
    Siemens.Automation.OamBase.dll
    Siemens.Automation.FrameApplication.dll
    libeay32.dll
    ssleay32.dll
    OamConfig.exe
    OamMonitor.exe
  6. If only S7O.*.dll are missing, proceed to the resolution section. If the entire folder is absent, jump to the Repair/Reinstall section.
  7. Capture the installed products list for context:
    reg query "HKLM\SOFTWARE\Siemens\Automation\InstalledSoftware\TIA_Portal" /s
Always run an elevated PowerShell or Command Prompt when inspecting Program Files. Read-only access without elevation produces false negatives on UAC-protected systems.

Resolution: File Replacement

This is the fastest, lowest-impact fix when only the two DLLs are absent. The DLLs must match TIA Portal V16 (file version 16.0.x.x, assembly version 16.0.0.0). DLLs from V17/V18/V19 are NOT binary-compatible and will throw FileLoadException: strong name validation failed or BadImageFormatException.

Method A — Copy from a known-good V16 install

  1. On a second workstation with a working TIA Portal V16, navigate to:
    C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\
  2. Copy S7O.CommonInterfaces.dll and S7O.CommonServices.dll to a USB drive or network share.
  3. On the affected workstation, take ownership of the target folder:
    takeown /f "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin" /r /d Y
    icacls "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin" /grant Administrators:F /t
  4. Paste the two DLLs into the folder.
  5. Re-seal the ACLs:
    icacls "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin" /reset /t
  6. Launch TIA Portal V16, open any project, close TIA Portal, and confirm no error appears.

Method B — Siemens Support Request

  1. Open a support case at the Siemens Industry Online Support portal:
    support.industry.siemens.com
  2. Select Product = SIMATIC TIA Portal, Version = V16, and Topic = Installation / Licensing.
  3. Attach the Event Viewer export and the directory listing of the OAM bin folder.
  4. Request the hotfix package "S7O CommonServices - V16 Build 16.0.x.x". Siemens Support typically delivers a 7z archive within 2 business days.
  5. Extract and copy the DLLs as in Method A.

Method C — Re-extract from the TIA Portal V16 installer

If a peer install is not available and Support is slow, extract the binaries directly from the original installation media (DVD ISO / TIA_Portal_V16.iso). This works because the installer ships the OAM files in a compressed cabinet.

  1. Mount or extract the V16 ISO to a folder, e.g. D:\TIA_V16.
  2. Open D:\TIA_V16\Setup\Support\OAMRuntime or browse the .cab archives:
  3. Use expand to pull the DLLs:
    expand D:\TIA_V16\Support\Disk1.cab -F:S7O.CommonServices.dll C:\Temp\
    expand D:\TIA_V16\Support\Disk1.cab -F:S7O.CommonInterfaces.dll C:\Temp\
  4. Copy the extracted DLLs into the OAM bin folder.

Resolution: Repair/Reinstall the OAM Runtime

Use this path when the entire Simatic OAM\bin folder is missing, the folder is empty, or the close crash persists after file replacement.

  1. Close all SIMATIC applications, including PLCSIM, Automation License Manager, and TIA Portal.
  2. Stop the Siemens OAM Service:
    net stop "Siemens OAM Service"
  3. Open Control Panel → Programs and Features.
  4. Locate SIMATIC OAM Runtime V16 (or TIA Portal V16). Select it and click Repair. If Repair is grayed out, click Change and choose Repair inside the installer wizard.
  5. Reboot the engineering station when prompted.
  6. If Repair is not offered, uninstall SIMATIC OAM Runtime V16, reboot, then re-install the OAM runtime by re-running the TIA Portal V16 setup and selecting only the OAM Runtime optional package.

Resolution: Antivirus / EDR Exclusion

If the DLLs reappear after every reboot, an endpoint protection product is quarantining them. Confirmed offender signatures include:

Product Quarantine path Detection name
Microsoft Defender for Endpoint C:\ProgramData\Microsoft\Windows Defender\Quarantine\ Trojan:Win32/Wacatac or Behavior:Win32/Inception
CrowdStrike Falcon Falcon Quarantine (cloud) Suspicious .NET loader
Trend Micro Apex One C:\Quarantine\ TrojanSpy.Win32.SIMATIC
SentinelOne Singularity Quarantine Malicious DLL Behavior
Symantec Endpoint Protection C:\ProgramData\Symantec\Quarantine\ SONAR.Heuristic

Add the following exclusions to the policy and restore the files from quarantine:

C:\Program Files\Common Files\Siemens\
C:\Program Files\Siemens\Automation\
C:\Program Files (x86)\Siemens\Automation\
C:\ProgramData\Siemens\

After exclusions are pushed, re-copy the DLLs and re-launch TIA Portal V16.

Resolution: Windows Component Store Repair

If V17/V18/V19 also start failing after the DLL copy, the system-wide Common Files store is broken. Repair the shared folder:

  1. Open an elevated CMD.
  2. Re-register the COM components used by OAM:
    cd /d "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin"
    for %i in (*.dll) do regsvr32 /s %i
  3. If a registration error appears, run a Windows component store repair:
    DISM /Online /Cleanup-Image /RestoreHealth
    sfc /scannow
  4. Reboot and re-test.

Multi-Version Coexistence Check

Running V16 alongside V18/V19 is supported but requires careful ordering. The OAM folder for V16 must remain untouched by the V18/V19 installer. Verify the coexistence state:

where.exe "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\S7O.CommonServices.dll"
# Confirm the file version is 16.0.x.x, not 17/18/19
# Right-click → Properties → Details → File version

If V18 has overwritten the DLLs (file version 18.x), downgrade by re-running the V16 installer Repair action, or by copying the V16 DLLs from a clean V16 station.

Logging and Telemetry

Enable detailed TIA Portal logging before reproducing the close error so Siemens Support has actionable artifacts:

  1. Edit C:\Program Files\Siemens\Automation\Portal V16\Bin\TIA Portal.exe.config.
  2. Add or set the following keys:
    <add key="LogLevel" value="Trace" />
    <add key="LogFilePath" value="C:\Temp\TIAPortal.log" />
  3. Reproduce the close. Collect:
    %LOCALAPPDATA%\Siemens\Automation\Portal V16\Logs\
    %LOCALAPPDATA%\Siemens\Automation\Portal V16\CrashDumps\
    C:\Temp\TIAPortal.log
  4. Zip and attach to the support case.

Preventive Measures

  • Deploy the Siemens recommended antivirus exclusions via Group Policy or Intune before installing TIA Portal on a managed endpoint. Reference: Siemens KB 109750185 - Antivirus exclusions for SIMATIC software.
  • Avoid in-place upgrades from V15 to V16. Use the official uninstall + clean install procedure described in TIA Portal V16 installation manual.
  • Do not run disk cleanup utilities (e.g., CCleaner) on workstations hosting TIA Portal without first whitelisting C:\Program Files\Common Files\Siemens\.
  • Take a system image immediately after a successful TIA Portal V16 install so that any future DLL loss can be recovered in minutes.
  • Periodically audit the OAM folder with a small PowerShell watchdog:
$files = @(
 "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\S7O.CommonInterfaces.dll",
 "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\S7O.CommonServices.dll"
)
foreach ($f in $files) {
 if (-not (Test-Path $f)) {
 Write-Warning "Missing: $f"
 }
}

When to Open a Siemens Support Case

Escalate to Siemens Industry Online Support if any of the following are true after applying the steps above:

  • TIA Portal V16 still throws a close-time exception with Event Viewer pointing to a DLL other than S7O.*.
  • Event Viewer shows SID 5 (Access Denied) when the OAM service tries to load the DLLs.
  • The DLLs reappear after every repair, indicating a Windows Installer reference-counter corruption (ProductCode mismatch).
  • Multiple engineering workstations fail in the same pattern within a short window, suggesting a managed Group Policy or EDR push is the culprit.

Use the Siemens support portal: https://support.industry.siemens.com. Have the following ready: workstation hardware ID, Windows build number, installed SIMATIC product list, and a 7zip of the Event Viewer Application log filtered to the last 24 hours.

Troubleshooting Matrix

Symptom Most likely cause Fix
Crash only on TIA Portal close Missing S7O.Common*.dll Replace DLLs (Method A/B/C)
Crash on close AND on project open OAM service not running or corrupted Repair OAM runtime
DLLs disappear after reboot AV/EDR quarantine Add exclusions and restore from quarantine
V18/V19 also start failing after copy Wrong file version copied Verify 16.0.x.x version, redo with V16 source
Folder does not exist at all Partial uninstall Repair TIA Portal V16 install
Crash on close in VM but not on host Hyper-V / VMware folder redirection Disable folder redirection in RDP/VM settings
Crash only when closing multi-user session TIA Portal Multiuser Server misconfigured Re-register Multiuser Server, restart OAM

Verification Steps

  1. Confirm both DLLs are present and sized above 50 KB:
    dir "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\S7O.*.dll"
  2. Right-click each DLL → Properties → Digital Signatures. The signer must be Siemens AG; an unsigned or foreign signature indicates a corrupted file.
  3. Launch TIA Portal V16, open a sample project, then choose File → Close and File → Exit. No dialog should appear.
  4. Check Event Viewer Application log for new error entries. None should be generated.
  5. Run the TIA Portal V16 installation check from the Start menu: TIA Portal V16 → Installation Check. All checks should report green.

Process Flow: From Crash to Recovery

TIA Portal V16 crash on close Inspect OAM\bin folder Both S7O DLLs missing Folder missing entirely Copy DLLs (Method A/B/C) Repair OAM Runtime Re-launch and verify

Frequently Asked Questions

Why does only TIA Portal V16 crash on close while V18 and V19 work?

V17 and later ship a self-contained SIMATIC OAM runtime inside the TIA Portal installation folder. V16 still relies on the legacy shared folder C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\. If that shared folder is incomplete, only V16 fails.

Can I copy the S7O DLLs from a V18 install to fix V16?

No. The V18 DLLs are assembly version 18.0.0.0 and are strong-named against the V18 OAM runtime. Loading them in V16 produces FileLoadException and a different crash signature. Always source the DLLs from a V16 (file version 16.0.x.x) workstation.

Where do I find the original DLLs if I do not have a second V16 station?

Extract them from the TIA Portal V16 installation media using expand D:\TIA_V16\Support\Disk1.cab -F:S7O.*.dll C:\Temp\, or open a support request at support.industry.siemens.com and ask for the V16 OAM hotfix package.

How do I confirm the DLLs are digitally signed by Siemens?

Right-click each DLL → Properties → Digital Signatures. The signer must read "Siemens AG". If the tab is missing, the file is corrupted and must be replaced.

Will antivirus keep deleting the DLLs after I copy them?

Yes, unless you push the official Siemens antivirus exclusions (C:\Program Files\Common Files\Siemens\ and C:\Program Files\Siemens\Automation\) via Group Policy, Intune, or the EDR console. Reference Siemens KB 109750185 for the full list.

Is there a script I can run to monitor the OAM folder continuously?

Yes. A PowerShell watchdog that calls Test-Path against the two DLLs and logs to the Windows Event Log can be scheduled every 60 minutes via Task Scheduler. See the preventive-measures section above for the snippet.

Back to blog