Project

General

Profile

Bug #1366

Updated by Alex Afanasyev about 10 years ago

If multiple interest filters are set for a same face then calling ``shutdown()`` shutdown() on face may cause a segmentation fault.  

 To reproduce the error set another test filter in producer.cpp as shown below: 

     face_.setInterestFilter("/localhop/testApp", 
                             bind(&Producer::onInterest, 
                                 func_lib::bind(&Producer::onInterest, this, _1, _2), 
                             bind(&Producer::onRegisterFailed, 
                                 func_lib::bind(&Producer::onRegisterFailed, this, _1, _2)); 

 Then put ``face_.shutdown()`` in onInterest case as well to force the shutdown. Otherwise wait for the ``onRegisterFailed`` to be called.  

 Buiild it and run it again: 

     ~$ ./waf && ./build/examples/producer 

     ERROR: Failed to register prefix in local hub's daemon (Unauthorized command) 

      Segmentation fault: 11 (core dumped) 

 The output from the lldb is attached. 



Back