<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Helvetica, Arial, sans-serif">Dear Lemon-Team,</font><br>
    <div class="moz-forward-container">
      <div class="moz-forward-container"><font face="Helvetica, Arial,
          sans-serif"> <br>
          I've run across a problem with your </font><tt>ListDigraph::NodeMaps</tt><font
          face="Helvetica, Arial, sans-serif"> which I can't solve on my
          own.<br>
          <br>
          Unfortunately, as the code is rather intricate, I find myself
          unable to provide a minimal example, but the simplified
          structure is as follows: The function </font><tt>test</tt><font
          face="Helvetica, Arial, sans-serif"> creates a </font><tt>Graph2D</tt><font
          face="Helvetica, Arial, sans-serif"> with an underlying </font><tt>lemon::ListDigraph</tt><font
          face="Helvetica, Arial, sans-serif"> object and calls a </font><tt>shortestPath</tt><font
          face="Helvetica, Arial, sans-serif"> wrapper. This </font><tt>shortestPath</tt><font
          face="Helvetica, Arial, sans-serif"> function creates a </font><tt>Query2D</tt><font
          face="Helvetica, Arial, sans-serif"> object, which knows the
          underlying </font><tt>ListDigraph</tt><font face="Helvetica,
          Arial, sans-serif">, and keeps a few </font><tt>NodeMaps</tt><font
          face="Helvetica, Arial, sans-serif"> (see below). The first
          three </font><tt>NodeMaps</tt><font face="Helvetica, Arial,
          sans-serif"> never caused an issue, but when I implemented the
          fourth one called </font><tt>_potential</tt><font
          face="Helvetica, Arial, sans-serif">, the destructor of </font><tt>Graph2D</tt><font
          face="Helvetica, Arial, sans-serif"> throws a segfault. Note
          that none of the destructors are implemented by me, I use the
          standard implicit destructors.<br>
          <br>
          In the attached valgrind output, I could trace the segfault
          down to the </font><tt>clear()</tt><font face="Helvetica,
          Arial, sans-serif"> function in alteration_notifier.h -- yet,
          as three </font><tt>NodeMaps</tt><font face="Helvetica,
          Arial, sans-serif"> already exist and seemingly work fine, I'm
          at a loss as to why this segfault occurs. I'm grateful for any
          support you can provide!<br>
          <br>
          Regards,<br>
          Marco<br>
          <br>
        </font><tt><tt><br>
          </tt>void test(const Prob</tt><tt>lem& problem)</tt><tt><br>
        </tt><tt>{</tt><tt><br>
        </tt><tt>    Graph2D g2D(problem);<br>
              g2D.shortestPath("from","to");<br>
        </tt><tt>}<br>
        </tt><br>
        <tt><tt><tt>class Graph2D<br>
              {<br>
              public:<br>
                  Graph2D(const Problem& problem);<br>
                  lemon::ListDigraph G;<br>
                  <br>
                  void shortestPath(</tt><tt><tt>const std::string&
                from, const std::string& to)</tt><br>
                  lemon::ListDigraph::Node getNode(const
              std::string& name);<br>
              }<br>
            </tt></tt><br>
          void Graph2D::shortestPath(const std::string& from, const
          std::string& to)<br>
          {<br>
              Query2D query(*this);<br>
              <br>
              lemon::ListDigraph::Node s = getNode(from);<br>
              lemon::ListDigraph::Node t = getNode(to);<br>
          <br>
              query.run(s,t);<br>
          }<br>
          <br>
        </tt><tt><br>
          class Query2D<br>
          {<br>
          public:<br>
              Query2D(const Graph2D& g2D);<br>
          <br>
              const Graph2D* const _bg;<br>
              const lemon::ListDigraph& G;<br>
          <br>
              void run(lemon::ListDigraph::Node s,
          lemon::ListDigraph::Node t);<br>
              <br>
              /** The following three NodeMaps have been here for a long
          time and never caused any issues */<br>
              lemon::ListDigraph::NodeMap<short> _settled;<br>
              lemon::ListDigraph::NodeMap<size_t> _id;<br>
              lemon::ListDigraph::NodeMap<short> _nodeType;<br>
              <br>
              /** This map causes trouble. If left in, it causes the
          attached SIGSEGV (even though it is never used after
          initialisation!), if commented out, everything works nice and
          smooth */<br>
              lemon::ListDigraph::NodeMap<double> _potential;<br>
          }<br>
        </tt> </div>
    </div>
  </body>
</html>