Skip to content

Fails to compile in TwinCat 4026 due to NullReferenceException #10

@djonas171

Description

@djonas171

When used in the newest TwinCat version 4026 i compiler change have made the library unable to compile.
I have isolated the issue, it seems to originate from Matrix Accessors:
GetTransposeMatrixAccessor
GetSubMatrixAccessor
GetShrunkMatrixAccessor
It seems that it fails due to the methods returning a FB which have been initialized with "THIS^".

I have contacted Beckhoff, as it is unknown if this due to an error in 4026 or the new compiler behavior is correct. I will follow up, with their respone when possible.

Error Internal error:System.NullReferenceException: Object reference not set to an instance of an object.
at _3S.CoDeSys.Compiler35200.ImplicitCode.InterfaceHierarchy.AddInterfaceHierarchy(IInterfaceHierarchy ih, Int32 nIdBaseToLookup)
at _3S.CoDeSys.Compiler35200.ImplicitCode.InterfaceHierarchy.Initialize(IScope5 scope, _ISignature sign, Int32& Index)
at _3S.CoDeSys.Compiler35200.ImplicitCode.InterfaceSignatureGenerator.AddInterfaceHierarchy(_ISignature sign, IScope5 gscope)
at _3S.CoDeSys.Compiler35200.ImplicitCode.InterfaceSignatureGenerator.AddInterfaceSignaturesAfterTypify(_ICompileContext comconNew, _ICompileContext comconRef)
at _3S.CoDeSys.Compiler35200.CompilerPhases.CompilerPhase2_AfterTypification.DoAfterTypificationActions(Boolean bErrorsOccured)
at _3S.CoDeSys.Compiler35200.CompilerPhases.CompilerPhase1_Typifier.TypifyAll()
at _3S.CoDeSys.Compiler35200.CompilerPhases.CompilerPhaseControllerCompile.Compile(Boolean bDoTypification, Boolean bCallWaitForDownloadInfoSavingCallback, Boolean bCheckAll)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions