Indeed, it crashed:

sumoD: MSVehicle.cpp:2114: void MSVehicle::updateBestLanes(bool, const MSLane*): Assertion `false' failed.
Program received signal SIGABRT, Aborted.

Ultimate source of the problem is at my end: I am feeding sumo bad data. Made changes in scenario and will have to regenerate the routes as well. I have written short patch, it is attached. It responds 0xc4 (error) to TraCI client instead of crashing.

I have one more problem to deal with: when adding vehicles via TraCI the command sometimes failes because the position where the vehicle goes to is occupied by other vehicle at that moment. How can I detect it from traci?

Thanks,
Matej.



On 26.4.2016 08:33, Jakob Erdmann wrote:
It sounds a bit like SUMO crashing since it should not disconnect by itself. You could try running the debug version to investigate this possibility.


2016-04-25 8:49 GMT+02:00 Matěj Kubička <[email protected] <mailto:[email protected]>>:

    The exit() was just to point out how this problem happens. I must
    have an imp in my toolchain as it misbehaves lately - it seem that
    after the call to saveState() I sometimes manage to crash SUMO (or
    Traci) in such a way that it won't raise exception. Only in the
    next call I get the "SUMO disconnected" exception. As a by product
    those buffers won't get flushed (or so it seems). I am not sure
    what exactly is going on in here, but it might very well be that
    the problem is on my end..

    Thanks for the response,
    Matej.


    On 25.4.2016 08:16, Jakob Erdmann wrote:
    Hello,
    saving should be finished but I suspect that the final write
    buffer was not flushed.
    Always call traci.close() before calling exit(). This shuts down
    SUMO in an ordered fashion and allows all buffers to be flushed.

    regards,
    Jakob

    2016-04-25 3:18 GMT+02:00 Matěj Kubička
    <[email protected]>:

        Hello,
        is it possible that call to Connection.simulation.saveState()
        returns
        before the state is fully saved? Following call will leave
        invalid
        statefile :

                 proc = subprocess.Popen(['sumo' ...])
                 tad = traci.connect(self.port))
         tad.simulation.saveState(self.state_fname)
                 exit()

        Note the exit() call right after the call to saveState().
        Since python
        forks SUMO this call will kill SUMO too. If I try to open the
        statefile
        later SUMO itself complaints:

        Error: input ended before all started tags were ended; last
        tag started
        is 'snapshot'
          In file '/tmp/sumo-state-55001.xml'
          At line/column 75447/5.

        Best,
        Matej.



        On 15.3.2016 12:55, Jakob Erdmann wrote:
        > Hello,
        > traci now supports saving simulation state (although not
        quite as in the
        > patch).
        > See http://sumo.dlr.de/wiki/TraCI/Change_Simulation_State
        > and http://sumo.dlr.de/trac.wsgi/changeset/20191
        > regards,
        > Jakob
        >
        > 2016-03-14 8:14 GMT+01:00 Jakob Erdmann
        <[email protected] <mailto:[email protected]>>:
        >
        >> Thank you very much for the patch. We will integrate this
        for 0.26.0 (
        >> http://sumo.dlr.de/trac.wsgi/ticket/2191)
        >>
        >> cheers,
        >> Jakob
        >>
        >> 2016-03-10 1:02 GMT+01:00 Matěj Kubička <[email protected]
        <mailto:[email protected]>>:
        >>
        >>> Hello Jakob,
        >>> I cannot use --save-state.xx options as I do not know
        beforehand when I
        >>> will want to save the state. What I need is to be able to
        do it on request
        >>> via TraCI.
        >>>
        >>> I implemented this in SUMO 0.25 (rev 19749), see attached
        patch for the
        >>> changes. The parts of SUMO I was dealing with were
        written quite elegantly
        >>> and so the changes are not all that complicated (for
        which I am grateful
        >>> :-)). It now recognizes TraCI command 0x03 as a request
        to save the
        >>> simulation state. I invoke it from python simply as
        >>>
        >>>      def saveState(self, filename):
        >>> self._beginMessage(0x03, 0, filename)
        >>>          self._sendExact()
        >>>
        >>> Can you make similar functionality part of mainstream
        SUMO/TraCI? It
        >>> would simplify things for me.
        >>>
        >>> Thank you,
        >>> Matej.
        >>>
        >>
        >
        
------------------------------------------------------------------------------
        > Transform Data into Opportunity.
        > Accelerate data analysis in your applications with
        > Intel Data Analytics Acceleration Library.
        > Click to learn more.
        >
        http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
        > _______________________________________________
        > sumo-devel mailing list
        > [email protected]
        <mailto:[email protected]>
        > https://lists.sourceforge.net/lists/listinfo/sumo-devel


        
------------------------------------------------------------------------------
        Find and fix application performance issues faster with
        Applications Manager
        Applications Manager provides deep performance insights into
        multiple tiers of
        your business applications. It resolves application problems
        quickly and
        reduces your MTTR. Get your free trial!
        https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
        _______________________________________________
        sumo-devel mailing list
        [email protected]
        <mailto:[email protected]>
        https://lists.sourceforge.net/lists/listinfo/sumo-devel





------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
sumo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-devel

Reply via email to