==15119== Thread 3:                                                             
==15119== Invalid read of size 8                                                
==15119==    at 0x52CCC3F: Wt::WModelIndex::parent() const (WModelIndex.C:38)   
==15119==    by 0x52CCCE7: Wt::WModelIndex::depth() const (WModelIndex.C:52)    
==15119==    by 0x52CCF84: Wt::WModelIndex::operator<(Wt::WModelIndex const&) const (WModelIndex.C:86)                                                          
==15119==    by 0x5346CE0: std::_Rb_tree<Wt::WModelIndex, std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*>, std::_Select1st<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> >, std::less<Wt::WModelIndex>, std::allocator<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> > >::erase(Wt::WModelIndex const&) (stl_function.h:230)                                                                 
==15119==    by 0x532E886: Wt::WTreeView::removeRenderedNode(Wt::WTreeViewNode*) (stl_map.h:538)                                                                
==15119==    by 0x5330EFD: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:239)
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x531BAF6: Wt::WTableCell::~WTableCell() (WTableCell:38)        
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x5330F05: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:240)
==15119==    by 0x5272DAE: Wt::WContainerWidget::clear() (WContainerWidget.C:215)                                                                               
==15119==    by 0x533A1FF: Wt::WTreeView::rerenderTree() (WTreeView.C:1852)     
==15119==  Address 0x95e7590 is 0 bytes inside a block of size 648 free'd       
==15119==    at 0x4C23EAD: operator delete(void*) (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)                                                    
==15119==    by 0x41CF01: Gui::updateTree() (Gui.cpp:57)                        
==15119==    by 0x41CF32: Gui::processUpdateEvent() (Gui.cpp:49)                
==15119==    by 0x41EB6F: boost::_mfi::mf0<void, Gui>::operator()(Gui*) const (mem_fn_template.hpp:49)                                                          
==15119==    by 0x41ECB2: void boost::_bi::list1<boost::_bi::value<Gui*> >::operator()<boost::_mfi::mf0<void, Gui>, boost::_bi::list6<Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&> >(boost::_bi::type<void>, boost::_mfi::mf0<void, Gui>&, boost::_bi::list6<Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&>&, int) (bind.hpp:232)   
==15119==    by 0x41ED31: void boost::_bi::bind_t<void, boost::_mfi::mf0<void, Gui>, boost::_bi::list1<boost::_bi::value<Gui*> > >::operator()<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>(Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&) (bind_template.hpp:203)                                                                        
==15119==    by 0x41ED7B: boost::detail::function::void_function_obj_invoker6<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Gui>, boost::_bi::list1<boost::_bi::value<Gui*> > >, void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::invoke(boost::detail::function::function_buffer&, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass) (function_template.hpp:144)                                                             
==15119==    by 0x4204DC: boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::operator()(Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass) const (function_template.hpp:815)                                                                      
==15119==    by 0x42053E: boost::signals::detail::unusable boost::signals::detail::call_bound6<void>::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >::operator()<boost::signals::detail::connection_slot_pair>(boost::signals::detail::connection_slot_pair const&) const (signal_template.hpp:119)                                                
==15119==    by 0x42058C: boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6<void>::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>::dereference() const (slot_call_iterator.hpp:61)  
==15119==    by 0x4205C4: _ZN5boost20iterator_core_access11dereferenceINS_7signals6detail18slot_call_iteratorINS3_11call_bound6IvE6callerIN2Wt7NoClassES9_S9_S9_S9_S9_NS_9function6IvS9_S9_S9_S9_S9_S9_EEEENS3_23named_slot_map_iteratorEEEEENT_9referenceERKSF_ (iterator_facade.hpp:517)                                      
==15119==    by 0x4205E4: boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6<void>::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>::operator*() const (iterator_facade.hpp:635)                           
==15119==                                                                       
==15119== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- c             
==15119==                                                                       
==15119== Jump to the invalid address stated on the next line                   
==15119==    at 0x0: ???                                                        
==15119==    by 0x52CCC44: Wt::WModelIndex::parent() const (WModelIndex.C:38)   
==15119==    by 0x52CCCE7: Wt::WModelIndex::depth() const (WModelIndex.C:52)    
==15119==    by 0x52CCF84: Wt::WModelIndex::operator<(Wt::WModelIndex const&) const (WModelIndex.C:86)                                                          
==15119==    by 0x5346CE0: std::_Rb_tree<Wt::WModelIndex, std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*>, std::_Select1st<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> >, std::less<Wt::WModelIndex>, std::allocator<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> > >::erase(Wt::WModelIndex const&) (stl_function.h:230)                                                                 
==15119==    by 0x532E886: Wt::WTreeView::removeRenderedNode(Wt::WTreeViewNode*) (stl_map.h:538)                                                                
==15119==    by 0x5330EFD: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:239)
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x531BAF6: Wt::WTableCell::~WTableCell() (WTableCell:38)        
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x5330F05: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:240)
==15119==    by 0x5272DAE: Wt::WContainerWidget::clear() (WContainerWidget.C:215)                                                                               
==15119==  Address 0x0 is not stack'd, malloc'd or (recently) free'd            
==15119==                                                                       
==15119== Process terminating with default action of signal 11 (SIGSEGV)        
==15119==  Bad permissions for mapped region at address 0x0                     
==15119==    at 0x0: ???                                                        
==15119==    by 0x52CCC44: Wt::WModelIndex::parent() const (WModelIndex.C:38)   
==15119==    by 0x52CCCE7: Wt::WModelIndex::depth() const (WModelIndex.C:52)    
==15119==    by 0x52CCF84: Wt::WModelIndex::operator<(Wt::WModelIndex const&) const (WModelIndex.C:86)                                                          
==15119==    by 0x5346CE0: std::_Rb_tree<Wt::WModelIndex, std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*>, std::_Select1st<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> >, std::less<Wt::WModelIndex>, std::allocator<std::pair<Wt::WModelIndex const, Wt::WTreeViewNode*> > >::erase(Wt::WModelIndex const&) (stl_function.h:230)                                                                 
==15119==    by 0x532E886: Wt::WTreeView::removeRenderedNode(Wt::WTreeViewNode*) (stl_map.h:538)                                                                
==15119==    by 0x5330EFD: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:239)
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x531BAF6: Wt::WTableCell::~WTableCell() (WTableCell:38)        
==15119==    by 0x53672DA: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:193)     
==15119==    by 0x5330F05: Wt::WTreeViewNode::~WTreeViewNode() (WTreeView.C:240)
==15119==    by 0x5272DAE: Wt::WContainerWidget::clear() (WContainerWidget.C:215)                                                                               
127.0.0.1 - - [2009-Jul-15 13:57:57.144722] "POST /?wtd=xewg2MHI4H77nBvr&rand=92601 HTTP/1.1" 200 0                                                             
==15119==                                                                       
==15119== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 5 from 1)        
==15119== malloc/free: in use at exit: 382,396 bytes in 3,664 blocks.           
==15119== malloc/free: 9,145 allocs, 5,481 frees, 1,510,700 bytes allocated.    
==15119== For counts of detected errors, rerun with: -v                         
==15119== searching for pointers to 3,664 not-freed blocks.                     
==15119== checked 84,580,376 bytes.                                             
==15119==                                                                       
==15119== Thread 1:                                                             
==15119==                                                                       
==15119== 2,880 bytes in 10 blocks are possibly lost in loss record 210 of 224  
==15119==    at 0x4C23484: calloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)                                                                    
==15119==    by 0x4010B0E: _dl_allocate_tls (in /lib64/ld-2.9.so)               
==15119==    by 0x7AF974A: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.9.so)                                                                            
==15119==    by 0x617CA36: boost::thread::start_thread() (in /usr/lib64/libboost_thread.so.1.36.0)                                                              
==15119==    by 0x4EDFE44: boost::thread::thread<boost::_bi::bind_t<void, boost::_mfi::mf0<void, http::server::Server>, boost::_bi::list1<boost::_bi::value<http::server::Server*> > > >(boost::_bi::bind_t<void, boost::_mfi::mf0<void, http::server::Server>, boost::_bi::list1<boost::_bi::value<http::server::Server*> > >, boost::disable_if<boost::is_convertible<boost::_bi::bind_t<void, boost::_mfi::mf0<void, http::server::Server>, boost::_bi::list1<boost::_bi::value<http::server::Server*> > >&, boost::detail::thread_move_t<boost::_bi::bind_t<void, boost::_mfi::mf0<void, http::server::Server>, boost::_bi::list1<boost::_bi::value<http::server::Server*> > > > >, boost::thread::dummy*>::type) (thread.hpp:188)          
==15119==    by 0x4EDE843: Wt::WServer::start() (WServer.C:176)                 
==15119==    by 0x4EDF5E7: Wt::WRun(int, char**, Wt::WApplication* (*)(Wt::WEnvironment const&)) (WServer.C:309)                                                
==15119==    by 0x419779: main (Test.cpp:28)                                    
==15119==                                                                       
==15119==                                                                       
==15119== 39,422 bytes in 517 blocks are possibly lost in loss record 221 of 224
==15119==    at 0x4C2506C: operator new(unsigned long) (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)                                               
==15119==    by 0x57437D0: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.10)          
==15119==    by 0x57441A4: (within /usr/lib64/libstdc++.so.6.0.10)              
==15119==    by 0x57442E2: std::string::string(char const*, std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.10)                                    
==15119==    by 0x6FD50DF: (within /usr/lib64/libboost_program_options.so.1.36.0)                                                                               
==15119==    by 0x6FDCAF5: (within /usr/lib64/libboost_program_options.so.1.36.0)
==15119==    by 0x6FBC742: (within /usr/lib64/libboost_program_options.so.1.36.0)
==15119==    by 0x7FF00030F: ???
==15119==    by 0x400D8D7: (within /lib64/ld-2.9.so)
==15119==    by 0x400DA06: (within /lib64/ld-2.9.so)
==15119==    by 0x4000B39: (within /lib64/ld-2.9.so)
==15119==    by 0x7: ???
==15119==
==15119== LEAK SUMMARY:
==15119==    definitely lost: 0 bytes in 0 blocks.
==15119==      possibly lost: 42,302 bytes in 527 blocks.
==15119==    still reachable: 340,094 bytes in 3,137 blocks.
==15119==         suppressed: 0 bytes in 0 blocks.
==15119== Reachable blocks (those to which a pointer was found) are not shown.
==15119== To see them, rerun with: --leak-check=full --show-reachable=yes
./vgstart: line 11: 15119 Killed                  valgrind --leak-check=yes --db-attach=yes ./Test.wt --docroot . --http-address 0.0.0.0 --http-port 999 --no-compression