Warzone2100 / old-trac-import

Archived Import of (old) Warzone 2100 Trac
0 stars 0 forks source link

sequence not ordered (campaign) / invalid operator< (skirmish) #1981

Closed wzdev-ci closed 14 years ago

wzdev-ci commented 14 years ago

resolution_fixed type_bug | by Buginator


    msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x006bf2ec, const wchar_t * file=0x006bab58, unsigned int line=2266)  Line 24  C++
    Warzone2100-Dbg.exe!std::_Debug_order_single2<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055321907200,0x039c05b8), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), bool __formal=false, const wchar_t * _File=0x006bab58, unsigned int _Line=2266, bool __formal=false)  Line 1479 + 0x15 bytes    C++
    Warzone2100-Dbg.exe!std::_Debug_order_single<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055321907200,0x039c05b8), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), bool _IsFirstIteration=false, const wchar_t * _File=0x006bab58, unsigned int _Line=2266)  Line 1487 + 0x5b bytes C++
    Warzone2100-Dbg.exe!std::_Lower_bound<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >,std::pair<unsigned __int64,void *>,int>(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055307374592,0x039dd010), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), const std::pair<unsigned __int64,void *> & _Val=(13835058055310520321,0x00000000), int * __formal=0x00000000)  Line 2266 + 0x47 bytes C++
    Warzone2100-Dbg.exe!std::lower_bound<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >,std::pair<unsigned __int64,void *> >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055307374592,0x039dd010), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), const std::pair<unsigned __int64,void *> & _Val=(13835058055310520321,0x00000000))  Line 2280 + 0x6e bytes    C++
    Warzone2100-Dbg.exePointTree::queryMaybeFilter<1>(PointTree::Filter & filter={...}, int x=2240, int y=4160, unsigned int radius=1024)  Line 220 + 0x108 bytes   C++
    Warzone2100-Dbg.exePointTree::query(PointTree::Filter & filter={...}, int x=2240, int y=4160, unsigned int radius=1024)  Line 264   C++
>   Warzone2100-Dbg.exe!gridStartIterateFiltered<ConditionUnseen>(int x=2240, int y=4160, unsigned int radius=1024, PointTree::Filter * filter=0x0379b2f4, const ConditionUnseen & condition={...})  Line 115   C++
    Warzone2100-Dbg.exe!gridStartIterateUnseen(int x=2240, int y=4160, unsigned int radius=1024, int player=6)  Line 178 + 0x2b bytes   C++
    Warzone2100-Dbg.exe!processVisibilityVision(BASE_OBJECT * psViewer=0x039dd010)  Line 601 + 0x22 bytes   C
    Warzone2100-Dbg.exe!processVisibility()  Line 727 + 0x9 bytes   C
    Warzone2100-Dbg.exe!gameLoop()  Line 252    C
    Warzone2100-Dbg.exe!runGameLoop()  Line 831 + 0x5 bytes C
    Warzone2100-Dbg.exe!mainLoop()  Line 1026   C
    Warzone2100-Dbg.exe!SDL_main(int argc=2, char * * argv=0x0013fd80)  Line 1270   C

Erm, ball is in your court Cyp. :)

Just tried to start a new campaign game, and I get hit with the sequence not ordered error. That means I can't continue anymore.

-       _Next   (13835058055321907200,0x039bf8a0)   std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >
-       ptr (13835058055321907200,0x039bf8a0)   std::pair<unsigned __int64,void *>
        first   13835058055321907200    unsigned __int64
        second  0x039bf8a0  void *
-       _First  (13835058055321907200,0x039c05b8)   std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >
-       ptr (13835058055321907200,0x039c05b8)   std::pair<unsigned __int64,void *>
        first   13835058055321907200    unsigned __int64
        second  0x039c05b8  void *
-       _Last   (14829735431805717965,0xcdcdcdcd)   std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >
-       ptr (14829735431805717965,0xcdcdcdcd)   std::pair<unsigned __int64,void *>
        first   14829735431805717965    unsigned __int64
        second  0xcdcdcdcd  void *

And on skirmish games I get: invalid operator<

    msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x006bad18, const wchar_t * file=0x006bab58, unsigned int line=1978)  Line 24  C++
    Warzone2100-Dbg.exe!std::_Debug_lt<PathNode,PathNode>(PathNode & _Left={...}, PathNode & _Right={...}, const wchar_t * _Where=0x006bab58, unsigned int _Line=1978)  Line 279 + 0x15 bytes   C++
    Warzone2100-Dbg.exe!std::_Push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, int _Hole=2, int _Top=0, PathNode _Val={...})  Line 1979 + 0x58 bytes C++
    Warzone2100-Dbg.exe!std::_Push_heap_0<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 }, int * __formal=0x00000000, int * __formal=0x00000000)  Line 1996 + 0x4e bytes  C++
    Warzone2100-Dbg.exe!std::push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> > >(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 })  Line 2013 + 0x8e bytes   C++
>   Warzone2100-Dbg.exe!fpathNewNode(std::vector<PathNode,std::allocator<PathNode> > & nodes=[3]({p={...} dist=70 est=1212 },{p={...} dist=99 est=1270 },{p={...} dist=70 est=1171 }), PathCoord dest={...}, PathCoord pos={...}, unsigned int prevDist=0, PathCoord prevPos={...})  Line 196 + 0x41 bytes  C++
    Warzone2100-Dbg.exe!fpathAStarRoute(_move_control * psMove=0x04c3fea8, _jobNode * psJob=0x04c3ff1c)  Line 285 + 0x2e bytes  C++
    Warzone2100-Dbg.exe!fpathExecute(_jobNode * psJob=0x04c3ff1c, _jobDone * psResult=0x04c3fea4)  Line 623 + 0x10 bytes    C
    Warzone2100-Dbg.exe!fpathThreadFunc(void * data=0x00000000)  Line 180 + 0x17 bytes  C
-       _Left   {p={...} dist=70 est=1212 } PathNode &
-       p   {x=69 y=22 }    PathCoord
        x   69  short
        y   22  short
        dist    70  unsigned int
        est 1212    unsigned int
-       _Right  {p={...} dist=70 est=1171 } PathNode &
-       p   {x=68 y=21 }    PathCoord
        x   68  short
        y   21  short
        dist    70  unsigned int
        est 1171    unsigned int
        x   68  int
        y   21  int
        dir 2   int
-       node    {p={...} dist=0 est=1072 }  PathNode
+       p   {x=69 y=21 }    PathCoord
        dist    0   unsigned int
        est 1072    unsigned int
-       psMove  0x04c3fea8 {Status=MOVEINACTIVE Position=0 numPoints=0 ...} _move_control *
        Status  MOVEINACTIVE    _move_status
        Position    0   unsigned short
        numPoints   0   unsigned short
-       asPath  0x00000000 {x=??? y=??? }   Vector2i *
        x   CXX0030: Error: expression cannot be evaluated  
        y   CXX0030: Error: expression cannot be evaluated  
        DestinationX    0   int
        DestinationY    0   int
        srcX    0   int
        srcY    0   int
        targetX 0   int
        targetY 0   int
        speed   0   int
        boundX  0   short
        boundY  0   short
        eBitX   0   int
        eBitY   0   int
        moveDir 0   unsigned short
        bumpDir 0   unsigned short
        bumpTime    0   unsigned int
        lastBump    0   unsigned short
        pauseTime   0   unsigned short
        bumpX   0   unsigned short
        bumpY   0   unsigned short
        shuffleStart    0   unsigned int
+       psFormation 0x00000000 {refCount=??? size=??? rankDist=??? ...} _formation *
        iVertSpeed  0   short
+       iAttackRuns 0x04c3fef8  unsigned int [3]
-       psJob   0x04c3ff1c {propulsion=PROPULSION_TYPE_WHEELED droidType=DROID_CONSTRUCT destX=9859 ...}    _jobNode *
        propulsion  PROPULSION_TYPE_WHEELED PROPULSION_TYPE
        droidType   DROID_CONSTRUCT _droid_type
        destX   9859    int
        destY   1155    int
        origX   8896    int
        origY   2752    int
        droidID 181 unsigned int
-       next    0x00000000 {propulsion=??? droidType=??? destX=??? ...} _jobNode *
        propulsion  CXX0030: Error: expression cannot be evaluated  
        droidType   CXX0030: Error: expression cannot be evaluated  
        destX   CXX0030: Error: expression cannot be evaluated  
        destY   CXX0030: Error: expression cannot be evaluated  
        origX   CXX0030: Error: expression cannot be evaluated  
        origY   CXX0030: Error: expression cannot be evaluated  
        droidID CXX0030: Error: expression cannot be evaluated  
        next    CXX0030: Error: expression cannot be evaluated  
        moveType    CXX0030: Error: expression cannot be evaluated  
        owner   CXX0030: Error: expression cannot be evaluated  
        moveType    FMT_MOVE    _fpath_movetype
        owner   1   int
