#909: MapMagic 2 / Bugs
Status: To-do
  • MM2. The CalcNearWeights method of FixedListPathfinding (in Pathfinding.cs) is sometimes throwing a thread failure exception for me down in this bottom bit. It appears that the fixed array has been initialized to a "capacity" of 10,000, but that the boundary is unchecked meaning that if more than 10,000 "poses" get added it just overflows the array boundary and the thread fails. For me this is occurring while MM2 is trying to auto-create additional tiles nearby the ones I have pinned (so I don't know which tile it is, nor why it's using over 10,000 capacity when the pinned nodes w/ their current seeds are working fine). Anyway I can obviously increase the "capacity" or else trim down whatever's making so many whatevers -- but thought I'd throw that out there as something that might want to be "guarded" with a clearer message (since I had to go through the stack trace to figure out what was wrong).

    Image

    new

  1. Brian Reynolds

    23/01/2025 22:06

    (confirmed that a moderate increase in the "capacity" of the array was enough to staunch the bloodflow)

    new

  2. [22:08]

    Something like this would be the MM3 improvement I'd suggest (or guard to only show once per call to CalcNearWeights)

    Image

Created by akaWraith Jan 25, 2025