Usefulness of "Initialize/Finalize (mis)balance" messages
Tools have some logic to keep track of the balance of initialize/finalize and creation/destruction. When there's a segfault, one gets a lot of messages due to that (after the stack trace).
...
GaudiTool WARNING Initialize/Finalize (mis)balance 'VertexBaseFromRecVertexClonerWithTracks/CopyLinePersistenceLocations.TurboPPRecVertexCloner' Counts = 1
GaudiTool WARNING Initialize/Finalize (mis)balance 'VertexCloner/CopyLinePersistenceLocations.VertexCloner' Counts = 1
GaudiTool WARNING Create/Destroy (mis)balance 'CaloClusterCloner/CopyLinePersistenceLocations.CaloClusterCloner' Counts = 1
GaudiTool WARNING Create/Destroy (mis)balance 'CaloClusterCloner/CopyLinePersistenceLocations.TurboPPCaloClusterCloner' Counts = 1
...
Similarly, we get them when an exception is thrown somewhere and initialization fails:
HLTControlFlowMgr FATAL in sysInitialize(): exception with tag=resolveDependencies is caught
HLTControlFlowMgr ERROR resolveDependencies Dependency circle in control flow, review your configuration StatusCode=FAILURE
ServiceManager ERROR Unable to initialize Service: HLTControlFlowMgr
ApplicationMgr ERROR Application Manager Terminated with error code 1
GaudiTool WARNING Initialize/Finalize (mis)balance 'CaloClusterCloner/CopyLinePersistenceLocations.CaloClusterCloner' Counts = 1
GaudiTool WARNING Initialize/Finalize (mis)balance 'CaloClusterCloner/CopyLinePersistenceLocations.TurboPPCaloClusterCloner' Counts = 1
...
In both cases, these messages are just noise that makes us scroll up to find the real issue. Are there cases when they are genuinely useful? Or can we just remove them and the logic?
Edited by Rosen Matev