-       nearestCoord    {x=69 y=21 }    PathCoord
        x   69  short
        y   21  short
-       tileS   {x=69 y=21 }    PathCoord
        x   69  short
        y   21  short
        retval  0   int
-       tileF   {x=77 y=9 } PathCoord
        x   77  short
        y   9   short
        nearestDist 1072    unsigned int

Issue migrated from trac:1981 at 2022-04-15 22:06:19 -0700

wzdev-ci commented 14 years ago

Cyp cyp@... commented


(In https://github.com/Warzone2100/warzone2100/commit/bc6850388809f905517cb52865677aec01bc48a1) PointTree: Don't compare pointers when searching for points.

This should avoid any debug assertions from paranoid¹ compiler run-time libraries when two droids have exactly the same location, since the object pointers are unsorted², and closes #1981.

¹ Although std::lower_bound checking that the array is sorted could catch real problems too, so it's not that strange³. ² Was comparing to a NULL pointer when searching, so the values of the pointers in the array didn't matter. Skipping the NULL pointer comparison should save a CPU cycle or two, at least. ³ But using recursive footnotes in a commit message might be considered strange.

wzdev-ci commented 14 years ago

cypr set resolution to fixed

wzdev-ci commented 14 years ago

cypr changed status from new to closed

wzdev-ci commented 14 years ago

cypr commented


(In [11144]) PointTree: Don't compare pointers when searching for points.

This should avoid any debug assertions from paranoid¹ compiler run-time libraries when two droids have exactly the same location, since the object pointers are unsorted², and closes #1981.

¹ Although std::lower_bound checking that the array is sorted could catch real problems too, so it's not that strange³. ² Was comparing to a NULL pointer when searching, so the values of the pointers in the array didn't matter. Skipping the NULL pointer comparison should save a CPU cycle or two, at least. ³ But using recursive footnotes in a commit message might be considered strange.

From: Cyp cyp@example.com

wzdev-ci commented 14 years ago

Buginator changed status from closed to reopened

wzdev-ci commented 14 years ago

Buginator changed resolution from fixed to ``

wzdev-ci commented 14 years ago

Buginator commented


Didn't fix it.

>   msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x006bf2ec, const wchar_t * file=0x006bab58, unsigned int line=2266)  Line 24  C++
    Warzone2100-Dbg.exe!std::_Debug_order_single2<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055321907200,0x03acf4f8), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), bool __formal=false, const wchar_t * _File=0x006bab58, unsigned int _Line=2266, bool __formal=false)  Line 1479 + 0x15 bytes    C++
    Warzone2100-Dbg.exe!std::_Debug_order_single<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055321907200,0x03acf4f8), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), bool _IsFirstIteration=false, const wchar_t * _File=0x006bab58, unsigned int _Line=2266)  Line 1487 + 0x5b bytes C++
    Warzone2100-Dbg.exe!std::_Lower_bound<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >,std::pair<unsigned __int64,void *>,int>(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055307374592,0x03aebf30), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), const std::pair<unsigned __int64,void *> & _Val=(13835058055310520321,0x00000000), int * __formal=0x00000000)  Line 2266 + 0x47 bytes C++
    Warzone2100-Dbg.exe!std::lower_bound<std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > >,std::pair<unsigned __int64,void *> >(std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _First=(13835058055307374592,0x03aebf30), std::_Vector_iterator<std::pair<unsigned __int64,void *>,std::allocator<std::pair<unsigned __int64,void *> > > _Last=(14829735431805717965,0xcdcdcdcd), const std::pair<unsigned __int64,void *> & _Val=(13835058055310520321,0x00000000))  Line 2280 + 0x6e bytes    C++
    Warzone2100-Dbg.exePointTree::queryMaybeFilter<1>(PointTree::Filter & filter={...}, int x=2240, int y=4160, unsigned int radius=1024)  Line 220 + 0x108 bytes   C++
    Warzone2100-Dbg.exePointTree::query(PointTree::Filter & filter={...}, int x=2240, int y=4160, unsigned int radius=1024)  Line 264   C++
    Warzone2100-Dbg.exe!gridStartIterateFiltered<ConditionUnseen>(int x=2240, int y=4160, unsigned int radius=1024, PointTree::Filter * filter=0x01cdac1c, const ConditionUnseen & condition={...})  Line 115   C++
    Warzone2100-Dbg.exe!gridStartIterateUnseen(int x=2240, int y=4160, unsigned int radius=1024, int player=6)  Line 178 + 0x2b bytes   C++
    Warzone2100-Dbg.exe!processVisibilityVision(BASE_OBJECT * psViewer=0x03aebf30)  Line 601 + 0x22 bytes   C
    Warzone2100-Dbg.exe!processVisibility()  Line 727 + 0x9 bytes   C
    Warzone2100-Dbg.exe!gameLoop()  Line 252    C
    Warzone2100-Dbg.exe!runGameLoop()  Line 831 + 0x5 bytes C
