mz-automation / libiec61850

Official repository for libIEC61850, the open-source library for the IEC 61850 protocols
http://libiec61850.com/libiec61850
GNU General Public License v3.0
858 stars 460 forks source link

Process terminated. A callback was made on a garbage collected delegate of type 'iec61850dotnet!IEC61850.Client.ControlObject+InternalCommandTerminationHandler::Invoke' #459

Closed epasinetti closed 1 year ago

epasinetti commented 1 year ago

I have a problem using in my C# application this code, after calling few times, I obtain a bad error, I have tried to Dispose control object after using it but the error is still present.

    if (control.SelectWithValue(bStatus))
    {
        if (!control.Operate(bStatus))
            Console.WriteLine("operate failed!");
        else
            Console.WriteLine("operated successfully!");
    }
    else
        Console.WriteLine("Select failed!");
    break;

Process terminated. A callback was made on a garbage collected delegate of type 'iec61850dotnet!IEC61850.Client.ControlObject+InternalCommandTerminationHandler::Invoke'.

image

mzillgith commented 1 year ago

What version (git commit) of the library are you using?

epasinetti commented 1 year ago

commit version 1.5

mzillgith commented 1 year ago

If you mean release version 1.5 then that's quite old.

Can you try to upgrade to the head of the v1.5 branch? (https://github.com/mz-automation/libiec61850/commit/30fec0a79faea49190ef2c78e0dce340c92ef44f)

epasinetti commented 1 year ago

sorry but I've tried 1.5.2 and also 1.6 develop but the problem still exist

image