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

Re: [reSIProcate-users] DialogSet NULL pointer

Hi Francesco,

I didn't look too closely at the patch yet, but yes, creating a git pull request is the best way to get the patch reviewed.


On Fri, Aug 4, 2017 at 12:37 PM, Francesco Lamonica <alienpenguin@xxxxxxxxx> wrote:
Hello Scott,
thanks after some hours of digging in the code i found what you mentioned... there were two threads going on, one where the onTerminated was handled and the one where the processEvents takes place.

thanks for you support.

P.S. does the small patch to removeSupportedMethod makes sense? should i make a git pull request?

On Fri, Aug 4, 2017 at 4:06 PM, Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:
Sounds like you might be calling end() from a thread that is not the DUM processing thread.


On Thu, Aug 3, 2017 at 2:36 PM, Francesco Lamonica <alienpenguin@xxxxxxxxx> wrote:
Hi all,
i program i wrote using resiprocate crashed with the following stack trace:

#0 resip::Dialog::end (this=0x0) at Dialog.cxx:350
0000001 0x00007ffff198dfac in resip::DialogSet::end (this=0x7fffa8312030) at DialogSet.cxx:1027
0000002 0x00007ffff56958d4 in ReSipHandler::sendBye (this=0x7fffa82864a0, linePtr=0x7fffa82851b0) at src/ReSipHandler.cpp:639
0000003 0x00007ffff5611aad in MyApp::abortCall (this=0x7fffd8043410, lid=0) at src/MyApp.cpp:6702

As you can see there is a NULL pointer (Dialog) that is called from the line 1027 of DialogSet:

1021       case Established:
1022       {  
1023          for (DialogMap::iterator it = mDialogs.begin(); it != mDialogs.end(); ++it)
1024          {  
1025             try
1026             {  
1027                it->second->end();
1028             }
1029             catch(UsageUseException& e)
1030             {  
1031                InfoLog (<< "Caught: " << e);
1032             }
1033          }            
1034          mState = Terminating;
1035          break;
1036       }

So it seems that it->second is NULL.
the caller is a class (ResipCallData) that i wrote inheriting from AppDialogSet as (hopefully) per the examples in the documentation and that was used to create the InviteSession.

the crash happened while trying to end the call like this (SendBye):

    ResipCallData *h = linePtr->getSipSession();

    if (!h) {
        qCritical() << "Could not find the handle for the call";
        *logger << UNQL::LOG_CRITICAL << "Cannot find the handle for the call to terminate on line "
                << linePtr->getLineId() << UNQL::EOM;
        return SipStackError;

    AppDialogSetHandle adsh = h->getHandle();
    if (!adsh.isValid())
        qCritical() << Q_FUNC_INFO << "Invalid ADSH!";

    h->end(); // <-- This is where the crash happened.

From what i gathered the session was getting closed from the remote party as well when this happened.

Do you have any insight of what i might be checking?

thanks in advance

resiprocate-users mailing list
List Archive: http://list.resiprocate.org/archive/resiprocate-users/