Skip to content

[BUG] TcoRemoteTask.ExecuteAsync() cause Stack Overflow through endless re-entry via ADS #63

Description

@RGrabichler

Using TcOpen 0.12.0-alpha.111, repeated or overlapping calls to
TcoRemoteTask.ExecuteAsync() can cause synchronous re-entry through an ADS
UpdateRead callback.

Two process dumps show the same endlessly repeating stack:

TcoRemoteTask.ExecuteAsync
TcoRemoteTask.ExecuteAsync.MoveNext
Vortex.Connector.ValueTypes.OnlinerBaseType.UpdateRead
ADS value update
TcoRemoteTask.ExecuteAsync

This occurs mainly during startup or rapid PLC mode/state changes and eventually
terminates the process with a stack overflow.

Expected behavior: executions should be serialized or coalesced so that an
in-progress remote task cannot synchronously re-enter itself. The execution gate
must also be released safely after success, cancellation, or exception.

I tried to patch this locally, but iam unable to open the TcOpen project via VisualStuido 2019 and my Twincat.
After too much time and tries i gave it up.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions