List Info

Thread: Exception in ~PProcess() destructor (probably triggered by SIP reinvite)




Exception in ~PProcess() destructor (probably triggered by SIP reinvite)
user name
2006-08-15 14:11:39
Hi,

I get an exception when closing my application in the line
indicated
below. I believe this exception is triggered when the
application
receives a SIP reinvite since no exception occurs when there
is no
reinvite. I'm using Opal 2.2.2 and pwLib 1.10.1.

Any of you guys have a clue to what I might be doing wrong,
or if it's a
bug in the library?

Thanks,
Jaap.

---
PProcess::~PProcess()
{
  // do whatever needs to shutdown
  PreShutdown();

  Sleep(100);  // Give threads time to die a natural death

  // Get rid of the house keeper (majordomocide)
  delete houseKeeper;

  // OK, if there are any left we get really insistent...
  activeThreadMutex.Wait();
  for (PINDEX i = 0; i < activeThreads.GetSize(); i++) {
    PThread & thread = activeThreads.GetDataAt(i);
    if (this != &thread &&
!thread.IsTerminated())		// <==
!!!!! EXCEPTION !!!!!!
      TerminateThread(thread.GetHandle(), 1);  // With
extreme prejudice
  }
  activeThreadMutex.Signal();

  deleteThreadMutex.Wait();
  autoDeleteThreads.RemoveAll();
  deleteThreadMutex.Signal();

#if PMEMORY_CHECK || _DEBUG
  extern void PWaitOnExitConsoleWindow();
  PWaitOnExitConsoleWindow();
#endif
}
----
------------------------------------------------------------
------------
Check the FAQ before asking! - http://www.
openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To
unsubscribe or
change your subscription options, goto
htt
p://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------
------------
Exception in ~PProcess() destructor (probably triggered by SIP reinvite)
user name
2006-08-15 16:39:17
Hello,

More details on the exception ? 
Also, IsTerminated is OS-dependant... Which OS are you using
?

Regards,
Paul

Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator

--

Please no HTML, I'm not a browser - Pas d'HTML, je ne suis
pas un navigateur 
"Some people dream of success... while others wake up
and work hard at it" 

"I worry about my child and the Internet all the time,
even though she's too 
young to have logged on yet. Here's what I worry about. I
worry that 10 or 15 
years from now, she will come to me and say 'Daddy, where
were you when they 
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation 
  

> -----Original Message-----
> From: openh323-adminopenh323.org 
> [mailto:openh323-adminopenh323.org] On Behalf Of
Jaap van Hengstum
> Sent: Tuesday, August 15, 2006 4:12 PM
> To: openh323openh323.org
> Subject: [OpenH323]Exception in ~PProcess() destructor 
> (probably triggered by SIP reinvite)
> 
> Hi,
> 
> I get an exception when closing my application in the
line indicated
> below. I believe this exception is triggered when the
application
> receives a SIP reinvite since no exception occurs when
there is no
> reinvite. I'm using Opal 2.2.2 and pwLib 1.10.1.
> 
> Any of you guys have a clue to what I might be doing
wrong, 
> or if it's a
> bug in the library?
> 
> Thanks,
> Jaap.
> 
> ---
> PProcess::~PProcess()
> {
>   // do whatever needs to shutdown
>   PreShutdown();
> 
>   Sleep(100);  // Give threads time to die a natural
death
> 
>   // Get rid of the house keeper (majordomocide)
>   delete houseKeeper;
> 
>   // OK, if there are any left we get really
insistent...
>   activeThreadMutex.Wait();
>   for (PINDEX i = 0; i < activeThreads.GetSize();
i++) {
>     PThread & thread = activeThreads.GetDataAt(i);
>     if (this != &thread &&
!thread.IsTerminated())		// <==
> !!!!! EXCEPTION !!!!!!
>       TerminateThread(thread.GetHandle(), 1);  // With 
> extreme prejudice
>   }
>   activeThreadMutex.Signal();
> 
>   deleteThreadMutex.Wait();
>   autoDeleteThreads.RemoveAll();
>   deleteThreadMutex.Signal();
> 
> #if PMEMORY_CHECK || _DEBUG
>   extern void PWaitOnExitConsoleWindow();
>   PWaitOnExitConsoleWindow();
> #endif
> }
> ----
>
------------------------------------------------------------
--
> ----------
> Check the FAQ before asking! - 
> http://www.
openh323.org/~openh323/fom.cgi
> The OpenH323 Project mailing list, using Mailman. To
unsubscribe or
> change your subscription options, goto
> htt
p://www.openh323.org/mailman/listinfo/openh323
> Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
>
------------------------------------------------------------
--
> ----------
> 

------------------------------------------------------------
------------
Check the FAQ before asking! - http://www.
openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To
unsubscribe or
change your subscription options, goto
htt
p://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------
------------
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )