Please create a simple working example, that shows the issue, not just a stub.
From what I see, the issue most likely occurs because of incorrect referencing/dereferncing of pointers, probably caused by a lack of basic programming knowledge.
Be aware, that this forum/website, does not teach programming and is not meant to find programming errors (if they are not inside C::B's own code).
Such questions violate our forum rules, and every user has accepted these rules with registering here.
So your topic might get locked !