Boost C++ Libraries: Ticket #4088: boost::kamada_kawai_spring_layout cause program crash https://svn.boost.org/trac10/ticket/4088 <p> boost::kamada_kawai_spring_layout caused following program crash: </p> <hr /> <p> Microsoft Visual C++ Debug Library </p> <hr /> <p> Debug Assertion Failed! </p> <p> Program: d:\Sourcen\Test\C++\<a class="missing wiki">GraphTest</a>\Debug\<a class="missing wiki">GraphTest</a>.exe File: c:\program files\microsoft visual studio 8\vc\include\vector Line: 756 </p> <p> Expression: vector subscript out of range </p> <p> For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. </p> <p> (Press Retry to debug the application) </p> <hr /> <p> Abort Retry Ignore </p> <hr /> <p> OS: Windows XP Compiler: Visual Studio 2005 SP2 Boost version: 1.42.0 </p> <p> Source code is attached as separate file. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4088 Trac 1.4.3 Wolfgang Forstmeier <wolfgang.forstmeier@…> Mon, 12 Apr 2010 12:37:43 GMT attachment set https://svn.boost.org/trac10/ticket/4088 https://svn.boost.org/trac10/ticket/4088 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">kamada_kawai_spring_layout error.txt</span> </li> </ul> Ticket Jeremiah Willcock Mon, 12 Apr 2010 12:48:44 GMT owner changed https://svn.boost.org/trac10/ticket/4088#comment:1 https://svn.boost.org/trac10/ticket/4088#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Andrew Sutton</span> to <span class="trac-author">Jeremiah Willcock</span> </li> </ul> <p> The source code file you've attached is mangled (missing colons and angle brackets). Could you please post a compilable version? </p> Ticket Wolfgang Forstmeier <wolfgang.forstmeier@…> Mon, 12 Apr 2010 12:52:03 GMT attachment set https://svn.boost.org/trac10/ticket/4088 https://svn.boost.org/trac10/ticket/4088 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">kamada_kawai_spring_layout error.2.txt</span> </li> </ul> Ticket Wolfgang Forstmeier <wolfgang.forstmeier@…> Mon, 12 Apr 2010 12:54:00 GMT <link>https://svn.boost.org/trac10/ticket/4088#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4088#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4088#comment:1" title="Comment 1">jewillco</a>: </p> <blockquote class="citation"> <p> The source code file you've attached is mangled (missing colons and angle brackets). Could you please post a compilable version? </p> </blockquote> <p> Sorry for that, I have attached a new one. Seems like notepad.exe kills such things. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Mon, 12 Apr 2010 20:18:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4088#comment:3 https://svn.boost.org/trac10/ticket/4088#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> The bug here is most likely the vertex_index range problem I put in a comment to bug <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4087" title="#4087: Bugs: boost::fruchterman_reingold_force_directed_layout fails compiling (closed: invalid)">#4087</a>. A vertex index map must map each vertex to a distinct number in [0, num_vertices(g)); these indices are often used to index vectors whose sizes are all num_vertices(g). </p> Ticket