Closed wzdev-ci closed 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.
cypr set resolution to fixed
cypr changed status from new
to closed
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
Buginator changed status from closed
to reopened
Buginator changed resolution from fixed
to ``
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
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
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
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.
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.
cypr changed status from reopened
to closed
cypr changed resolution from ` to
fixed`
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
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.
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.
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.
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.
resolution_fixed
type_bug
| by BuginatorErm, 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.
And on skirmish games I get: invalid operator<
Issue migrated from trac:1981 at 2022-04-15 22:06:19 -0700