Hi,
I tried it with both ptlib version 2.12.8 and 2.12.9

and what about this statement line number 6763.
  if (roundTripDelayTimer > 0 && !roundTripDelayTimer.IsRunning()) {


roundTripDelayTimer  is not initialized any where else in h323.cxx, it also a protected member of H323Connection, so guessing is not set anywhere else.


On Mon, May 5, 2014 at 4:34 PM, Simon Horne <s.horne@spranto.com> wrote:

What  version of PTLIB are you using?

 

I checked in a fix to the CVS to call SetInterval() instead of casting.

 

Simon

 

From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Ankur Deep Jaiswal
Sent: 05 May 2014 20:08
To: h323plus@lists.packetizer.com
Subject: Re: [h323plus] Null pointer reference

 

Hi,

 

I was able to solve that issue by type casting 'roundTripDelayRate' to int64_t  at h323.cxx:6764 . PInt64 supports type casting.

 

i have a serious doubt about the code though , 

 

in this code starting at line 6758

 

void H323Connection::MonitorCallStatus()

{

  if (!Lock())

    return;

 

  if (roundTripDelayTimer > 0 && !roundTripDelayTimer.IsRunning()) {

    roundTripDelayTimer = roundTripDelayRate;

    StartRoundTripDelay();

  }

 

 

the 'roundTripDelayTimer' is never initialized any where in the code. it is also a protected member of the class,as such the condition in the if block may never be entered.

 

 

so going by previous definiton at v1.26.3

 

where the code is

void H323Connection::MonitorCallStatus()

{

  if (!Lock())

    return;

 

  if (endpoint.GetRoundTripDelayRate() > 0 && !roundTripDelayTimer.IsRunning()) {

    roundTripDelayTimer = endpoint.GetRoundTripDelayRate();

    StartRoundTripDelay();

  }

 

 

shouldn't the code be like this .

 

void H323Connection::MonitorCallStatus()

{

  if (!Lock())

    return;

 

  if (roundTripDelayRate > 0 && !roundTripDelayTimer.IsRunning()) {

    roundTripDelayTimer = ((int64_t)roundTripDelayRate);

    StartRoundTripDelay();

  }

 

 

 

 

On Mon, May 5, 2014 at 2:42 PM, Ankur Deep Jaiswal <ankur@techgentsia.com> wrote:

Hi,

This is the complete compile trace . i dont get this with v1.26.3

 

[CC] h323.cxx

h323.cxx: In member function ‘void H323Connection::MonitorCallStatus()’:

h323.cxx:6764:25: error: ambiguous overload for ‘operator=’ (operand types are ‘PTimer’ and ‘PInt64 {aka long long int}’)

     roundTripDelayTimer = roundTripDelayRate;

                         ^

h323.cxx:6764:25: note: candidates are:

In file included from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib.h:66:0,

                 from h323.cxx:30:

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:228:14: note: PTimer& PTimer::operator=(const PTimer&)

     PTimer & operator=(

              ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:48:11: note: PTimer& PTimer::operator=(int16_t)

     cls & operator=( int16_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:49:11: note: PTimer& PTimer::operator=(uint16_t)

     cls & operator=(uint16_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:50:11: note: PTimer& PTimer::operator=(int32_t)

     cls & operator=( int32_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:51:11: note: PTimer& PTimer::operator=(uint32_t)

     cls & operator=(uint32_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.3/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:52:11: note: PTimer& PTimer::operator=(int64_t)

     cls & operator=( int64_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:53:11: note: PTimer& PTimer::operator=(uint64_t)

     cls & operator=(uint64_t rhs)              { this->SetInterval(rhs); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:54:11: note: PTimer& PTimer::operator=(const PTimeInterval&)

     cls & operator=(const PTimeInterval & rhs) { this->SetInterval(rhs.GetMilliSeconds()); return *this; } \

           ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/timer.h:232:5: note: in expansion of macro ‘PTIMER_OPERATORS’

     PTIMER_OPERATORS(PTimer);

     ^

In file included from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/pnat.h:43:0,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/ptlib_extras.h:51,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/h235auth.h:51,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/h323con.h:46,

                 from h323.cxx:37:

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/pnat.h: At global scope:

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PNatMethod_STUN_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/pnat.h:627:1: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

 PPLUGIN_STATIC_LOAD(STUN, PNatMethod);

 ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_H235Authenticator_MD5_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h235auth.h:399:3: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

   PPLUGIN_STATIC_LOAD(MD5,H235Authenticator);

   ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_H235Authenticator_CAT_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h235auth.h:451:3: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

   PPLUGIN_STATIC_LOAD(CAT,H235Authenticator);

   ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PVideoInputDevice_FakeVideo_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/videoio.h:1195:1: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

 PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice);

 ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PVideoInputDevice_FFMPEG_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/videoio.h:1203:3: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

   PPLUGIN_STATIC_LOAD(FFMPEG, PVideoInputDevice);

   ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PVideoInputDevice_YUVFile_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/videoio.h:1208:3: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

   PPLUGIN_STATIC_LOAD(YUVFile, PVideoInputDevice);

   ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PVideoOutputDevice_NULLOutput_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/videoio.h:1240:1: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

 PPLUGIN_STATIC_LOAD(NULLOutput, PVideoOutputDevice);

 ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_H224_Handler_H281_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h224/h281handler.h:244:8: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

        PPLUGIN_STATIC_LOAD(H281, H224_Handler);

        ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_H460_Feature_Std18_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h460/h460_std18.h:101:5: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

     PPLUGIN_STATIC_LOAD(Std18, H460_Feature);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_H460_Feature_Std19_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h460/h460_std18.h:166:5: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

     PPLUGIN_STATIC_LOAD(Std19, H460_Feature);

     ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/plugin.h:199:13: warning: ‘PPlugin_PNatMethod_H46019_loader’ defined but not used [-Wunused-variable]

   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();

             ^

/home/ankur/h323plustest1.26.x/h323plus/include/h460/h46018_h225.h:439:8: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’

        PPLUGIN_STATIC_LOAD(H46019,PNatMethod);

        ^

In file included from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/pprocess.h:44:0,

                 from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/icmpsock.h:41,

                 from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/sockets.h:69,

                 from /home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/pnat.h:41,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/ptlib_extras.h:51,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/h235auth.h:51,

                 from /home/ankur/h323plustest1.26.x/h323plus/include/h323con.h:46,

                 from h323.cxx:37:

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/pluginmgr.h:175:15: warning: ‘PFactoryLoader::PluginLoaderStartup_loader’ defined but not used [-Wunused-variable]

 PFACTORY_LOAD(PluginLoaderStartup);

               ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/pfactory.h:500:15: note: in definition of macro ‘PFACTORY_LOAD’

     int const ConcreteType##_loader = ConcreteType##_link(); \

               ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/url.h:550:17: warning: ‘PFactoryLoader::PURL_HttpLoader_loader’ defined but not used [-Wunused-variable]

   PFACTORY_LOAD(PURL_HttpLoader);

                 ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/pfactory.h:500:15: note: in definition of macro ‘PFACTORY_LOAD’

     int const ConcreteType##_loader = ConcreteType##_link(); \

               ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptclib/url.h:553:17: warning: ‘PFactoryLoader::PURL_FtpLoader_loader’ defined but not used [-Wunused-variable]

   PFACTORY_LOAD(PURL_FtpLoader);

                 ^

/home/ankur/h323plustest1.26.x/ptlibbuild/include/ptlib/pfactory.h:500:15: note: in definition of macro ‘PFACTORY_LOAD’

     int const ConcreteType##_loader = ConcreteType##_link(); \

 

On Mon, May 5, 2014 at 2:26 PM, Jan Willamowius <jan@willamowius.de> wrote:

Hi,

I'm still using PTLib 2.10.x. I'm pretty sure the CVS compiles with
that.

Regards,
Jan


Ankur Deep Jaiswal wrote:
> Hi,
> I am unable to build the new cvs (v.1.26.3 builds fine). i have tried ptlib
> 2.12.8 and 2.12.9
>
> while building i get this error
>
> [CC] h323.cxx
> h323.cxx: In member function ‘void H323Connection::MonitorCallStatus()’:
> h323.cxx:6764:25: error: ambiguous overload for ‘operator=’ (operand types
> are ‘PTimer’ and ‘PInt64 {aka long long int}’)
>      roundTripDelayTimer = roundTripDelayRate;
>
> help appreciated
>
> On Fri, May 2, 2014 at 11:30 PM, Jan Willamowius <jan@willamowius.de> wrote:
>
> > Hi Ankur,
> >
> > thanks for the bug report.
> >
> > I've replaces the Assert with a null pointer check to avoid the crash.
> > Please try the CVS.
> >
> > Regards,
> > Jan
> >
> > --
> > Jan Willamowius, Founder of the GNU Gatekeeper Project
> > EMail  : jan@willamowius.de
> > Website: http://www.gnugk.org
> > Support: http://www.willamowius.com/gnugk-support.html
> >
> > Relaxed Communications GmbH
> > Frahmredder 91
> > 22393 Hamburg
> > Geschäftsführer: Jan Willamowius
> > HRB 125261 (Amtsgericht Hamburg)
> > USt-IdNr: DE286003584
> >
> > Ankur Deep Jaiswal wrote:
> > > Hi,
> > > I am using H323plus v 1.26.3.
> > > With the External rtp example, I am getting a 'Assertion fail: Null
> > pointer
> > > reference, file channels.cxx, line 629, Error=22'
> > > while trying to open a channel with capability G.711-ALaw-64k.
> > > it happens at H323_ExternalRTPChannel::OnSendingPDU at line number 1329.
> > >
> > > Help appreciated
> > > --
> > > Ankur Deep Jaiswal
> >
> >
> >
>
>
> --
> Ankur Deep Jaiswal

--
Jan Willamowius, jan@willamowius.de, http://www.gnugk.org/



 

--
Ankur Deep Jaiswal



 

--
Ankur Deep Jaiswal




--
Ankur Deep Jaiswal