stevefsp / critterai

Archive of CAINav Project (Inactive)
MIT License
127 stars 75 forks source link

CAI-Nav: Paths are being prematurely disposed by the master navigator #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A path is disposed in two cases:

1. During master navigator maintenance if its timestamp exceeds the maximum 
allowed age set by maxPathAge.
2. When the master navigator is disposed.

Symptom: Path objects are being prematurely marked as disposed, even though the 
master navigator is still active.

Example:  

1. A master navigator's maxPathAge is 60,000 ms.  
2. A path is requested and successfully received.
3. Master navigator maintenance is performed less than 60 seconds after the 
path was created.
4. The path is marked as disposed.

Original issue reported on code.google.com by steve...@gmail.com on 22 Sep 2010 at 9:30

GoogleCodeExporter commented 9 years ago
This issue impacts the C# version only.

Note: The above example of 60,000 ms is not accurate.  The value must be high 
enough to trigger an integer overflow when it is multiplied by 10,000.

The cause is an integer overflow issue in the 
MasterNavigator.PerformMaintenance() method.  When mMaxPathAge is converted 
from ms to ticks, an overflow can occur.
E.g. 240,000 ms * 10,000 -> 2,400,000,000.

Workaround: Do not set the maxPathAge to a value greater than 200,000 ms.

Fix:  Convert the internal storage from an integer to a long.  (Can also cast 
to a long when necessary.  But that increases the likelihood of the bug 
resurfacing at a later date.)

This fix will be included in the next update to CAI-Nav.

Original comment by steve...@gmail.com on 22 Sep 2010 at 9:52

GoogleCodeExporter commented 9 years ago

Original comment by steve...@gmail.com on 22 Sep 2010 at 9:52

GoogleCodeExporter commented 9 years ago
The issue has been fixed in SVN.  But no further releases are planned for the 
prototype.  So the fix isn't getting released.

Original comment by steve...@gmail.com on 12 Apr 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Re-opening this issue.  An unplanned bug-fix release is occurring.  So this fix 
will be included.

Original comment by steve...@gmail.com on 4 May 2011 at 2:07

GoogleCodeExporter commented 9 years ago
Fix released in CAI-Nav version 0.1.3.

Original comment by steve...@gmail.com on 4 May 2011 at 3:09