ok, I got it, thank you Harald for the explanation

best,
Weronika

śr., 26 sie 2020 o 08:24 Harald Schaefer <[email protected]> napisał(a):

> Hi Weronika,
>
> the sumo-guiD file is in <sumo-build-dir>/bin. You can install it, add
> this path to your PATH variable or specify the full path in your sumoBinary
> variable in the traci script.
>
> But I have seen, that your example crashes sumo even without traci
> interaction
>
> Thread 2 "sumo-guiD" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffe75b6700 (LWP 17617)]
> 0x000055555609ffa6 in std::__shared_ptr<std::vector<MSLane*,
> std::allocator<MSLane*> > const, (__gnu_cxx::_Lock_policy)2>::get
> (this=0xc5)
>     at /usr/include/c++/9/bits/shared_ptr_base.h:1310
> 1310          { return _M_ptr; }
> (gdb) bt
> #0  0x000055555609ffa6 in std::__shared_ptr<std::vector<MSLane*,
> std::allocator<MSLane*> > const, (__gnu_cxx::_Lock_policy)2>::get() const
> (this=0xc5)
>     at /usr/include/c++/9/bits/shared_ptr_base.h:1310
> #1  0x000055555609e314 in std::__shared_ptr_access<std::vector<MSLane*,
> std::allocator<MSLane*> > const, (__gnu_cxx::_Lock_policy)2, false,
> false>::_M_get() const (this=0xc5)
>     at /usr/include/c++/9/bits/shared_ptr_base.h:1021
> #2  0x000055555609bec8 in std::__shared_ptr_access<std::vector<MSLane*,
> std::allocator<MSLane*> > const, (__gnu_cxx::_Lock_policy)2, false,
> false>::operator*() const (this=0xc5)
>     at /usr/include/c++/9/bits/shared_ptr_base.h:1008
> #3  0x000055555609ad1c in MSEdge::getLanes() const (this=0x55) at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSEdge.h:167
> #4  0x0000555556446c20 in MSVehicle::getUpcomingLanesUntil(double) const
> (this=0x7fffd006e4b0, distance=45.314605559963972)
>     at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSVehicle.cpp:5488
> #5  0x000055555666242b in
> MSDevice_Bluelight::notifyMove(SUMOTrafficObject&, double, double, double)
> (this=0x7fffe04bc130, veh=..., newSpeed=20.726724529385102)
>     at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/devices/MSDevice_Bluelight.cpp:115
> #6  0x00005555564304cc in MSVehicle::workOnMoveReminders(double, double,
> double)
>     (this=0x7fffd006e4b0, oldPos=-0.41211896942112958,
> newPos=20.314605559963972, newSpeed=20.726724529385102)
>     at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSVehicle.cpp:1218
> #7  0x000055555643f78e in MSVehicle::executeMove() (this=0x7fffd006e4b0)
> at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSVehicle.cpp:4207
> #8  0x0000555556343704 in MSLane::executeMovements(long long)
> (this=0x7fffe0177410, t=1133000) at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSLane.cpp:1755
> #9  0x00005555560e7461 in GUILane::executeMovements(long long)
> (this=0x7fffe0177410, t=1133000) at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/guisim/GUILane.cpp:160
> #10 0x000055555648903b in MSEdgeControl::executeMovements(long long)
> (this=0x7fffe0110390, t=1133000)
>     at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSEdgeControl.cpp:187
> #11 0x0000555556394e9a in MSNet::simulationStep() (this=0x7fffe0040a10) at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/microsim/MSNet.cpp:580
> #12 0x00005555560fe36a in GUINet::simulationStep() (this=0x7fffe0040a10)
> at /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/guisim/GUINet.cpp:231
> #13 0x00005555560ac120 in GUIRunThread::makeStep() (this=0x555557423e50)
> at /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/gui/GUIRunThread.cpp:165
> #14 0x00005555560abf9a in GUIRunThread::run() (this=0x555557423e50) at
> /dosd/src/opensource/Sumo/sumo-git-co/sumo/src/gui/GUIRunThread.cpp:132
> #15 0x00007ffff77db4f3 in FX::FXThread::execute(void*) () at
> /lib/x86_64-linux-gnu/libFOX-1.6.so.0
> #16 0x00007ffff7463609 in start_thread (arg=<optimized out>) at
> pthread_create.c:477
> #17 0x00007ffff37cf103 in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
>
> Regards, Harald
> Am 25.08.20 um 19:58 schrieb Weronika:
>
> yes, you are right, my mistake (in PyCharm I added module traci which was
> 1.6.0 and was overwriting the correct one).
> Now it is all fine, I could create traci.log.
>
> I tested more and the problem appears only for one of my maps (manually
> generated) and always in the same place in the map (when the ambulance
> finishes its way and some other car is nearby, but not in a collision).
>
> I am sending the files, but as now I know that it happens only in one
> specific place (and the map is not so realistic), I think it is not worth
> to spend on it more time. I will let you know if the situation will appear
> in some other cases.
>
> thank you for your time,
> best,
> Weronika
>
>
> wt., 25 sie 2020 o 15:51 Jakob Erdmann <[email protected]> napisał(a):
>
>> This means the version of traci being loaded is still from 1.16.0 or
>> older. The latest development version of traci supports the traceFile
>> argument since the 3rd of June.  See
>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_the_traci_library_being_loaded
>>
>> Am Di., 25. Aug. 2020 um 14:39 Uhr schrieb Weronika <
>> [email protected]>:
>>
>>> Then the error is: TypeError: start() got an unexpected keyword argument
>>> 'traceFile'
>>>
>>> traci.start([sumoBinary, "-c", '../' + selectedFolder + '/osm.sumocfg',
>>>              "--tripinfo-output", '../' + selectedFolder + 
>>> '/out/tripinfo.out.xml',
>>>              "--summary-output", '../' + selectedFolder + 
>>> '/out/summary.out.xml',
>>>              "--netstate-dump", '../' + selectedFolder + 
>>> '/out/netstate.out.xml',
>>>              "--vehroute-output", '../' + selectedFolder + 
>>> '/out/route.out.xml',
>>>              "--duration-log.statistics", "true",
>>>              "--log", '../' + selectedFolder + '/out/log.txt',
>>>              "--vehroute-output.route-length", "true"],
>>>             traceFile="traci.log")
>>>
>>> best,
>>>
>>> Weronika
>>>
>>>
>>>
>>> wt., 25 sie 2020 o 14:15 Jakob Erdmann <[email protected]>
>>> napisał(a):
>>>
>>>> use traci.start([sumoBinary, ....], traceFile="traci.log")
>>>>
>>>> Am Di., 25. Aug. 2020 um 13:34 Uhr schrieb Weronika <
>>>> [email protected]>:
>>>>
>>>>> Hi Harald, hi Jakob,
>>>>> I tried to do what Harald recommended. (took me some time, as I faced
>>>>> a few problems on my way, but now almost all are solved)
>>>>> The last step in which I am supposed to do:
>>>>> gdb --args sumoD -c debug.sumocfg
>>>>> gives me back:
>>>>>
>>>>> sumoD: No such file or directory.
>>>>> even if sumoD exists...
>>>>> To double-check I tried in the terminal:
>>>>>
>>>>> weronika@MBP-Weronika ~ % sumo-gui
>>>>>
>>>>> (this worked)
>>>>>
>>>>> weronika@MBP-Weronika ~ % sumo-guiD
>>>>>
>>>>> zsh: command not found: sumo-guiD
>>>>>
>>>>>
>>>>> Do you know what could I try to solve it?
>>>>>
>>>>>
>>>>> Today I wanted also to try what Jakub recommended.
>>>>>
>>>>> My traci.start is:
>>>>>
>>>>> traci.start([sumoBinary, "-c", '../' + selectedFolder + '/osm.sumocfg',
>>>>>              "--tripinfo-output", '../' + selectedFolder + 
>>>>> '/out/tripinfo.out.xml',
>>>>>              "--summary-output", '../' + selectedFolder + 
>>>>> '/out/summary.out.xml',
>>>>>              "--netstate-dump", '../' + selectedFolder + 
>>>>> '/out/netstate.out.xml',
>>>>>              "--vehroute-output", '../' + selectedFolder + 
>>>>> '/out/route.out.xml',
>>>>>              "--duration-log.statistics", "true",
>>>>>              "--log", '../' + selectedFolder + '/out/log.txt',
>>>>>
>>>>>             traceFile="traci.log",
>>>>>              "--vehroute-output.route-length", "true"])
>>>>>
>>>>> Adding it directly like this doesnt work, as it is invalid syntax I will 
>>>>> need to adapt it to my traci.start... (I tried a few modification, but 
>>>>> without any success) Could you please help my with how to do it?
>>>>>
>>>>> Thank you for your support
>>>>>
>>>>> best,
>>>>>
>>>>> Weronika
>>>>>
>>>>>
>>>>> wt., 25 sie 2020 o 07:45 Jakob Erdmann <[email protected]>
>>>>> napisał(a):
>>>>>
>>>>>> Alternatively, you can run your project with traci.start(...,
>>>>>> traceFile="traci.log") and send in your input files along with traci.log.
>>>>>>
>>>>>> Am Sa., 22. Aug. 2020 um 22:12 Uhr schrieb Harald Schaefer <
>>>>>> [email protected]>:
>>>>>>
>>>>>>> Hi Weronika,
>>>>>>>
>>>>>>> it may be, that Sumo terminates unexpected.
>>>>>>>
>>>>>>> Please build the Debug version and run SUMO with gdb.
>>>>>>>
>>>>>>> If Sumo terminates, the stack trace can help the developers
>>>>>>>
>>>>>>> See
>>>>>>> https://sumo.dlr.de/docs/Installing/Linux_Build.html#building_the_sumo_binaries_with_cmake
>>>>>>> and
>>>>>>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#debugging_a_traci_session_on_linux
>>>>>>>
>>>>>>> Best regards, Harald
>>>>>>> Am 21.08.20 um 18:30 schrieb Weronika:
>>>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> I got *a new build of SUMO* and I am getting an error 
>>>>>>> *traci.exceptions.FatalTraCIError:
>>>>>>> connection closed by SUMO*.  The last time when I ran it and it
>>>>>>> worked properly was with the build from ~15.06.
>>>>>>>
>>>>>>> (The problem already appeared before when I used the build from
>>>>>>> 12.07, but I left it as I thought maybe will not occur later.)
>>>>>>>
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>
>>>>>>>   File "runner.py", line 376, in <module>
>>>>>>>
>>>>>>>     run()
>>>>>>>
>>>>>>>   File "runner.py", line 265, in run
>>>>>>>
>>>>>>>     traci.simulationStep()
>>>>>>>
>>>>>>>   File "/Users/weronika/Desktop/sumo/tools/traci/main.py", line 210,
>>>>>>> in simulationStep
>>>>>>>
>>>>>>>     return _connections[""].simulationStep(step)
>>>>>>>
>>>>>>>   File "/Users/weronika/Desktop/sumo/tools/traci/connection.py",
>>>>>>> line 291, in simulationStep
>>>>>>>
>>>>>>>     result = self._sendCmd(tc.CMD_SIMSTEP, None, None, "D", step)
>>>>>>>
>>>>>>>   File "/Users/weronika/Desktop/sumo/tools/traci/connection.py",
>>>>>>> line 178, in _sendCmd
>>>>>>>
>>>>>>>     return self._sendExact()
>>>>>>>
>>>>>>>   File "/Users/weronika/Desktop/sumo/tools/traci/connection.py",
>>>>>>> line 88, in _sendExact
>>>>>>>
>>>>>>>     raise FatalTraCIError("connection closed by SUMO")
>>>>>>>
>>>>>>> traci.exceptions.FatalTraCIError: connection closed by SUMO
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I tried: „>> run your simulation with the option
>>>>>>> --duration-log.statistics and --log
>>>>>>>
>>>>>>> >> logfile.txt
>>>>>>>
>>>>>>> >> you will find the results in logfile.txt”
>>>>>>>
>>>>>>> When the simulation gets this error the log file is empty.
>>>>>>>
>>>>>>>
>>>>>>> Worth to mention is that at the beginning of my simulation I set up
>>>>>>> a number for using randomTrips.py and generate trips file
>>>>>>>
>>>>>>>
>>>>>>> command = 'python ' + os.environ['SUMO_HOME'] +
>>>>>>> '/tools/randomTrips.py -n osm.net.xml -p ' + vehiclesDensity +' -o
>>>>>>> trips.trips.xml '+ '--trip-attributes=\'departLane=\"best\"
>>>>>>> departSpeed=\"max\" type=\"car\" departPos=\"random\"\' --validate'
>>>>>>>
>>>>>>> os.system(command)
>>>>>>>
>>>>>>>
>>>>>>> And depending on this argument the simulation fails or not (mostly
>>>>>>> fails..).
>>>>>>>
>>>>>>>
>>>>>>> I would appreciate your help on how I can find the problem. I
>>>>>>> checked the input files and they look fine (and works with earlier 
>>>>>>> versions)
>>>>>>>
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Weronika
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> sumo-user mailing [email protected]
>>>>>>> To unsubscribe from this list, visit 
>>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> sumo-user mailing list
>>>>>>> [email protected]
>>>>>>> To unsubscribe from this list, visit
>>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>>
>>>>>> _______________________________________________
>>>>>> sumo-user mailing list
>>>>>> [email protected]
>>>>>> To unsubscribe from this list, visit
>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>
>>>>> _______________________________________________
>>>>> sumo-user mailing list
>>>>> [email protected]
>>>>> To unsubscribe from this list, visit
>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
>
> _______________________________________________
> sumo-user mailing [email protected]
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to