Core dump but not everytime once in two week ...so very difficult to reproduce..

This is a discussion on Core dump but not everytime once in two week ...so very difficult to reproduce.. within the C++ Programming forums, part of the General Programming Boards category; Hi all, I am facing a very wieird issue. Our application crashes at below function (sort) but not every time, ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    40

    Core dump but not everytime once in two week ...so very difficult to reproduce..

    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

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    40

    Core dump sort() but not everytime once in two week.so very difficult to reproduce.

    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[/QUOTE]

  3. #3
    The larch
    Join Date
    May 2006
    Posts
    3,573
    And what does the object look like that you are sorting? Are the comparison function and copy constructor of it (and its components) OK?

    It is also unclear how the same container could contain a mix of different objects by value but I suppose only the first overload of operator() is used?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    40
    Hi Anon,

    please check below function that you were asking for:


    Code:
    void HOSCache::storeHOSRule(HOSDef::hosKey key, vector<HOSDef::hosRule>& rule_vec)
    {
    	KeyRuleSetPairVector::const_iterator iter;
    	iter = this->_findHosRule(key);
    
    	if(iter == this->_hosRuleCache.end())
    	{
    		
    		
    			this->_hosRuleCache.push_back( 
    				pair<HOSDef::hosKey, vector<HOSDef::hosRule> >(key,rule_vec)
    				);
    
    			try
    			{
    				// keep the vector sorted
    			sort(_hosRuleCache.begin(),_hosRuleCache.end(),KeyRuleSetPairCompare());
    			}
    			catch(...)
    			{
    				cout<<"Exception while sorting HOSRules in HOSCache"<<endl;
    			}
    		
    	}
    }

  5. #5
    The larch
    Join Date
    May 2006
    Posts
    3,573
    What HOSDef::hosRule looks like might be relevant. Are you sure that it behaves well when copied and assigned?

    Also, have you considered using std::map<HOSDef::hosKey, vector<HOSDef::hosRule> > for storage?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. having a core dump
    By justins in forum C Programming
    Replies: 6
    Last Post: 05-21-2008, 01:00 PM
  2. STL vector core dump
    By creativeinspira in forum C++ Programming
    Replies: 9
    Last Post: 07-22-2007, 05:49 PM
  3. Force end
    By Redattack34 in forum C++ Programming
    Replies: 9
    Last Post: 09-07-2005, 12:16 AM
  4. Core Dump in While()
    By KrepNatas in forum C Programming
    Replies: 5
    Last Post: 05-17-2005, 12:15 PM
  5. core dump
    By kermit in forum Linux Programming
    Replies: 0
    Last Post: 08-03-2004, 07:25 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21