<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,<br>
      <br>
      unfortunately, we could not reproduce the error in a small
      example, and our code is too big and dependent on several files
      and local settings to include. Below is the constructor for the
      Query2D object, I hope that helps...<br>
      <br>
      Kind regards,<br>
      Marco<br>
      <br>
      <br>
    </font><tt>Query2D::Query2D(const Graph2D& g2D) :</tt><tt><br>
          _bg(&g2D),<br>
          G(g2D.G),<br>
          _settled(G,0),<br>
          _id(G, std::numeric_limits<size_t>::max() ),<br>
          _nodeType(G,0)<br>
          _potential(G,0)<br>
      {};</tt><br>
    <br>
    <div class="moz-cite-prefix">Am 14.06.2017 um 08:37 schrieb Péter
      Kovács:<br>
    </div>
    <blockquote type="cite"
      cite="mid:99165707-3ee8-4842-7417-d388c20823f8@inf.elte.hu">Dear
      Marco,
      <br>
      <br>
      Could you send a self-contained code example for reproducing the
      issue? I miss e.g. the implementation of the constructor of
      Query2D (where constructors of the node maps should be called).
      <br>
      <br>
      Regards,
      <br>
      Péter
      <br>
      <br>
      <br>
      <br>
      <blockquote type="cite">Dear Lemon-Team,
        <br>
        <br>
        I've run across a problem with your ListDigraph::NodeMapswhich I
        can't
        <br>
        solve on my own.
        <br>
        <br>
        Unfortunately, as the code is rather intricate, I find myself
        unable to
        <br>
        provide a minimal example, but the simplified structure is as
        follows:
        <br>
        The function testcreates a Graph2Dwith an underlying
        <br>
        lemon::ListDigraphobject and calls a shortestPathwrapper. This
        <br>
        shortestPathfunction creates a Query2Dobject, which knows the
        underlying
        <br>
        ListDigraph, and keeps a few NodeMaps(see below). The first
        three
        <br>
        NodeMapsnever caused an issue, but when I implemented the fourth
        one
        <br>
        called _potential, the destructor of Graph2Dthrows a segfault.
        Note that
        <br>
        none of the destructors are implemented by me, I use the
        standard
        <br>
        implicit destructors.
        <br>
        <br>
        In the attached valgrind output, I could trace the segfault down
        to the
        <br>
        clear()function in alteration_notifier.h -- yet, as three
        <br>
        NodeMapsalready exist and seemingly work fine, I'm at a loss as
        to why
        <br>
        this segfault occurs. I'm grateful for any support you can
        provide!
        <br>
        <br>
        Regards,
        <br>
        Marco
        <br>
        <br>
        <br>
        void test(const Problem& problem)
        <br>
        {
        <br>
            Graph2D g2D(problem);
        <br>
            g2D.shortestPath("from","to");
        <br>
        }
        <br>
        <br>
        class Graph2D
        <br>
        {
        <br>
        public:
        <br>
            Graph2D(const Problem& problem);
        <br>
            lemon::ListDigraph G;
        <br>
        <br>
            void shortestPath(const std::string& from, const
        std::string& to)
        <br>
            lemon::ListDigraph::Node getNode(const std::string&
        name);
        <br>
        }
        <br>
        <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>
        <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
        <br>
        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
        <br>
        SIGSEGV (even though it is never used after initialisation!), if
        <br>
        commented out, everything works nice and smooth */
        <br>
            lemon::ListDigraph::NodeMap<double> _potential;
        <br>
        }
        <br>
        <br>
        <br>
        _______________________________________________
        <br>
        Lemon-user mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:Lemon-user@lemon.cs.elte.hu">Lemon-user@lemon.cs.elte.hu</a>
        <br>
        <a class="moz-txt-link-freetext" href="http://lemon.cs.elte.hu/mailman/listinfo/lemon-user">http://lemon.cs.elte.hu/mailman/listinfo/lemon-user</a>
        <br>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>