Details
Description
When Importing a GSDML file (device description file) in Communication Studio, the application may encounter a corrupted or invalid XML file. In such cases, the current behavior is:
- A generic error dialog appears stating: "An internal error occurs. The application must be closed because the data could be corrupted."
- The application crashes and closes unexpectedly.
Users interpret this message as a bug in Communication Studio rather than an indication that the GSDML source file itself is malformed or corrupted but the bebehavior has to be improved.
Root Cause
When a GSDML file contains structural issues, missing required elements, or is otherwise invalid according to the Profibus Network Organization (PNO) specification, the application fails to handle the parsing error gracefully. Instead of displaying a user‑friendly message, it throws an unhandled exception.
Expected Behavior
- If the GSDML file is corrupt or invalid, Communication Studio should display a clear, specific error message that informs the user:
- The GSDML file is corrupt or does not conform to the specification.
- The user should check the file's integrity and if necessary obtain a valid version from the device vendor.
- The application should not crash but remain open and let the user take corrective action (e.g., select a different file).