Hi all,
I am facing a very wieird issue.
Our application crashes at below function (sort) but not every time, once /twice in a two week. not for every time.
Code:
sort(_hosRuleCache.begin(),_hosRuleCache.end(),KeyRuleSetPairCompare());
Class
class KeyRuleSetPairCompare
{
public:
bool operator()(const KeyRuleSetPair& lhs, const KeyRuleSetPair& rhs) const
{
return keyLess(lhs.first,rhs.first);
}
bool operator()(const KeyRuleSetPair& lhs, const HOSDef::hosKey& key) const
{
return keyLess(lhs.first, key);
}
bool operator()(const HOSDef::hosKey& key, const KeyRuleSetPair& rhs) const
{
return keyLess(key,rhs.first);
}
private:
bool keyLess(const HOSDef::hosKey& key1, const HOSDef::hosKey& key2) const
{
return key1 < key2;
}
};
class KeyParameterSetPairCompare
{
public:
bool operator()(const KeyParameterSetPair& lhs, const KeyParameterSetPair& rhs) const
{
return keyLess(lhs.first,rhs.first);
}
bool operator()(const KeyParameterSetPair& lhs, const HOSDef::hosKey& key) const
{
return keyLess(lhs.first, key);
}
bool operator()(const HOSDef::hosKey& key, const KeyParameterSetPair& rhs) const
{
return keyLess(key,rhs.first);
}
private:
bool keyLess(const HOSDef::hosKey& key1, const HOSDef::hosKey& key2) const
{
return key1 < key2;
}
};
Please check stack trace for the same:
strcpy.strcpy() at 0x10040690
__ct__Q2_6HOSDef7hosRuleFRCQ2_6HOSDef7hosRule(0x31 c36778, 0x67ffe0) at 0x10442144
_Ucopy__Q2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std 9allocatorXTQ2_6HOSDef7hosRule__HQ2_3std6_PtritXTQ 2_6HOSDef7hosRuleTlTPCQ2_6HOSDef7hosRuleTRCQ2_6HOS Def7hosRuleTPQ2_6HOSDef7hosRuleTRQ2_6HOSDef7hosRul e__Q2_3std6_PtritXTQ2_6HOSDef7hosRuleTlTPCQ2_6HOSD ef7hosRuleTRCQ2_6HOSDef7hosRuleTPQ2_6HOSDef7hosRul eTRQ2_6HOSDef7hosRule_T1PQ2_6HOSDef7hosRule_PQ2_6H OSDef7hosRule(0x31336e1c, 0x67ffe0, 0x32000000, 0x31c36778) at 0x10446dc8
__as__Q2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9a llocatorXTQ2_6HOSDef7hosRule__FRCQ2_3std6vectorXTQ 2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7ho sRule__(0x31336e1c, 0x31336e00) at 0x10446914
_Unguarded_insert__3stdHQ2_3std6_PtritXTQ2_3std4pa irXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7h osRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___TlT PQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ 2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7ho sRule___TRQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6 vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6 HOSDef7hosRule___TPQ2_3std4pairXTQ2_6HOSDef6hosKey TQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9alloca torXTQ2_6HOSDef7hosRule___TRQ2_3std4pairXTQ2_6HOSD ef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3s td9allocatorXTQ2_6HOSDef7hosRule____Q2_3std4pairXT Q2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRu leTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___21KeyRu leSetPairCompare_Q2_3std6_PtritXTQ2_3std4pairXTQ2_ 6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleT Q2_3std9allocatorXTQ2_6HOSDef7hosRule___TlTPQ2_3st d4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSD ef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule__ _TRQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorX TQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7 hosRule___TPQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3st d6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2 _6HOSDef7hosRule___TRQ2_3std4pairXTQ2_6HOSDef6hosK eyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allo catorXTQ2_6HOSDef7hosRule____Q2_3std4pairXTQ2_6HOS Def6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3 std9allocatorXTQ2_6HOSDef7hosRule___21KeyRuleSetPa irCompare_v(0x2ff20adc, 0x2ff20ac0, 0xf02ff2) at 0x10453100
_Sort_end__3stdHQ2_3std6_PtritXTQ2_3std4pairXTQ2_6 HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ 2_3std9allocatorXTQ2_6HOSDef7hosRule___TlTPQ2_3std 4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDe f7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___ TRQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXT Q2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7h osRule___TPQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std 6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_ 6HOSDef7hosRule___TRQ2_3std4pairXTQ2_6HOSDef6hosKe yTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9alloc atorXTQ2_6HOSDef7hosRule____21KeyRuleSetPairCompar eQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ 2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7ho sRule____Q2_3std6_PtritXTQ2_3std4pairXTQ2_6HOSDef6 hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9 allocatorXTQ2_6HOSDef7hosRule___TlTPQ2_3std4pairXT Q2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRu leTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___TRQ2_3s td4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOS Def7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule_ __TPQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vector XTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef 7hosRule___TRQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3s td6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ 2_6HOSDef7hosRule____T121KeyRuleSetPairComparePQ2_ 3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6H OSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRul e____v(0x2ff20b90, 0x2ff20b94, 0xf02ff2, 0x0) at 0x10458494
sort__3stdHQ2_3std6_PtritXTQ2_3std4pairXTQ2_6HOSDe f6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3st d9allocatorXTQ2_6HOSDef7hosRule___TlTPQ2_3std4pair XTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hos RuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___TRQ2_ 3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6H OSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRul e___TPQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vect orXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSD ef7hosRule___TRQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_ 3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorX TQ2_6HOSDef7hosRule____21KeyRuleSetPairCompare_Q2_ 3std6_PtritXTQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3s td6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ 2_6HOSDef7hosRule___TlTPQ2_3std4pairXTQ2_6HOSDef6h osKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleTQ2_3std9a llocatorXTQ2_6HOSDef7hosRule___TRQ2_3std4pairXTQ2_ 6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef7hosRuleT Q2_3std9allocatorXTQ2_6HOSDef7hosRule___TPQ2_3std4 pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ2_6HOSDef 7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7hosRule___T RQ2_3std4pairXTQ2_6HOSDef6hosKeyTQ2_3std6vectorXTQ 2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6HOSDef7ho sRule____T121KeyRuleSetPairCompare_v(0x2ff20c4c, 0x2ff20c54, 0x0) at 0x10451f2c
storeHOSRule__8HOSCacheFQ2_6HOSDef6hosKeyRQ2_3std6 vectorXTQ2_6HOSDef7hosRuleTQ2_3std9allocatorXTQ2_6 HOSDef7hosRule__(0x311eedc8, 0x2ff210d8, 0x2ff20cc8) at 0x1044e418
SetupEngineRulesDefault__13ServiceEngineFlN21(0x2f f216f0, 0x20, 0x0, 0x2d) at 0x10485fa0
SetupEngine__13ServiceEngineFR14DALTransactionlN22 (0x2ff216f0, 0x2ff227d0, 0x20, 0x0, 0x2d) at 0x10412278
_ParseInputMsg__16HOSCommunicationFPcR13ServiceEng ineR12TravelStatusRQ2_3std6vectorXTQ2_6HOSDef15Act ivityRequestTQ2_3std9allocatorXTQ2_6HOSDef15Activi tyRequest__RQ2_3std6vectorXTQ2_6HOSDef9ParamListTQ 2_3std9allocatorXTQ2_6HOSDef9ParamList__(0x311ed82 8, 0x311edec8, 0x2ff216f0, 0x2ff215f0, 0x2ff21610, 0x2ff21620) at 0x1040ee40
ProcessMessage__16HOSCommunicationFPPcR13ServiceEn gine(0x311ed828, 0x2ff22618, 0x2ff216f0) at 0x1040e010
RunSingleThread__16HOSCommunicationFPv(0x311ed828, 0x300c2c38) at 0x104b9a18
main(0x2, 0x2ff22928) at 0x104b31ac