Borland 6 Graph example 1
Hi All, I am attempting to run the 1st example (file dependancy) of Boost Graph library with Borland C++Builder 6. It compiles ok but crashes when run in exception.hpp with a call, or rather THROW to negative_edge exception. If anyone can provide any light into this I would be most grateful. (details below) Thanks Christian _________________________________________________________ Fault occurs in: dijkstra_shortest_paths.hpp: void examine_edge(Edge e, Graph& g) { if (m_compare(get(m_weight, e), m_zero)) throw negative_edge(); m_vis.examine_edge(e, g); } The actual fault is in exception.hpp at the point: struct negative_edge : public bad_graph { negative_edge() : bad_graph("The graph may not contain an edge with negative weight."){ } }; The error is: --------------------------- Debugger Exception Notification --------------------------- Project Boost_Ex1_Console.exe raised exception class boost::negative_edge with message 'Exception Object Address: 0x896912'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
chongwhite001 wrote:
Hi All, I am attempting to run the 1st example (file dependancy) of Boost Graph library with Borland C++Builder 6. It compiles ok but crashes when run in exception.hpp with a call, or rather THROW to negative_edge exception. If anyone can provide any light into this I would be most grateful. (details below) [...] The error is:
--------------------------- Debugger Exception Notification --------------------------- Project Boost_Ex1_Console.exe raised exception class boost::negative_edge with message 'Exception Object Address: 0x896912'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
I don't know if you should expect negative_edge to be thrown or not, as I don't know BGL nor your code. What is clear to me is that the message above doesn't indicate an application *crash*: it's just the debugger that stops when an exception is thrown. Clicking on Step/Run, as mentioned in the message above, resumes execution. You can disable this behaviour by chosing Tools -> Debugger Options -> Language Exceptions and unchecking the "Stop on..." checkboxes. Cheers, Nicola Musatti
chongwhite001 wrote:
Hi All, I am attempting to run the 1st example (file dependancy) of Boost Graph library with Borland C++Builder 6. It compiles ok but crashes when run in exception.hpp with a call, or rather THROW to negative_edge exception. If anyone can provide any light into this I would be most grateful. (details below) [...] The error is:
--------------------------- Debugger Exception Notification --------------------------- Project Boost_Ex1_Console.exe raised exception class boost::negative_edge with message 'Exception Object Address: 0x896912'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
I don't know if you should expect negative_edge to be thrown or not, as I don't know BGL nor your code. What is clear to me is that the message above doesn't indicate an application *crash*: it's just the debugger that stops when an exception is thrown. Clicking on Step/Run, as mentioned in the message above, resumes execution. You can disable
--- In Boost-Users@y..., Nicola Musatti
behaviour by chosing Tools -> Debugger Options -> Language Exceptions and unchecking the "Stop on..." checkboxes.
Cheers, Nicola Musatti
Thanks for the reply Nicola. Turning off the exceptions doesn't do much as it still *crashes*. (You cannot step/run with exceptions on either as it *crashes* and resets.) (BTW Example is at http://www.boost.org/libs/graph/doc/file_dependency_example.html) cheers Christian
chongwhite001 wrote: [...]
I am attempting to run the 1st example (file dependancy) of Boost Graph library with Borland C++Builder 6. It compiles ok but crashes when run in exception.hpp with a call, or rather THROW to negative_edge exception. If anyone can provide any light into this I would be most grateful. [...] Thanks for the reply Nicola. Turning off the exceptions doesn't do much as it still *crashes*. (You cannot step/run with exceptions on either as it *crashes* and resets.)
You're right. A negative_edge exception is thrown, which is apparently never caught (I say apparently because I currently have a problem with BCB and I cannot easily explore the relevant code). I'm afraid I can't help you. You need someone who knows the library better than I do. Cheers, Nicola Musatti
participants (2)
-
chongwhite001
-
Nicola Musatti