wzdev-ci commented 14 years ago

Buginator commented


Looks like invalid operator< is still there as well.

    msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x006bad18, const wchar_t * file=0x006bab58, unsigned int line=1978)  Line 24  C++
>   Warzone2100-Dbg.exe!std::_Debug_lt<PathNode,PathNode>(PathNode & _Left={...}, PathNode & _Right={...}, const wchar_t * _Where=0x006bab58, unsigned int _Line=1978)  Line 279 + 0x15 bytes   C++
    Warzone2100-Dbg.exe!std::_Push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, int _Hole=2, int _Top=0, PathNode _Val={...})  Line 1979 + 0x58 bytes C++
    Warzone2100-Dbg.exe!std::_Push_heap_0<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 }, int * __formal=0x00000000, int * __formal=0x00000000)  Line 1996 + 0x4e bytes  C++
    Warzone2100-Dbg.exe!std::push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> > >(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 })  Line 2013 + 0x8e bytes   C++
    Warzone2100-Dbg.exe!fpathNewNode(std::vector<PathNode,std::allocator<PathNode> > & nodes=[3]({p={...} dist=70 est=1212 },{p={...} dist=99 est=1270 },{p={...} dist=70 est=1171 }), PathCoord dest={...}, PathCoord pos={...}, unsigned int prevDist=0, PathCoord prevPos={...})  Line 196 + 0x41 bytes  C++
    Warzone2100-Dbg.exe!fpathAStarRoute(_move_control * psMove=0x04c3fea8, _jobNode * psJob=0x04c3ff1c)  Line 285 + 0x2e bytes  C++
    Warzone2100-Dbg.exe!fpathExecute(_jobNode * psJob=0x04c3ff1c, _jobDone * psResult=0x04c3fea4)  Line 623 + 0x10 bytes    C
    Warzone2100-Dbg.exe!fpathThreadFunc(void * data=0x00000000)  Line 180 + 0x17 bytes  C
wzdev-ci commented 14 years ago

Buginator commented


after a clean, I am now just getting the invalid operator< error:

>   msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x006c2580, const wchar_t * file=0x006c23c0, unsigned int line=1978)  Line 24  C++
    Warzone2100-Dbg.exe!std::_Debug_lt<PathNode,PathNode>(PathNode & _Left={...}, PathNode & _Right={...}, const wchar_t * _Where=0x006c23c0, unsigned int _Line=1978)  Line 279 + 0x15 bytes   C++
    Warzone2100-Dbg.exe!std::_Push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, int _Hole=2, int _Top=0, PathNode _Val={...})  Line 1979 + 0x58 bytes C++
    Warzone2100-Dbg.exe!std::_Push_heap_0<std::_Vector_iterator<PathNode,std::allocator<PathNode> >,int,PathNode>(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 }, int * __formal=0x00000000, int * __formal=0x00000000)  Line 1996 + 0x4e bytes  C++
    Warzone2100-Dbg.exe!std::push_heap<std::_Vector_iterator<PathNode,std::allocator<PathNode> > >(std::_Vector_iterator<PathNode,std::allocator<PathNode> > _First={p={...} dist=70 est=1212 }, std::_Vector_iterator<PathNode,std::allocator<PathNode> > _Last={p={...} dist=70 est=1171 })  Line 2013 + 0x8e bytes   C++
    Warzone2100-Dbg.exe!fpathNewNode(PathfindContext & context={...}, PathCoord dest={...}, PathCoord pos={...}, unsigned int prevDist=0, PathCoord prevPos={...})  Line 212 + 0x47 bytes   C++
    Warzone2100-Dbg.exe!fpathAStarExplore(PathfindContext & context={...}, PathCoord tileF={...})  Line 299 + 0x2a bytes    C++
    Warzone2100-Dbg.exe!fpathAStarRoute(_move_control * psMove=0x04b7fea8, _jobNode * psJob=0x04b7ff1c)  Line 373 + 0x19 bytes  C++
    Warzone2100-Dbg.exe!fpathExecute(_jobNode * psJob=0x04b7ff1c, _jobDone * psResult=0x04b7fea4)  Line 623 + 0x10 bytes    C
    Warzone2100-Dbg.exe!fpathThreadFunc(void * data=0x00000000)  Line 180 + 0x17 bytes  C
