COMOS P&ID Pipe Disappearance After Crash: Root Cause & Recovery

David Krause10 min read
Other TopicSiemensTroubleshooting
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

Engineers using COMOS for P&ID and plant documentation have reported a critical document corruption pattern: after an unexpected COMOS freeze or application crash, reopening the affected project causes pipe sections, pipe segments, valves, pumps, T-pieces and other routed equipment to vanish from the report document. The underlying database records (docObj) survive the crash, but their connector geometry is replaced by an empty placeholder connection that has no pointer to a device or cdevice in the database. The graphical result looks like an instrument line, but the engineering object behind the line no longer exists in the report.

Severity: Major. Loss of device-level references breaks bill-of-material reports, signal lists, line lists and isometric generation. Recovery requires re-establishing the report document evaluation chain, not redrawing the P&ID.

Symptom Manifestation

The failure presents in a consistent way across affected sites:

  1. COMOS freezes or terminates unexpectedly during editing of a P&ID report document.
  2. On the next open of the project, no error dialog appears for the document; the drawing opens normally.
  3. One or more pipe sections, pipe segments, valves, pumps, fittings or T-pieces are missing from the drawing view.
  4. Underlying docObj records are still present in the COMOS database and the connectors of neighboring pipes still terminate at the correct coordinates.
  5. The connector geometry is now drawn as a standard connection with no object reference - visually identical to an instrument air or signal line.
  6. Report document item queries return an empty placeholder instead of the device pointer; cdevice cross-references are null.

Affected COMOS Versions

Reported Version Status Notes
COMOS 10.1.2 Reproduced Multiple sites reported identical symptom prior to escalation
COMOS 10.1.3.2.3 Reproduced Same disappearance pattern after ungraceful process exit
COMOS 10.2.3 Status unclear at time of original report Vendor had not confirmed fix; reproduce before assuming resolved
The fix status of COMOS 10.2.3 was not confirmed in the original vendor escalation. Always verify against the latest Siemens Industrial Online Support hotfix list before assuming a service pack resolves the issue.

Document Object Model: docObj, cdevice and Connector Geometry

Understanding the COMOS report document model is essential for diagnosing this class of corruption. The relevant object types are:

Object Role Where it lives
docObj Persistent representation of an engineering object (pipe, valve, pump, instrument) inside a report document COMOS database tab Documents
cdevice Cross-reference from the report docObj back to the engineering master data (catalog, specification, manufacturer) COMOS database tab Engineering
Connector Geometric endpoint stored on the docObj used by the P&ID router to attach pipes and signal lines Embedded in the report document XML
Standard connection Generic line object used when no device is referenced - typically for instrument signal lines Report document XML

The healthy state links the geometry, the report docObj, and the cdevice master data in a chain. After the corruption, only the geometry and an empty container remain; the link to master data is severed. The relationship can be represented as:

Healthy state Corrupted state docObj cdevice Connector geom present resolved attached docObj cdevice missing pointer link broken: connector renders as standard line

Root Cause Analysis

The original vendor analysis and the field evidence converge on a small set of plausible failure mechanisms. Treat them as a triage checklist rather than a confirmed root cause until GTAC returns a defect ID.

Symbol Script Encoding Errors

One of the earliest diagnostic leads is the symbol script attached to the affected object. COMOS evaluates VBScript-like routines on the symbol when the report document is opened and the geometry is reconstructed. If the script contains a non-ASCII character - the original report specifically calls out the € (euro sign, U+20AC) - the script interpreter can throw mid-evaluation, leaving the geometry partially committed to the report document XML while the docObj reference is rolled back. A typical offending line looks like:

AttributeValue = "Component costs 1250 € per unit" ' U+20AC triggers evaluator abort

The fix at the symbol level is to replace the literal with an ASCII-safe representation or build the character with ChrW(8364) if the COMOS script host supports it.

