In the file Maze.cc, around line 147, we have the following code:

  while(!possibleRoutePts->empty())
  {
    MazePoint *frontOfList = possibleRoutePts->front();
    possibleRoutePts->pop_front();
    delete frontOfList;
  }
  delete possibleRoutePts;

possibleRoutePts is a private member of Maze and it is of type
MazeList*. The MazeList is simply a <list> container template with Maze
as the container elements. This <list> template is from the C++ Standard
Template Library. Checking with the STL book "The C++ Standard Library:
A Tutorial and Handbook" by Nicolai M Josuttis, the pop_front()
operation in STL Lists removes and deletes the object being popped off
of the list. Hence the object pointed to by the frontOfList should no
longer exist. The "delete possibleRoutePts" command will try to delete
an object that no longer exists, leading to a core dump.

I have tested your code on several computing platforms with g++. It
seems that Sun Solaris and IBM AIX RS6000 both have incorrect STL
implementations so the pop_front() was not deleting correctly and this
code would still proceed. But in Linux we will see the program crash due
to this dynamic memory problem. I have asked my coworkers and we have
tried on two versions of g++ (2.95.3 and 3.2.3). Both are generating the
same problem.

An easy fix for this is to simply remove the "delete frontOfList"
command. The are several other places in the same code with similar
problems.

As further evidence we can take a look at the stl_list.h header file
posted by Silicon Graphics Inc. in their STL programmer's Guide:

        http://www.sgi.com/tech/stl/stl_list.h

As a simple illustration of the concept we can take a look at the
following C++ program:

#include <iostream.h>
#include <list.h>

class Point {
    public:
    Point();
    Point(int xp, int yp) { x = xp; y = yp;}
    ~Point() {}
    int print_x() const { return x; }
    int print_y() const { return y; }
    private:
    int x, y;
};

int main (int argc, char **argv)
{
    Point p1(1,1);
    Point p2(2,2);
    Point p3(3,3);

    list<Point *> mylist;
    list<Point *>::const_iterator lp;

    mylist.push_back(&p1);
    mylist.push_back(&p2);
    mylist.push_back(&p3);

    for(lp = mylist.begin(); lp != mylist.end(); lp++) {
        cout << "item: " << (*lp)->print_x() << ", " << (*lp)->print_y()
<<  endl;
    }

    while(!mylist.empty())
    {
        Point *a = mylist.front();
        mylist.pop_front();
        delete a;
    }

    for(lp = mylist.begin(); lp != mylist.end(); lp++) {
        cout << "item: " << (*lp)->print_x() << ", " << (*lp)->print_y()
<<  endl;
    }

    cout << "Done." << endl;

    return 0;
}

This program when compiled with g++ 2.95.3 runs on AIX but crashes on
Linux. I even got this to compile with g++ 3.2.3 and have the same
problem on Linux. The only way to get around this is to comment out
lines 36 and 38 and let pop_front() remove the elements from the list
for you. You can run it on ensure++ or purify and see the segmentation
fault.