[reSIProcate] Datatype Misalignment exception in resiprocate.lib on a PocketPC device

Ram mail2kvl at gmail.com
Mon Nov 26 10:22:57 CST 2007


The call trace for the incoming call:

    dummy.exe!operator new(unsigned int count = *541438728*) Line: 12, 
Byte Offsets: 0x14    C++
     
dummy.exe!std::_Allocate<std::_List_nod<resip::Data,std::allocator<resip::Data> 
 >::_Node>(unsigned int _Count = 1, 
std::_List_nod<resip::Data,std::allocator<resip::Data> >::_Node* 
__formal = 0x00000000) Line: 44, Byte Offsets: 0x70    C++
     
dummy.exe!std::allocator<std::_List_nod<resip::Data,std::allocator<resip::Data> 
 >::_Node>::allocate(unsigned int _Count = 1) Line: 152, Byte Offsets: 
0x1c    C++
     dummy.exe!std::list<resip::Data,std::allocator<resip::Data> 
 >::_Buynode(void) Line: 1136, Byte Offsets: 0x24    C++
     dummy.exe!std::list<resip::Data,std::allocator<resip::Data> 
 >::list<resip::Data,std::allocator<resip::Data> >(void) Line: 430, Byte 
Offsets: 0x40    C++
     dummy.exe!resip::SdpContents::Session::Medium::Medium(void) Line: 
1224, Byte Offsets: 0x6c    C++
     dummy.exe!resip::SdpContents::Session::parse(resip::ParseBuffer& pb 
= {...}) Line: 1056, Byte Offsets: 0x5d8    C++
     dummy.exe!resip::SdpContents::parse(resip::ParseBuffer& pb = {...}) 
Line: 212, Byte Offsets: 0x1c    C++
     dummy.exe!resip::LazyParser::checkParsed(void) Line: 98, Byte 
Offsets: 0xac    C++
     dummy.exe!resip::SdpContents::session(void) Line: 519, Byte 
Offsets: 0x18    C++
     
dummy.exe!AggregatedSessionHandler::onOffer(resip::Handle<resip::InviteSession> 
is = {...}, resip::SipMessage& msg = {...}, resip::SdpContents& sdp = 
{...}) Line: 975, Byte Offsets: 0x84    C++
     
dummy.exe!resip::ServerInviteSession::dispatchStart(resip::SipMessage& 
msg = {...}) Line: 724, Byte Offsets: 0x244    C++
     dummy.exe!resip::ServerInviteSession::dispatch(resip::SipMessage& 
msg = {...}) Line: 615, Byte Offsets: 0xb8    C++
     dummy.exe!resip::Dialog::dispatch(resip::SipMessage& msg = {...}) 
Line: 362, Byte Offsets: 0x2e8    C++
     dummy.exe!resip::DialogSet::dispatch(resip::SipMessage& msg = 
{...}) Line: 826, Byte Offsets: 0x1c68    C++
     
dummy.exe!resip::DialogUsageManager::processRequest(resip::SipMessage& 
request = {...}) Line: 1722, Byte Offsets: 0xb88    C++
     
dummy.exe!resip::DialogUsageManager::incomingProcess(std::auto_ptr<resip::Message>* 
msg = 0x205c2f4c) Line: 1316, Byte Offsets: 0x9d4    C++
     
dummy.exe!resip::DialogUsageManager::internalProcess(std::auto_ptr<resip::Message>* 
msg = 0x205c2fe0) Line: 1164, Byte Offsets: 0x3ac    C++
     dummy.exe!resip::DialogUsageManager::process(void) Line: 1341, Byte 
Offsets: 0xa0    C++
     dummy.exe!main(void) Line: 1122, Byte Offsets: 0x3d74    C++

On receiving the incoming call, memory allocation for SDP Medium is 
coming out as *541438728* bytes, which is causing Datatype misalignment 
exception on malloc. For an outgoing call, this count is less than 200 
bytes.
As we can see from the trace, the path is through the onOffer callback 
(on parsing the SDP Body), I tried a Hold-In on a connected Outgoing 
call to reach onOffer which went through fine.
So the problem is only coming on receiving a new SDP Body for the 
incoming call.

I am using resiprocate v1.1.
Please let me know if you want any specific detail.

-RamaRao


Byron Campen wrote:
>     Then I am not sure. The guy never told us what he did to fix it. 
> We thought that maybe there was a compatibility problem stemming from 
> dynamic_cast. Where is this error happening in the code?
>
> Best regards,
> Byron Campen
>
>
>>
>> I am using Visual studio 2005. This fix doesnt help me.
>>
>> -RamaRao
>>
>> Byron Campen wrote:
>>>     Maybe this might be of interest?
>>>
>>> http://www.microsoft.com/downloads/details.aspx?FamilyID=a22ef691-f4f1-4d95-b1f7-8fb283e274d7&displaylang=en 
>>>
>>>
>>> Best regards,
>>> Byron Campen
>>>
>>>> Hi,
>>>>
>>>> I am porting the resip stack to Windows Mobile 6. During an incoming
>>>> call I am getting the "Datatype Misalignment exception". But there is
>>>> no problem for outgoing calls. The same problem is reported on this
>>>> list long back and it seems there is a solution. Please see the below
>>>> link for the thread on the list.
>>>> http://list.sipfoundry.org/archive/resiprocate-devel/msg01728.html
>>>>
>>>> Unfortunately the fix is not posted on the list. Can any body help in
>>>> fixing the problem.
>>>>
>>>> Thanks,
>>>> RamaRao
>>>> _______________________________________________
>>>> resiprocate-devel mailing list
>>>> resiprocate-devel at resiprocate.org
>>>> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20071126/6cfb0fb6/attachment.htm>


More information about the resiprocate-devel mailing list