Hello GeHar nad mgericke,
I have a similar problem. I haven’t solved it yet. Can you look at this post.(Seg. fault when reinitialize geometry with UI commands) No one has replied yet. Maybe you help me.
when I reinitialize the geometry I delete all solids and logics. but not the sensitive detectors. I am not sure, but I think the error comes from a dangling sensitive detector object in memory as you indicate.
Your solution is good but ı have to deregister many solids, which is created in a loop. Maybe there is another solution…