Project

General

Profile

Revision 4f536d0b

ID4f536d0baabc363cd24026b552e0466ce83d8f6c

Added by Simon Tenbusch almost 9 years ago

[horizon-4] fixed segfault that appeared when record-eventlog=true was set

View differences:

src/sim/csimulation.cc
669 669
            throw cRuntimeError("Activity-Model not supported with Horizon.");
670 670
        }
671 671

  
672
        EVCB.simulationEvent(msg);
673
        // store arrival event number of this message; it is useful input for the
674
        // sequence chart tool if the message doesn't get immediately deleted or
675
        // sent out again
676
        msg->setPreviousEventNumber(event_num);
677 672
        // check if this module supports parallel execution
678 673
        if (mod->isAsyncModule())
679 674
        {
......
705 700
                // set the context for sequential execution
706 701
                setContext(mod);
707 702
                setContextType(CTX_EVENT);
703

  
704
                EVCB.simulationEvent(msg);
705
                // store arrival event number of this message; it is useful input for the
706
                // sequence chart tool if the message doesn't get immediately deleted or
707
                // sent out again
708
                msg->setPreviousEventNumber(event_num);
709

  
708 710
                // take ownership in callHandleMessage after concurrency check
709 711
                aMod->callHandleMessage(msg);
710 712
                // unset busy to release module for further events
......
717 719
            // set the context for sequential execution
718 720
            setContext(mod);
719 721
            setContextType(CTX_EVENT);
722

  
723
            EVCB.simulationEvent(msg);
724
            // store arrival event number of this message; it is useful input for the
725
            // sequence chart tool if the message doesn't get immediately deleted or
726
            // sent out again
727
            msg->setPreviousEventNumber(event_num);
728

  
720 729
            // take owner here: no danger of a race condition since
721 730
            // simple modules are only called from here
722 731
            mod->take(msg);

Also available in: Unified diff