< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index |
Matthias Moetje
TERASENS
GmbH Augustenstraße 24 80333 Munich GERMANY |
|
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Alexander Altshuler
Sent: Wednesday, June 21, 2006 8:20 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [reSIProcate] Weird problem with MutexIt works. VS 7.1
-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Matthias Moetje - TERASENS GmbH
Sent: Wednesday, June 21, 2006 4:51 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [reSIProcate] Weird problem with Mutex
Could perhaps anyone using Visual Studio 8.0 (or maybe 7.1) be so kind
to paste these few lines of code into basicRegister to see if this problem
can be reproduced if compiled in release config?
Thanks,
Matthias
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Matthias Moetje - TERASENS GmbH
Sent: Friday, June 16, 2006 11:22 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] Weird problem with MutexHi,
I was finally able to find a minimal piece of code to reproduce
an issue I am fighting against during the last days. To reproduce
you just need to paste the following code to the start of the
main() function in basicRegister for example:
#include "resip/dum/UserAuthInfo.hxx"
resip::SipStack* mStack;
resip::DialogUsageManager* mDum;mStack = new resip::SipStack();
mDum = new resip::DialogUsageManager(*mStack);mDum->addTransport(UDP,5060);
mDum->addTransport(TCP,5060);UserAuthInfo* msg = new UserAuthInfo("asd","asd","asd","asd");
mDum->post(msg);
Now, the following happens during mDum->post:
in TransactionUser::post(Message* msg), mFifo.add is called.
then in TimeLimitFifo<Msg>::add it constructs the lock object:
Lock::Lock(Lockable & lockable, LockType lockType)
in this constructor, I get an access violation when it tries to
call myLockable.lock();When I examine the myLockable I can see that the virtual function
pointers seem corrupted:
Usually (that means, when post is called from the dum or stack
thread in my application) in the vfptr[] array I can see valid pointers,
but in this case they are wrong.The mID (Windows Critical Section structure) member of the
Mutex (which inherits from Lockable) seems to remain OK,
just the vfptr to the base methods is wrong.I don't really have an idea why this is happening and I feel like
banging my head gainst the wall. In my application everything works
fine. If I put a breakpoint in one of these functions during normal
operation (inbound, outbound calls, client registration etc.), the
lockable is always OK, but as soon as I call mDum->post
manually, the lockable seems to be damaged and I get an access
violation exception.If I compile the application in debug mode, the problem does not exist!
I am using VS 2005. Here are the relevant configuration settings I
am using for basicRegister:Optimization: Disabled
Inline Function Expansion: Default
Favor Size or Speed: Neither
Omit Frame Pointers: No
Enable String Pooling: No
Runtime Library: Multi-threaded DLL
Buffer security check: YesLinker:
Generate Debug Info: Yes
References: Default
Enable COMDAT Folding: Default
Link time Code Generation: Use Link Time CGI would be very thankful for any comments as I am running out of
ideas on this subject (apart from implementing a simple critical
section directly without the lockable and mutex objects).Thanks and best regards,
Matthias Moetje
TERASENS GmbH
Augustenstraße 24
80333 Munich
GERMANY
Phone:
Fax:
e-mail:
Web:
+49.89.143370-0
+49.89.143370-22
info@xxxxxxxxxxxx
www.terasens.com