leethomason / MicroPather

MicroPather is a path finder and A* solver (astar or a-star) written in platform independent C++ that can be easily integrated into existing code. MicroPather focuses on being a path finding engine for video games but is a generic A* solver.
326 stars 71 forks source link

Infinite Loop. #2

Closed idrise closed 11 years ago

idrise commented 11 years ago

Getting an infinite loop that occurs in "void PathCache::AddItem( const Item& item )".

I disabled caching by doing the following.

m_pather = new micropather::MicroPather(this, 0, 8, false);

I then get a bad access in micropather::PathNode::Unlink where

    void Unlink() {
        next->prev = prev; // next == nullptr  
        prev->next = next;
        next = prev = 0;
    }

The project I have is in 64-bit and in c++ 11.

leethomason commented 11 years ago

Thanks; I ran into this as well. I have a potential fix I'll push in soon.

leethomason commented 11 years ago

Not totally sure I fixed that bug, but I did post some fixes I've found. Tell me if the new version helps!