Hello, I have run into a strange issue with running artery in debug mode. It seems that there is some issue with the setup of the scenarios in debug mode which causes an error to occur when running any
debug simulation.
Below is a backtrace of what issue happens when beginning a simulation in debug mode.
(gdb) backtrace
backtrace
#0 0x00007fffec3b1ace in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > > >::_M_begin (this=0x20)
at /usr/include/c++/6/bits/stl_tree.h:666
#1 0x00007fffec3b5538 in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<c---Type <return> to continue, or q <return> to quit---
har> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > > >::lower_bound (this=0x20, __k="")
at /usr/include/c++/6/bits/stl_tree.h:1103
#2 0x00007fffec3b200b in std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > > >::lower_bound
(this=0x20, __x="") at /usr/include/c++/6/bits/stl_map.h:1150
#3 0x00007fffec3b042e in std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<int, std::shared_ptr<libsumo::TraCIResult>, std::less<int>, std::allocator<std::pair<int const, std::shared_ptr<libsumo::TraCIResult> > > > > > >::operator[] (
this=0x20, __k="") at /usr/include/c++/6/bits/stl_map.h:479
---Type <return> to continue, or q <return> to quit---
#4 0x00007fffec3a07fb in TraCIAPI::readVariables (this=0x2ccd450, inMsg=...,
objectID="", variableCount=4,
into=<error reading variable: Cannot access memory at address 0x48>)
at /home/veins/integration/artery/src/traci/sumo/utils/traci/TraCIAPI.cpp:483
#5 0x00007fffec3a1180 in TraCIAPI::readVariableSubscription (this=0x2ccd450,
cmdId=235, inMsg=...)
at /home/veins/integration/artery/src/traci/sumo/utils/traci/TraCIAPI.cpp:544
#6 0x00007fffec3ae616 in TraCIAPI::TraCIScopeWrapper::subscribe (
this=0x2ccd9d0, objID="",
vars=std::vector of length 4, capacity 4 = {...}, beginTime=-1073741824,
endTime=-1073741824)
at /home/veins/integration/artery/src/traci/sumo/utils/traci/TraCIAPI.cpp:3166
#7 0x00007fffec357f94 in traci::BasicSubscriptionManager::subscribeSimulationVariables (this=0x2ca7440, add_vars=std::set with 4 elements = {...})
at /home/veins/integration/artery/src/traci/BasicSubscriptionManager.cc:110
#8 0x00007fffec35792d in traci::BasicSubscriptionManager::traciInit (
this=0x2ca7440)
at /home/veins/integration/artery/src/traci/BasicSubscriptionManager.cc:50
#9 0x00007fffec368477 in traci::Listener::receiveSignal (this=0x2ca7440,
signal=196) at /home/veins/integration/artery/src/traci/Listener.cc:47
---Type <return> to continue, or q <return> to quit---
#10 0x00007ffff6a6eecc in omnetpp::cComponent::fire<omnetpp::SimTime> (
this=0x2cc94e0, source=0x2cc94e0, signalID=196, x=..., details=0x0)
at ccomponent.cc:637
#11 0x00007ffff6a6c796 in omnetpp::cComponent::emit (this=0x2cc94e0,
signalID=196, t=..., details=0x0) at ccomponent.cc:604
#12 0x00007fffec35ff58 in traci::Core::handleMessage (this=0x2cc94e0, msg=
0x2cb27c0) at /home/veins/integration/artery/src/traci/Core.cc:68
#13 0x00007ffff6b36298 in omnetpp::cSimulation::doMessageEvent (this=0x6889c0,
msg=0x2cb27c0, module=0x2cc94e0) at csimulation.cc:669
#14 0x00007ffff6b35e43 in omnetpp::cSimulation::executeEvent (this=0x6889c0,
event=0x2cb27c0) at csimulation.cc:611
#15 0x00007ffff748cd58 in omnetpp::qtenv::Qtenv::doRunSimulation (this=
0x822070) at qtenv.cc:895
#16 0x00007ffff748c293 in omnetpp::qtenv::Qtenv::runSimulation (this=0x822070,
mode=omnetpp::qtenv::RUNMODE_STEP, until_time=..., until_eventnum=0,
until_msg=0x0, until_module=0x0, stopOnMsgCancel=true) at qtenv.cc:745
#17 0x00007ffff73f526b in omnetpp::qtenv::MainWindow::runSimulation (this=
0x28d1e40, runMode=omnetpp::qtenv::RUNMODE_STEP) at mainwindow.cc:496
#18 0x00007ffff74055ca in omnetpp::qtenv::MainWindow::on_actionOneStep_triggered (this=0x28d1e40) at ./mainwindow.h:95
#19 0x00007ffff750f65b in omnetpp::qtenv::MainWindow::qt_static_metacall (
_o=0x28d1e40, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffffffca00)
at moc_mainwindow.cpp:274
---Type <return> to continue, or q <return> to quit---
#20 0x00007ffff750fc55 in omnetpp::qtenv::MainWindow::qt_metacall (
this=0x28d1e40, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffffffca00)
at moc_mainwindow.cpp:370
#21 0x00007ffff48b0a54 in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff40f71c2 in QAction::triggered(bool) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff40f9bb0 in QAction::activate(QAction::ActionEvent) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff41e733d in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff41e7574 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff42b368a in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff4145118 in QWidget::event(QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff42b3769 in QToolButton::event(QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff40fdb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007ffff410620d in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#31 0x00007ffff4884d30 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007ffff41048bd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff415f626 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff4162003 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff40fdb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff4105351 in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007ffff4884d30 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff4bceb03 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#39 0x00007ffff4bd0675 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#40 0x00007ffff4bae60b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007fffcf8b0360 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#42 0x00007ffff24cd7f7 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff24cda60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff24cdb0c in g_main_context_iteration ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff48d91cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#46 0x00007ffff4882d1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007ffff488b46c in QCoreApplication::exec() ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007ffff74894b0 in omnetpp::qtenv::Qtenv::doRun (this=0x822070)
at qtenv.cc:638
#49 0x00007ffff78d948f in omnetpp::envir::EnvirBase::run (this=0x822080)
at envirbase.cc:742
#50 0x00007ffff78d6527 in omnetpp::envir::EnvirBase::run (this=0x822080,
argc=14, argv=0x7fffffffe278, configobject=0x689180) at envirbase.cc:354
#51 0x00007ffff78cd531 in omnetpp::envir::setupUserInterface (argc=14,
argv=0x7fffffffe278) at startup.cc:259
#52 0x00007ffff78ce584 in evMain (argc=14, argv=0x7fffffffe278) at evmain.cc:33
---Type <return> to continue, or q <return> to quit---
#53 0x0000000000400762 in main (argc=14, argv=0x7fffffffe278) at main.cc:31
Is there any obvious issue that would cause this, I can't determine what the cause might be, especially as if I run the example in release mode it works normally. This also happens with all other scenarios, and same applies, debug doesn't work, while release does. Any clues, it may be due to my own setup that's causing the issue as well I can't be sure.