Git Product home page Git Product logo

Comments (11)

riebl avatar riebl commented on May 27, 2024

Hi @brianmc95,

I see no error in your posted stack trace. Which kind of error are you referring to?

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

Hi @riebl
Sorry wrote this up last night and probably didn't pay enough attention to it.

The error I get a Segmentation Fault the gdb error I get is below

hread 1 "opp_run_dbg" received signal SIGSEGV, Segmentation fault.
0x00007f25ec7ceace 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
666	      { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); }

The error comes from the TraciAPI::readVariables function in TraciAPI.cc to send you a snippet where the error occurs it's below.

while (variableCount > 0) {

        const int variableID = inMsg.readUnsignedByte();
        const int status = inMsg.readUnsignedByte();
        const int type = inMsg.readUnsignedByte();

        if (status == RTYPE_OK) {
            switch (type) {
                case TYPE_DOUBLE:
                    into[objectID][variableID] = std::make_shared<libsumo::TraCIDouble>(inMsg.readDouble()); # <- Specifically this line
                    break;
                case TYPE_STRING:
                    into[objectID][variableID] = std::make_shared<libsumo::TraCIString>(inMsg.readString());
                    break;
                case POSITION_2D: {

There's another stack trace below but might not be terribly useful.

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 stl_tree.h:666
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> > > > > > >::lower_bound stl_tree.h:1103
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 stl_map.h:1150
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[] stl_map.h:479
TraCIAPI::readVariables TraCIAPI.cpp:483
TraCIAPI::readVariableSubscription TraCIAPI.cpp:544
TraCIAPI::TraCIScopeWrapper::subscribe TraCIAPI.cpp:3166
traci::BasicSubscriptionManager::subscribeSimulationVariables BasicSubscriptionManager.cc:110
traci::BasicSubscriptionManager::traciInit BasicSubscriptionManager.cc:50
traci::Listener::receiveSignal Listener.cc:47
omnetpp::cComponent::fire<omnetpp::SimTime> ccomponent.cc:637
omnetpp::cComponent::emit ccomponent.cc:604
traci::Core::handleMessage Core.cc:68
omnetpp::cSimulation::doMessageEvent csimulation.cc:669
omnetpp::cSimulation::executeEvent csimulation.cc:611
omnetpp::qtenv::Qtenv::doRunSimulation qtenv.cc:895
omnetpp::qtenv::Qtenv::runSimulation qtenv.cc:745
omnetpp::qtenv::MainWindow::runSimulation mainwindow.cc:496
omnetpp::qtenv::MainWindow::on_actionRun_triggered mainwindow.h:96
omnetpp::qtenv::MainWindow::qt_static_metacall moc_mainwindow.cpp:275
omnetpp::qtenv::MainWindow::qt_metacall moc_mainwindow.cpp:370
QMetaObject::activate(QObject*, int, int, void**) 0x00007f25f4ccda54
QAction::triggered(bool) 0x00007f25f45141c2
QAction::activate(QAction::ActionEvent) 0x00007f25f4516bb0
<unknown> 0x00007f25f460433d
QAbstractButton::mouseReleaseEvent(QMouseEvent*) 0x00007f25f4604574
QToolButton::mouseReleaseEvent(QMouseEvent*) 0x00007f25f46d068a
QWidget::event(QEvent*) 0x00007f25f4562118
QToolButton::event(QEvent*) 0x00007f25f46d0769
QApplicationPrivate::notify_helper(QObject*, QEvent*) 0x00007f25f451ab8c
QApplication::notify(QObject*, QEvent*) 0x00007f25f452320d
QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x00007f25f4ca1d30
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) 0x00007f25f45218bd
<unknown> 0x00007f25f457c626
<unknown> 0x00007f25f457f003
QApplicationPrivate::notify_helper(QObject*, QEvent*) 0x00007f25f451ab8c
QApplication::notify(QObject*, QEvent*) 0x00007f25f4522351
QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x00007f25f4ca1d30
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) 0x00007f25f4febb03
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) 0x00007f25f4fed675
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x00007f25f4fcb60b
<unknown> 0x00007f25cfccd360
g_main_context_dispatch 0x00007f25f28ea7f7
<unknown> 0x00007f25f28eaa60
g_main_context_iteration 0x00007f25f28eab0c
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x00007f25f4cf61cf
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x00007f25f4c9fd1a
QCoreApplication::exec() 0x00007f25f4ca846c
omnetpp::qtenv::Qtenv::doRun qtenv.cc:638
omnetpp::envir::EnvirBase::run envirbase.cc:742
omnetpp::envir::EnvirBase::run envirbase.cc:354
omnetpp::envir::setupUserInterface startup.cc:259
evMain evmain.cc:33
main main.cc:31
__libc_start_main 0x00007f25f544d2e1
_start 0x000000000040066a

Thanks for getting back to me at the same time much appreciated, let me know if you need me to try running anything else that might be of some help figuring this out.

from artery.

riebl avatar riebl commented on May 27, 2024

@brianmc95 Please check the updated master branch including a bugfix for BasicSubscriptionManager. I am not sure if this fixes also your problem, but I had this patch in my development branch already.

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

@riebl Unfortunately after a fresh clone and setup, still the same issue as before.

from artery.

riebl avatar riebl commented on May 27, 2024

Hm, it's quite hard for me to investigate this issue further because I am not suffering from segmentation faults in debug mode. However, the line you have posted clearly shows an invalid pointer with this=0x20. This is probably caused by passing an invalid into object to TraCIAPI::readVariables.

You may set a breakpoint at TraCIAPI::readVariableSubscription and check if the myDomains[cmdId]->getModifiableSubscriptionResults() part returns a valid object and verify that a valid TraCIScopeWrapper is stored at myDomains[cmdId].

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

So on looking through it, it appears the myDomains[cmdId]->getModifiableSubscriptionResults() returns nothing which is causing the issue.

from artery.

riebl avatar riebl commented on May 27, 2024

Actually, all the code under src/traci/sumo including TraCIAPI is directly borrowed from SUMO. Put in different words: If Artery is not misusing the TraCI API then it is quite likely a SUMO bug.

Often the output by Valgrind is also helpful to track down bugs. You can run a scenario with Valgrind via memcheck_<scenario>. Depending on the scenario you may need to select a particular configuration by setting CMake variable RUN_FLAGS for your build directory via cmake-gui to "-c some_scenario_config". For example, memcheck_example with RUN_FLAGS set to "-c inet" will run the inet configuration of scenarios/artery.

Edit: Oops, for memcheck_* targets RUN_FLAGS is ignored. Put the configuration selection into VALGRIND_EXEC_FLAGS in this case.

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

Ah I hadn't thought that it was a sumo issue but you are probably right, in which case apologies for putting it in your repo.

But thanks for letting me know how to run Valgrind and for all the help, I really appreciate it.

I'll attach the output of the valgrind run below in case it's of interest, don't feel obliged to go through it.

==18669== 
OMNeT++ Discrete Event Simulation  (C) 1992-2018 Andras Varga, OpenSim Ltd.
Version: 5.4.1, build: 180629-5e28390, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer

Setting up Cmdenv...

Loading NED files from /home/veins/artery/src/artery:  77
Loading NED files from /home/veins/artery/src/traci:  16
Loading NED files from /home/veins/artery/extern/veins/examples/veins:  1
Loading NED files from /home/veins/artery/extern/veins/src/veins:  38
Loading NED files from /home/veins/artery/extern/inet/src:  666
Loading NED files from /home/veins/artery/extern/inet/examples:  174
Loading NED files from /home/veins/artery/extern/inet/tutorials:  19
Loading NED files from /home/veins/artery/extern/inet/showcases:  33

Preparing for running configuration veins, run #0...
Assigned runID=veins-0-20190219-15:26:32-18669
Setting up network "artery.veins.World"...
==18669== Use of uninitialised value of size 8
==18669==    at 0x10BE0016: std::pair<int const, TraCIAPI::TraCIScopeWrapper*>::pair<int&&, 0ul>(std::tuple<int&&>&, std::tuple<>&, std::_Index_tuple<0ul>, std::_Index_tuple<>) (tuple:1590)
==18669==    by 0x10BDEEDA: std::pair<int const, TraCIAPI::TraCIScopeWrapper*>::pair<int&&>(std::piecewise_construct_t, std::tuple<int&&>, std::tuple<>) (tuple:1579)
==18669==    by 0x10BDD5D3: void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >::construct<std::pair<int const, TraCIAPI::TraCIScopeWrapper*>, std::piecewise_construct_t const&, std::tuple<int&&>, std::tuple<> >(std::pair<int const, TraCIAPI::TraCIScopeWrapper*>*, std::piecewise_construct_t const&, std::tuple<int&&>&&, std::tuple<>&&) (new_allocator.h:120)
==18669==    by 0x10BDBB4D: void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > > >::construct<std::pair<int const, TraCIAPI::TraCIScopeWrapper*>, std::piecewise_construct_t const&, std::tuple<int&&>, std::tuple<> >(std::allocator<std::_Rb_tree_node<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >&, std::pair<int const, TraCIAPI::TraCIScopeWrapper*>*, std::piecewise_construct_t const&, std::tuple<int&&>&&, std::tuple<>&&) (alloc_traits.h:475)
==18669==    by 0x10BD8D58: void std::_Rb_tree<int, std::pair<int const, TraCIAPI::TraCIScopeWrapper*>, std::_Select1st<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >, std::less<int>, std::allocator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >::_M_construct_node<std::piecewise_construct_t const&, std::tuple<int&&>, std::tuple<> >(std::_Rb_tree_node<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >*, std::piecewise_construct_t const&, std::tuple<int&&>&&, std::tuple<>&&) (stl_tree.h:543)
==18669==    by 0x10BD449B: std::_Rb_tree_node<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >* std::_Rb_tree<int, std::pair<int const, TraCIAPI::TraCIScopeWrapper*>, std::_Select1st<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >, std::less<int>, std::allocator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >::_M_create_node<std::piecewise_construct_t const&, std::tuple<int&&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<int&&>&&, std::tuple<>&&) (stl_tree.h:560)
==18669==    by 0x10BD126B: std::_Rb_tree_iterator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > std::_Rb_tree<int, std::pair<int const, TraCIAPI::TraCIScopeWrapper*>, std::_Select1st<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >, std::less<int>, std::allocator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<int&&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> >, std::piecewise_construct_t const&, std::tuple<int&&>&&, std::tuple<>&&) (stl_tree.h:2196)
==18669==    by 0x10BCF798: std::map<int, TraCIAPI::TraCIScopeWrapper*, std::less<int>, std::allocator<std::pair<int const, TraCIAPI::TraCIScopeWrapper*> > >::operator[](int&&) (stl_map.h:502)
==18669==    by 0x10BBC5D5: TraCIAPI::TraCIAPI() (TraCIAPI.cpp:48)
==18669==    by 0x10B7F7E9: traci::API::API() (API.h:17)
==18669==    by 0x10B7E4E8: traci::Core::Core() (Core.cc:23)
==18669==    by 0x10B7E383: __factoryfunc_8() (Core.cc:8)
==18669==  Uninitialised value was created by a stack allocation
==18669==    at 0x10B60780: ??? (in /home/veins/artery/debug/src/traci/libtraci.so)
==18669== 
Initializing...

