Oh dear, how tricky is the Gtkmm RefPtr.
Sure, the concept of ref counting is simple. But the fact that you have to use make_refptr_for_instance for your custom classes and no staight forward way of converting instace to RefPtr wrapping it lures you into traps. RefPtr constructor happily taking a pointer is one such trap.
Spent nearly 4 hours chasing a weird crash because of this.