Audit every symbol script used by missing objects for non-ASCII characters (€ £ ¢ © ® ° ² ³ µ Ω). Replace with ASCII equivalents or wrap with ChrW() calls if the COMOS script host requires the literal at runtime.

Subsymbol and Standard Table Failures

If the symbol preview renders correctly but the runtime fails, the script embedded in a subsymbol or in a standard table entry is the more likely culprit. Symbol composition in COMOS allows a parent symbol to call child symbols whose scripts execute in the same evaluation context; a single throwing subscript aborts the whole object reconstruction even when the parent script is clean. Open the parent symbol, expand every subsymbol reference, and validate each script in isolation.

Document Evaluation Pipeline Aborts

COMOS rebuilds the report document view by re-evaluating the stored XML against the current database state. If the evaluation process is killed (process kill, OS reboot, power loss, antivirus quarantine) while the evaluation transaction is mid-commit, the next open may load the half-committed document and silently strip device references that were not yet written to disk. This explains why the same failure appears on multiple objects in the same report: they share one evaluation transaction.

Recovery Procedure: Document Evaluation Tool

The most reliable recovery path documented in the field is to force a fresh document evaluation using the built-in Document Evaluation Tool. The tool re-reads the docObj records from the database and rebuilds the connector geometry and the cdevice pointers in the report document.

  1. Open the affected COMOS project and navigate to the affected P&ID report document. Do not attempt to redraw - leave the missing objects as they are.
  2. Open the Documents menu and locate the Document Evaluation Tool. On most COMOS 10.x installations it appears under Documents → Evaluation or as a right-click action on a document query result.
  3. Launch the evaluation against the single affected document first to validate the fix on a small scope before running project-wide.
  4. Review the evaluation log. Look for symbol script errors, missing catalog references, or cdevice resolution failures - these must be fixed in the master data or the symbol before re-evaluating.
  5. If the single-document evaluation restores the missing objects, repeat on each affected report. Capture a baseline screenshot before evaluation so any remaining gaps are visible.
  6. If the tool reports the document as already up-to-date and nothing is restored, manually clear the cached evaluation marker for the document and retry.
Run a full database backup immediately before invoking the Document Evaluation Tool project-wide. The tool writes back to the report document XML and the database in the same transaction, but a backup provides a clean rollback point if a different corruption is uncovered during evaluation.

Manual Verification

After recovery, confirm the document is consistent at three levels.

Geometric Verification

Open the report document. The missing pipe sections, segments, valves, pumps and T-pieces should reappear at their original coordinates. Cross-check by comparing with the last good plot PDF or the project history. Pay particular attention to T-pieces - their three-port geometry is the first to expose incomplete connector rebuilds.

Database Verification

Run a report document item query on the restored objects. Each object should now report a populated device and cdevice pointer. An empty box with no pointer - the symptom that initially confirmed the corruption - must no longer be present. Use the following query filter as a regression check:

SELECT docObj WHERE cdevice IS NULL OR cdevice = ''

A non-zero result set after recovery indicates that the Document Evaluation Tool did not fully commit and the run must be repeated.

Engineering Verification

Run the bill-of-material, line list and signal list reports. Counts and references must match the pre-crash state. A missing cdevice cross-reference typically cascades into zero-quantity BOM lines, which is a fast regression check across thousands of objects.

Troubleshooting Matrix

Symptom Likely Cause Action
Symbol preview shows the object but report document does not Subsymbol or standard table script error Open the parent symbol, expand subsymbols, validate scripts in isolation
Both preview and runtime missing Symbol script encoding error (e.g. €) Strip non-ASCII characters; replace with ASCII or ChrW() equivalents
docObj present, connector empty, replaced by standard connection Document evaluation transaction was aborted Run Document Evaluation Tool on the affected document
Document Evaluation Tool reports "up to date" but objects are still missing Cached evaluation marker is stale Clear evaluation cache; retry
Recovery succeeds for one document but fails on another Per-document symbol or catalog corruption Investigate each failing document individually before project-wide run
Same corruption appears on multiple documents after a single crash Project-wide evaluation state was interrupted Schedule a maintenance window; run project-wide evaluation from a clean client
Empty box with no device pointer returns from report document item query cdevice cross-reference stripped Re-run Document Evaluation Tool; verify cdevice resolution in evaluation log
Error window displayed during open but symbol script is clean Subsymbol or imported catalog script Check every imported reference; validate standard table entries

Prevention and Best Practices

  • Audit symbol scripts for non-ASCII characters before deployment. Use a project-wide search across the symbol directory for characters outside the ASCII printable range; replace or wrap in ChrW() where required.
  • Enforce an explicit save discipline. Force a manual save and document evaluation at the end of every editing session, rather than relying on autosave during long sessions.
  • Snapshot the project before and after major edits. COMOS project snapshots combined with database backups give a defensible rollback point.
  • Run COMOS on stable hardware. Memory pressure, antivirus scanning and forced reboot patterns are all known triggers for evaluation-transaction aborts.
  • Centralize symbol and standard table maintenance. A single source of truth for subsymbols and standard tables makes corruption root-cause analysis tractable across multiple affected sites.
  • Track COMOS service pack notes. Subscribe to Siemens Industrial Online Support notifications for COMOS to catch hotfixes that address document evaluation defects.

Escalation Path to GTAC

Open a Global Technical Access Center (GTAC) request through the Siemens support portal as soon as the pattern is confirmed. To make the request actionable, include:

  • Exact COMOS build number, including service pack and hotfix level.
  • Project database type and size.
  • Minimum reproducible sequence leading to the crash (drawing type, last action before freeze).
  • Pre-crash screenshot and post-crash screenshot of the affected report document.
  • Output of a report document item query showing the empty box without device/cdevice pointer.
  • Symbol script source for every object that failed to reconstruct, including any subsymbols.
  • Evaluation log from the Document Evaluation Tool run, even if the run completed without errors.

Reference the original defect as a "major" severity item. The corruption is data-destructive at the report document layer and is reproducible across multiple sites on multiple versions, which materially shortens triage time.

Known Limitations

Two constraints are visible from the original field report and remain valid guidance:

  • Even when the symbol preview renders correctly, runtime symbol evaluation can still fail. Preview uses a different evaluator than the report document loader.
  • The Document Evaluation Tool may report a document as already up-to-date when the underlying report XML is in fact stale. Always cross-check with a report document item query before accepting the result.

FAQ

Why do pipe segments disappear from a COMOS P&ID after a crash?

The crash can interrupt the document evaluation transaction mid-commit, leaving the geometry and the docObj shell in the report document but stripping the connector references back to the master data. The result is an empty placeholder line with no cdevice pointer, which the renderer draws as a generic standard connection.

Which COMOS versions are affected?

Reproductions have been reported on COMOS 10.1.2 and COMOS 10.1.3.2.3. COMOS 10.2.3 was raised as a possible resolution candidate at the time of the original report but the fix status was not vendor-confirmed; verify against the latest Siemens support hotfix list before relying on any specific build.

How do I recover the missing objects?

Use the Document Evaluation Tool from the Documents menu or from a document query. Run it on a single affected document first to validate, then extend to the rest of the project. Always take a database backup before a project-wide evaluation run.

Does a clean symbol preview mean the symbol script is fine?

No. The preview uses a separate evaluator from the report document loader. A symbol that previews correctly can still fail at report open if a subsymbol or standard table entry contains an encoding error or a runtime exception. Expand the full symbol tree before assuming the script is clean.

What should I include in a GTAC ticket for this defect?

Include the COMOS build number, the database type and size, the minimum reproducible sequence, before/after screenshots, the report document item query output showing the empty pointer, the full symbol script source (parent plus subsymbols), and the Document Evaluation Tool log.

Back to blog