Program received signal SIGSEGV, Segmentation fault. 0x0804c250 in std::_Rb_tree, std::less, std::allocator >::_S_right (__x=0x80591) at stl_tree.h:501 501 { return static_cast<_Link_type>(__x->_M_right); } (gdb) bt #0 0x0804c250 in std::_Rb_tree, std::less, std::allocator >::_S_right (__x=0x80591) at stl_tree.h:501 #1 0x0804d685 in std::_Rb_tree, std::less, std::allocator >::_M_erase (this=0xbfa41ce4, __x=0x80591) at stl_tree.h:1264 #2 0x0804d694 in std::_Rb_tree, std::less, std::allocator >::_M_erase (this=0xbfa41ce4, __x=0x804af49) at stl_tree.h:1264 #3 0x0804d6e3 in ~_Rb_tree (this=0xbfa41ce4) at stl_tree.h:578 #4 0x0804d733 in ~set (this=0xbfa41ce4) at stl_set.h:108 #5 0x0804d8eb in ~variables_map (this=0xbfa41cc4) at variables_map.hpp:110 #6 0x0804ba41 in main (argc=-1208732280, argv=0x0) at main.cpp:57