[boost] [Graph] Attempt to resolve open issue

已查看 9 次
跳至第一个未读帖子

Anne van de Graaf via Boost

未读,
2021年12月3日 16:47:432021/12/3
收件人 bo...@lists.boost.org、Anne van de Graaf
Hello all,

I am trying to get an open issue in Boost.Graph resolved. Since I haven't received any response at the corresponding GitHub page nor from the Boost Users mailing list (where I posted the below message last Monday), I am reaching out to you. My aim is to get in touch with the maintainer(s) of Boost.Graph in order to discuss what is the preferred/most efficient way to fix the issue. Since this is my first post to this mailing list, please accept my apologies if you feel this is not the right way to get in touch with the maintainers. In that case, I would appreciate it very much if you could kindly explain what I should have done instead. Please find below a copy of my message that I sent last Monday to the Boost Users mailing list. Thank you very much for your attention and any replies.

Original message:
When I remove a vertex from a graph, I occasionally experience a crash (on a system running Red Hat Enterprise Linux 8.5). I have been able to replicate the behavior with the following test program:

#include <vector>
#include <boost/graph/adjacency_list.hpp>


int main()
{
using MyGraph = boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS>;
using MyVertexDescriptor = boost::graph_traits<MyGraph>::vertex_descriptor;
using MyVertexDescriptorVec = std::vector<MyVertexDescriptor>;

MyGraph g;
MyVertexDescriptorVec vertices{ boost::add_vertex( g ),
boost::add_vertex( g ),
boost::add_vertex( g ) };

boost::add_edge( vertices[0], vertices[1], g );
boost::add_edge( vertices[1], vertices[2], g );


boost::clear_vertex( vertices[0], g );
boost::remove_vertex( vertices[0], g );


return 0;
}

Also on a Windows platform, I observe similar behavior. When I build the above code with Microsoft Visual Studio 2019 (MSVC 14.27.29110) and run it with a debugger, a debug assertion is triggered ("cannot increment value-initialized map/set iterator"). In both cases (on Linux and Windows platforms), the debugger reveals that the problem is at line 2071 of boost/graph/detail/adjacency_list.hpp. For clarity, I have copied the involved template function below:

template < class EdgeList, class vertex_descriptor >
inline void reindex_edge_list(
EdgeList& el, vertex_descriptor u, boost::disallow_parallel_edge_tag)
{
for (typename EdgeList::iterator ei = el.begin(); ei != el.end(); ++ei) // line 2071: increment operator fails
{
if (ei->get_target() > u)
{
typename EdgeList::value_type ce = *ei;
el.erase(ce);
--ce.get_target();
el.insert(ce);
}
}
}

While I was searching for a proper place to post my question, I found the following issue at GitHub (which was opened on July 1 of this year): https://github.com/boostorg/graph/issues/268. This appears to be the exact same issue. So last week, I added a comment saying that I am facing the exact same problem. Unfortunately, so far no one has responded yet. To me, it seems that the problem is well-understood. Also, some have proposed a bug fix to resolve the issue (including a pull request). Nevertheless, no progress has been made over the past months. So I was just wondering what is the best way to proceed if we want to fix the issue in Boost itself? Is there anything that I can do (apart from starting this thread) to help in resolving the issue? Any feedback is greatly appreciated.

Kind regards,
Anne van de Graaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

John Maddock via Boost

未读,
2021年12月4日 04:23:162021/12/4
收件人 Anne van de Graaf via Boost、John Maddock
On 03/12/2021 08:36, Anne van de Graaf via Boost wrote:
> Hello all,
>
> I am trying to get an open issue in Boost.Graph resolved. Since I haven't received any response at the corresponding GitHub page nor from the Boost Users mailing list (where I posted the below message last Monday), I am reaching out to you. My aim is to get in touch with the maintainer(s) of Boost.Graph in order to discuss what is the preferred/most efficient way to fix the issue. Since this is my first post to this mailing list, please accept my apologies if you feel this is not the right way to get in touch with the maintainers. In that case, I would appreciate it very much if you could kindly explain what I should have done instead. Please find below a copy of my message that I sent last Monday to the Boost Users mailing list. Thank you very much for your attention and any replies.

