Skip to content

rare nullptr in get_single_signal #320

Open
@rheiland

Description

@rheiland

In a particular model which @drbergman and @heberlr have been running replicates on, there seem to be occasional runtime errors. In the current development branch, at this line:
https://github.com/MathCancer/PhysiCell/blob/development/core/PhysiCell_signal_behavior.cpp#L1049
if we insert this code (after dead_cells++;), it seems to sometimes detect a nullptr and at least avoid a fatal error:

                Phase* myPhase = &(pC->phenotype.cycle.current_phase());
                if ( myPhase == nullptr)
                {
                      std::cout << __FUNCTION__ << "  -------- myPhase = nullptr\n";
		      return -9e9; 
                }

Still unsure of the underlying cause, but maybe others have a clue. In my initial tests, it also seems to be more common to happen after the final call to update_all_cells in main.cpp, before leaving the while loop and saving the final.* simulation outputs.

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