Skip to content

spork.sim.history can plausibly return a null-pointer error if time runs out #7

@joinr

Description

@joinr

For computing the simulation history, we're using sim.core/get-time to get the current time of the frame.
If time runs out, the agenda is nil, thus no times are returned. This can then lead to an obscure null-pointer error when we go to determine if we should continue taking frames. Currently, we say (<= (sim/get-time ctx) tfinal), but tfinal is an upper bound on the time-horizon. So if get-time returns nil (we're all done with events), then we get a numerical comparison between nil and a long.

Solution: modify the take-while filter to include the notion of time returning nil, thus indicating an early termination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions