< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] redelete in TransactionState.cxx ?


resiprocate-devel,hi!
        I encountered a redelete problem during running test program testClient.
The scenario is :
     When you are going to send an ACK request and there is a transport error,
there is a possibility of redelete the TransactionState object.
In function TransactionState::processStateless(TransactionMessage* message):
......
   else if (isTransportError(message))
   {
      processTransportFailure();

      delete message;
      delete this;
   }
......
In function TransactionState::processTransportFailure():
......

         case DnsResult::Finished:
            processNoDnsResults();
......
In function TransactionState::processNoDnsResults():
......
   terminateClientTransaction(mId);
   delete this;
......

        If the stack is:
    TransactionState::processStateless --> 
TransactionState::processTransportFailure() -->
    TransactionState::processTransportFailure()
        then the delete for same object will be called twice.

        And i really encountered this problem, I run testClient in a board with 
IP 192.168.10.94
with arguments <<testClient LOG_STACK 
"sip:wosai@xxxxxxxxxxxxxx;transport=udp">>, the target
machine is configured with two interfaces, and i don't know why, returned a 
contact with
another interface 192.168.101.111, then after redelete the same object, the 
testClient program
terminated with an error:
C++ runtime abort: a pure virtual function was called

        How to modify?
        Thanks.         

        sincerely,
                                

        zuobf
        zuobf@xxxxxxxxxxxxxxx
          2005-04-13