Unfortunately, Graph has no current maintainer.  I have done some
maintenance on that library in the past, and I know Jeremy Murphy will
be trying to do some this next week, so hopefully one of us can get that
one fixed!

Best, John.


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Anne van de Graaf via Boost

未读,
2021年12月4日 10:19:572021/12/4
收件人 Anne van de Graaf via Boost、Anne van de Graaf、John Maddock
> Hello all,
>
> I am trying to get an open issue in Boost.Graph resolved. Since I haven't received any response at the corresponding GitHub page nor from the Boost Users mailing list (where I posted the below message last Monday), I am reaching out to you. My aim is to get in touch with the maintainer(s) of Boost.Graph in order to discuss what is the preferred/most efficient way to fix the issue. Since this is my first post to this mailing list, please accept my apologies if you feel this is not the right way to get in touch with the maintainers. In that case, I would appreciate it very much if you could kindly explain what I should have done instead. Please find below a copy of my message that I sent last Monday to the Boost Users mailing list. Thank you very much for your attention and any replies.

> Unfortunately, Graph has no current maintainer. I have done some
> maintenance on that library in the past, and I know Jeremy Murphy will
> be trying to do some this next week, so hopefully one of us can get that
> one fixed!

Thanks a lot for your reply, John. I didn't know that Boost.Graph doesn't have a current maintainer. It would be great if you or Jeremy could do some maintenance on it. Feel free to contact me if I can help you in any way to get things done. We could then discuss in what way I can contribute. Thanks.

Kind regards, Anne

Jeremy Murphy via Boost

未读,
2021年12月9日 16:50:422021/12/9
收件人 bo...@lists.boost.org、Jeremy Murphy、John Maddock
Hi Anne,

which issue or pull request # is it?

Jeremy

Anne van de Graaf via Boost

未读,
2021年12月10日 09:07:262021/12/10
收件人 Jeremy Murphy、bo...@lists.boost.org、Anne van de Graaf、John Maddock
> Hi Anne,

> which issue or pull request # is it?
Hi Jeremy,

It is issue # 268: https://github.com/boostorg/graph/issues/268

Best regards, Anne

> Jeremy

Jeremy Murphy via Boost

未读,
2022年3月1日 22:33:302022/3/1
收件人 Anne van de Graaf、Jeremy Murphy、bo...@lists.boost.org、John Maddock
This is fixed on the develop branch, btw, have you verified that it works
as expected now?


On Fri, 10 Dec 2021 at 18:56, Anne van de Graaf <A.vand...@dianafea.com>
wrote:

> > Hi Anne,
>
>
>
> > which issue or pull request # is it?
>
> Hi Jeremy,
>
>
>
> It is issue # 268: https://github.com/boostorg/graph/issues/268
>
>
>
> Best regards, Anne
>
>
>
> > Jeremy
>
>
>
>
>
> On Sun, 5 Dec 2021 at 02:20, Anne van de Graaf via Boost <

Anne van de Graaf via Boost

未读,
2022年3月10日 08:25:052022/3/10
收件人 Jeremy Murphy、Anne van de Graaf、bo...@lists.boost.org、John Maddock
> This is fixed on the develop branch, btw, have you verified that it works as expected now?

Apologies for my late reply. Yes, I have verified that the fix on the develop branch works as expected. Thank you very much for the work that you have done.

Best regards,
Anne

On Fri, 10 Dec 2021 at 18:56, Anne van de Graaf <A.vand...@dianafea.com<mailto:A.vand...@dianafea.com>> wrote:
> Hi Anne,

> which issue or pull request # is it?
Hi Jeremy,

It is issue # 268: https://github.com/boostorg/graph/issues/268

Best regards, Anne

> Jeremy


回复全部
回复作者
转发
0 个新帖子