Skip to content

Tag.Abort is throwing an exception #440

@VitorKawao

Description

@VitorKawao

Hello,

I am using libplctag at version 1.6.0-alpha.3 and libplctag.NativeImport at version 2.0.0.0-alpha.5

If I stop my thread that was reading, it throws an exception at Tag.Abort

CoreCLR Version: 6.0.3624.51421
.NET Version: 6.0.36
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AggregateException: One or more errors occurred. (Cannot access a disposed object.
Object name: 'libplctag.Tag'.)
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'libplctag.Tag'.
at libplctag.Tag.ThrowIfAlreadyDisposed() in //src/libplctag/Tag.cs:line 1085
at libplctag.Tag.Abort() in /
/src/libplctag/Tag.cs:line 657
at libplctag.Tag.<>c__DisplayClass134_0.b__0() in /_/src/libplctag/Tag.cs:line 817
at System.Threading.CancellationToken.<>c.b__12_0(Object obj)
at System.Threading.CancellationTokenSource.Invoke(Delegate d, Object state, CancellationTokenSource source)
at System.Threading.CancellationTokenSource.CallbackNode.<>c.b__9_0(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback()
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
--- End of inner exception stack trace ---
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
at System.Threading.CancellationTokenSource.NotifyCancellation(Boolean throwOnFirstException)
at System.Threading.CancellationTokenSource.TimerCallback(Object state)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()

My logs
log.txt

Thank you,
Vítor Guedes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions