Skip to content

NullReferenceException on every project with TIA Portal V16 #8

Description

@kuczek42

TiaCommander cannot perform any project operation on TIA Portal V16. session open, create, connect, and get_project all fail with a NullReferenceException.
The Openness layer itself works fine, the project file is physically created on disk and opens in the TIA Portal GUI, and Openness correctly rejects a second open with "Another project is already open." The exception is thrown afterwards, inside TiaCommander's own code, so the project is never registered and every downstream tool (list_devices, blocks_read, etc.) is blocked.
Install, license activation, MCP connection (16 tools), the Openness permission dialog, and attach all work. get_state shows TIA_CONNECTED_NO_PROJECT / connected (V16.0.0.0) and get_system_info shows TIA Portal: 16.0.0.0.
Reproduced identically on v2.30.3 (latest) and v2.26.1 (oldest downloadable portable), so it is not a recent regression — every downloadable release is affected. (v2.25.x and v2.14.1 have no downloadable assets.) A brand-new empty project (session create) fails too, so it is not project-specific.
Stack traces:
v2.30.3:
NullReferenceException
at A.AA(Object , A )
at TiaCommander.SiemensTools.OpenOrEnsure(JsonElement arguments)
(also CreateProject / GetCurrentProject / ConnectToRunningTia)
v2.26.1:
NullReferenceException
at A.A(Object , A )
at TiaCommander.SiemensTools.OpenOrEnsure(JsonElement arguments)
Note: the failing create ran ~30–35 s (it launched TIA and wrote the .ap16) before throwing — so the null is in the post-operation mapping, not the Openness call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions