You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NodeState.RemoveReference now removes the first reference that happens to have the requested TargetId, which will often be incorrect. This was changed in #2345, but the fix does not make sense to me.
Expected Behavior
RemoveReference is a public method that is stated to remove the reference defined by (referenceTypeId, isInverse, targetId), which it currently does not do. It also incorrectly reports which reference it did remove.
Steps To Reproduce
myState.AddReference(ReferenceTypeIds.Organizes, false, nodeId);
myState.AddReference(ReferenceTypeIds.GeneratesEvent, false, nodeId);
myState.RemoveReference(ReferenceTypeIds.GeneratesEvent, false, nodeId);
// Throws an exception, due to a conflict.
myState.AddReference(ReferenceTypeIds.GeneratesEvent, false, nodeId);
Environment
- OS: Linux, Fedora
- Environment: CLI
- Runtime: .NET 8
- Nuget Version: 6.8.0.32767
- Component: Opc.Ua.Core
- Server: My own server, but this should be reproducible in the reference server
- Client: None
Anything else?
No response
The text was updated successfully, but these errors were encountered:
This fixes my issue, but it still seems like weird behavior for RemoveReference to do this. It is very unintuitive that it can in some cases remove a different reference from the one you asked to remove, but I don't quite know what #2343 actually is.
I think your opinion is correct. I double checked and it looks like the error happens in another layer. Once verified, we go back to the original code in NodeState. Thanks for checking!
Type of issue
Current Behavior
NodeState.RemoveReference
now removes the first reference that happens to have the requestedTargetId
, which will often be incorrect. This was changed in #2345, but the fix does not make sense to me.Expected Behavior
RemoveReference
is a public method that is stated to remove the reference defined by(referenceTypeId, isInverse, targetId)
, which it currently does not do. It also incorrectly reports which reference it did remove.Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: