Obsidean_VM/01-Documentation/SIEMENS & WINCC/TIA Portal/TIA Portal crash when compi...

5.6 KiB

TIA Portal crash when compiling the PLC - ID: 109971630 - Industry Support Siemens

TIA Portal is crashing since the last Microsoft updates were installed.

**Symptom
**

The TIA Portal crashes when compiling the PLC. Actions with implicit compile are also affected such as Download, Start Simulation, Multiuser Check-in. You will receive the error message shown in Figure 1.

!Pasted image 20250109131145.png Fig.1

Click on "Show data" to open the TIA Portal Diagnostics Report (also known as the "Crash Report"). There you can see the exception shown in Figure 2: “System.Security.Cryptography.CryptographicException:
Unknown error -1073741816.

!Pasted image 20250109131200.png Fig. 2

The crash can occur with the following TIA Portal versions:

  • V16: Without update and Update 1 to 6
  • V17: Without update and Update 1 to 7
  • V18: Without update and Update 1 to 3
  • V19: Without update and Update 1 to 2

The crash occurs for the first time after installing Microsoft .NET Framework updates from May 2024 on, e.g.:

  • KB5037926 for Windows 10 version 1607
  • KB5037768 for Windows 10 version 21H2
  • KB5037592 for Windows 10 version 22H2
  • KB5038285 for Windows 10 version 22H2
  • KB5037587 for Windows 10 version 22H2
  • KB5037591 for Windows 11 version 22H2, 23H2

Note
The crash does not occur with the above versions if you are using TIA Portal Cloud.

Cause

Initial investigations have shown that there is a connection with a configured OPC UA Server interface (OPC UA Client interface is not affected). If no OPC UA Server interface is configured in the project, the crash does not occur.

Solution

Until recently, SIEMENS provided affected customers with a patch for the respective TIA Portal versions, as the correction was not yet included in all updates. The patch could be requested from Technical Support, which is no longer necessary as the patch is now included in all affected TIA Portal versions.

The updates are available for the following TIA Portal versions, in which the changes of the patch are already integrated.

Workarounds

In the meantime, we recommend one of the following workarounds:

Workaround A) Deleting the OPC UA server interface
First copy the OPC UA server interface from the project navigation to the Master copies in the project library using drag & drop (see Fig. 3). Then delete the interface from the project. From now on the compilation of software and hardware should then be successful. Once a fix for this issue is available, the server interface can be removed from the master copies without loss of data.


Fig. 3

Note: The OPC UA server interfaces can also be exported using an XML file, but then note the following:

  • Export of the server interface via XML


    Fig. 4

  • The server interface is imported via the Companion specification


    Fig. 5

  • Before importing, the XML file must be edited to rename the default namespace http://www.siemens.com/simatic-s7-opcua, as it already exists and would otherwise prevent the import (in Figure 6 we have added the number 7 as an example).


    Fig. 6

Workaround B) 

Check the Windows updates if one of the above-mentioned KBs is installed on your computer (see Fig. 4).


Fig. 7

Uninstall the corresponding Windows package and restart Windows. You can then use the TIA Portal to compile software and hardware again without a crash.

Security information: Updates can include important security fixes. Not installing or uninstalling updates can leave your system exposed to these threats. If you can not uninstall Microsoft KBs, we recommend workaround C).

**Workaround C)
**Use TIA Portal in a virtual machine in a secure environment without these Windows KBs until the final solution (next TIA Portal update) is available.

**Note
**The crash can also occur with TIA Portal V15.1 and previous versions which are not maintained by Siemens anymore. These older software versions may contain defects and vulnerabilities. In such cases, we recommend upgrading to the latest TIA Portal Version.

**Change history of this FAQ
**

The link to download Update 3 for TIA Portal V19 has been added. Text for patch request via support request crossed out.