wzdev-ci commented 14 years ago

Buginator commented


Cyp, I did:

if (context.nodes.begin() < context.nodes.end())
 {debug(LOG_NEVER, "blah");}

and it would hit it most of the time, the time it didn't, is the time it asserted with the invalid operator< issue.

wzdev-ci commented 14 years ago

Cyp cyp@... commented


(In https://github.com/Warzone2100/warzone2100/commit/65b68143e11e6ec2cc6d27ec408bbca95aa0210f) Merge accidental fix of bad sorting function in astar.cpp from newnet branch.

The bug (due to missing parentheses) was accidentally fixed during a merge from trunk to newnet, due to different warning flags on the newnet branch which required an accidental bugfix to compile. Pathfinding might give straighter paths now and/or be faster.

Completely closes #1981.

wzdev-ci commented 14 years ago

cypr changed status from reopened to closed

wzdev-ci commented 14 years ago

cypr changed resolution from ` tofixed`

wzdev-ci commented 14 years ago

cypr commented


(In [11178]) Merge accidental fix of bad sorting function in astar.cpp from newnet branch.

The bug (due to missing parentheses) was accidentally fixed during a merge from trunk to newnet, due to different warning flags on the newnet branch which required an accidental bugfix to compile. Pathfinding might give straighter paths now and/or be faster.

Completely closes #1981.

From: Cyp cyp@example.com

wzdev-ci commented 14 years ago

Cyp cyp@... commented


In https://github.com/Warzone2100/warzone2100/commit/bc6850388809f905517cb52865677aec01bc48a1:

#CommitTicketReference repository="" revision="bc6850388809f905517cb52865677aec01bc48a1"
PointTree: Don't compare pointers when searching for points.

This should avoid any debug assertions from paranoid¹ compiler run-time libraries when two droids have exactly the same location, since the object pointers are unsorted², and closes #1981.

¹ Although std::lower_bound checking that the array is sorted could catch real problems too, so it's not that strange³.
² Was comparing to a NULL pointer when searching, so the values of the pointers in the array didn't matter. Skipping the NULL pointer comparison should save a CPU cycle or two, at least.
³ But using recursive footnotes in a commit message might be considered strange.
wzdev-ci commented 14 years ago

Cyp cyp@... commented


In https://github.com/Warzone2100/warzone2100/commit/65b68143e11e6ec2cc6d27ec408bbca95aa0210f:

#CommitTicketReference repository="" revision="65b68143e11e6ec2cc6d27ec408bbca95aa0210f"
Merge accidental fix of bad sorting function in astar.cpp from newnet branch.

The bug (due to missing parentheses) was accidentally fixed during a merge from trunk to newnet, due to different warning flags on the newnet branch which required an accidental bugfix to compile.
Pathfinding might give straighter paths now and/or be faster.

Completely closes #1981.
wzdev-ci commented 14 years ago

Cyp cyp@... commented


In https://github.com/Warzone2100/warzone2100/commit/bc6850388809f905517cb52865677aec01bc48a1:

#CommitTicketReference repository="" revision="bc6850388809f905517cb52865677aec01bc48a1"
PointTree: Don't compare pointers when searching for points.

This should avoid any debug assertions from paranoid¹ compiler run-time libraries when two droids have exactly the same location, since the object pointers are unsorted², and closes #1981.

¹ Although std::lower_bound checking that the array is sorted could catch real problems too, so it's not that strange³.
² Was comparing to a NULL pointer when searching, so the values of the pointers in the array didn't matter. Skipping the NULL pointer comparison should save a CPU cycle or two, at least.
³ But using recursive footnotes in a commit message might be considered strange.
wzdev-ci commented 14 years ago

Cyp cyp@... commented


In https://github.com/Warzone2100/warzone2100/commit/65b68143e11e6ec2cc6d27ec408bbca95aa0210f:

#CommitTicketReference repository="" revision="65b68143e11e6ec2cc6d27ec408bbca95aa0210f"
Merge accidental fix of bad sorting function in astar.cpp from newnet branch.

The bug (due to missing parentheses) was accidentally fixed during a merge from trunk to newnet, due to different warning flags on the newnet branch which required an accidental bugfix to compile.
Pathfinding might give straighter paths now and/or be faster.

Completely closes #1981.