Running simulation...
** Event #0   t=0   Elapsed: 0.006778s (0m 00s)  0% completed  (0% total)
     Speed:     ev/sec=0   simsec/sec=0   ev/simsec=0
     Messages:  created: 2   present: 2   in FES: 2
Loading configuration... done.
==18669== Invalid read of size 8
==18669==    at 0x10BD1012: 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() (stl_tree.h:666)
==18669==    by 0x10BD4B83: 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> > > > > > >::lower_bound(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_tree.h:1103)
==18669==    by 0x10BD154E: 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(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_map.h:1150)
==18669==    by 0x10BCF897: 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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_map.h:479)
==18669==    by 0x10BBF538: TraCIAPI::readVariables(tcpip::Storage&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, 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> > > > > > >&) (TraCIAPI.cpp:486)
==18669==    by 0x10BBFEBD: TraCIAPI::readVariableSubscription(int, tcpip::Storage&) (TraCIAPI.cpp:547)
==18669==    by 0x10BCDB8D: TraCIAPI::TraCIScopeWrapper::subscribe(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<int, std::allocator<int> > const&, double, double) const (TraCIAPI.cpp:3265)
==18669==    by 0x10B76B67: traci::BasicSubscriptionManager::subscribeSimulationVariables(std::set<int, std::less<int>, std::allocator<int> > const&) (BasicSubscriptionManager.cc:110)
==18669==    by 0x10B764DC: traci::BasicSubscriptionManager::traciInit() (BasicSubscriptionManager.cc:50)
==18669==    by 0x10B8704A: traci::Listener::receiveSignal(omnetpp::cComponent*, int, omnetpp::SimTime const&, omnetpp::cObject*) (Listener.cc:47)
==18669==    by 0x5F01ECB: void omnetpp::cComponent::fire<omnetpp::SimTime>(omnetpp::cComponent*, int, omnetpp::SimTime, omnetpp::cObject*) (ccomponent.cc:637)
==18669==    by 0x5EFF795: omnetpp::cComponent::emit(int, omnetpp::SimTime const&, omnetpp::cObject*) (ccomponent.cc:604)
==18669==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
==18669== 
==18669== 
==18669== Process terminating with default action of signal 11 (SIGSEGV)
==18669==  Access not within mapped region at address 0x30
==18669==    at 0x10BD1012: 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() (stl_tree.h:666)
==18669==    by 0x10BD4B83: 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> > > > > > >::lower_bound(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_tree.h:1103)
==18669==    by 0x10BD154E: 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(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_map.h:1150)
==18669==    by 0x10BCF897: 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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_map.h:479)
==18669==    by 0x10BBF538: TraCIAPI::readVariables(tcpip::Storage&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, 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> > > > > > >&) (TraCIAPI.cpp:486)
==18669==    by 0x10BBFEBD: TraCIAPI::readVariableSubscription(int, tcpip::Storage&) (TraCIAPI.cpp:547)
==18669==    by 0x10BCDB8D: TraCIAPI::TraCIScopeWrapper::subscribe(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<int, std::allocator<int> > const&, double, double) const (TraCIAPI.cpp:3265)
==18669==    by 0x10B76B67: traci::BasicSubscriptionManager::subscribeSimulationVariables(std::set<int, std::less<int>, std::allocator<int> > const&) (BasicSubscriptionManager.cc:110)
==18669==    by 0x10B764DC: traci::BasicSubscriptionManager::traciInit() (BasicSubscriptionManager.cc:50)
==18669==    by 0x10B8704A: traci::Listener::receiveSignal(omnetpp::cComponent*, int, omnetpp::SimTime const&, omnetpp::cObject*) (Listener.cc:47)
==18669==    by 0x5F01ECB: void omnetpp::cComponent::fire<omnetpp::SimTime>(omnetpp::cComponent*, int, omnetpp::SimTime, omnetpp::cObject*) (ccomponent.cc:637)
==18669==    by 0x5EFF795: omnetpp::cComponent::emit(int, omnetpp::SimTime const&, omnetpp::cObject*) (ccomponent.cc:604)
==18669==  If you believe this happened as a result of a stack
==18669==  overflow in your program's main thread (unlikely but
==18669==  possible), you can try to increase the size of the
==18669==  main thread stack using the --main-stacksize= flag.
==18669==  The main thread stack size used in this run was 8388608.
==18669== 
==18669== HEAP SUMMARY:
==18669==     in use at exit: 22,473,087 bytes in 192,977 blocks
==18669==   total heap usage: 361,707 allocs, 168,730 frees, 104,290,194 bytes allocated
==18669== 
==18669== LEAK SUMMARY:
==18669==    definitely lost: 0 bytes in 0 blocks
==18669==    indirectly lost: 0 bytes in 0 blocks
==18669==      possibly lost: 0 bytes in 0 blocks
==18669==    still reachable: 22,473,087 bytes in 192,977 blocks
==18669==                       of which reachable via heuristic:
==18669==                         newarray           : 1,616 bytes in 20 blocks
==18669==                         multipleinheritance: 432 bytes in 1 blocks
==18669==         suppressed: 0 bytes in 0 blocks
==18669== Rerun with --leak-check=full to see details of leaked memory
==18669== 
==18669== For counts of detected and suppressed errors, rerun with: -v
==18669== ERROR SUMMARY: 15 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault
scenarios/artery/CMakeFiles/memcheck_example.dir/build.make:57: recipe for target 'scenarios/artery/CMakeFiles/memcheck_example' failed
make[3]: *** [scenarios/artery/CMakeFiles/memcheck_example] Error 139
CMakeFiles/Makefile2:807: recipe for target 'scenarios/artery/CMakeFiles/memcheck_example.dir/all' failed
make[2]: *** [scenarios/artery/CMakeFiles/memcheck_example.dir/all] Error 2
CMakeFiles/Makefile2:814: recipe for target 'scenarios/artery/CMakeFiles/memcheck_example.dir/rule' failed
make[1]: *** [scenarios/artery/CMakeFiles/memcheck_example.dir/rule] Error 2
Makefile:337: recipe for target 'memcheck_example' failed
make: *** [memcheck_example] Error 2
zsh: exit 2     cmake --build debug --target memcheck_example

I realise there's a newer version of sumo available, 1.1.0 while I'm on 1.0.1 I may just upgrade to that and see if the issue persists and possibly try one of the older versions as well. I'll update this issue with anything I find out just in case someone else stumbles across this. If as I feel it is a SUMO issue and it persists in 1.1.0 I'll raise the issue there and link to it from here. Thanks so much for the help again, I'll close this issue once I have gone through the above and confirmed it's SUMO.

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

Minor update, tried again with all available version 1 sumo setups so SUMO 1.1.0, 1.0.1, 1.0.0 problem persists in all cases unfortunately, but will investigate at a later point and see what might be the root cause.

from artery.

riebl avatar riebl commented on May 27, 2024

@brianmc95 Any update on this issue?

from artery.

brianmc95 avatar brianmc95 commented on May 27, 2024

I ended up sidetracked with other issues.

But I spent some time in the last 2 days and did a full new setup of OMNeT++ / SUMO / artery on Ubuntu (I had it running on a debian VM). But on some initial runs I can see that it's now working, so it must have been some sort of issue with Debian that was causing it. Going to close the issue as I don't think it's worth investigating the cause on Debian.

from artery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.