Skip to content

BaseObjectState.RemoveChild() is broken #3257

@Siyuan-Xu-Wapice

Description

@Siyuan-Xu-Wapice

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

TLDR;
In Reference Console Server, it seems the API BaseObjectState.RemoveChild() won't remove it's child. Therefore, neither RemoveChild nor ServerInternal.DiagnosticManager.DeleteNode(calls instance.Parent.RemoveChild) would remove the desired node. Tried with another experimental server using latest Nuget 1.5.377.21, the same issue exists. The Nuget 1.5.375.433 still works, but not sure which release actually breaks it.

Longer version
I wanted to remove the optional component RedundantServerArray from well-known node ServerRedundancy. And I discovered that ServerRedundancyState.RemoveChild(serverRedundancy.RedundantServerArray) is broken. The internal field m_child of the ServerRedundancyState was null. The GetChildren() method actually didn't use m_child at all. Then, I experimented the ServerObjectState as well, however, the same issue. It seems all BaseObjectState is broken in Reference server. I have the latest Master from 11.October.2025 (commit 4c651d0).

ServerRedundancyState .RemoveChild()
Image
ServerRedundancyState.GetChildren()
Image

ServerObjectState.RemoveChild()
Image

ServerObjectState.GetChildren()
Image

Expected Behavior

The RemoveChild and DiagnosticsNodeManger.DeleteNode should work.

Steps To Reproduce

No response

Environment

- OS: Windows 11
- Environment: Visual Studio 2022 17.14.16
- Runtime: .NET 8 LTS
- Nuget Version:
- Component:
- Server: Console Reference Server
- Client:

Anything else?

Tried with

Metadata

Metadata

Assignees

Labels

bugA bug was identified and should be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions