The object at dereference depth 1 is being used before it was constructed/allocated

In reply to tinkumistry:

You do not set no_of_agnt in your AHB_env where you are creating the config object,