-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rare nullptr in get_single_signal #320
Comments
This error seems to be so rare and weird and not reproducible that I'm closing this issue for now. But here's the latest error that I saw while running lldb with a clang-compiled executable.
|
The issue has been tracked to |
Is there a model (with rules) that faithfully reproduces the bug? If so, using which version of the code? |
I've convinced myself that the fundamental bug is the following (as I've been discussing with @drbergman): One fix would be the following:
Rf. https://github.com/rheiland/PhysiCell/blob/fix-die-check-nbrs/core/PhysiCell_cell.cpp#L837 This repo also contains |
I like this solution a lot. It helps ensure that any time a cell is removed that the The main reason I did not go for this solution was its reliance on the assumption that neighbors are always symmetrical. The The second reason was to avoid extra compute time, opting to rewrite the neighbors list each mechanics step (as we currently do) to maintain this list. |
Yeah, I'm not really suggesting this die() "fix" to be a serious fix to the overall problem (attempting to use a cell pointer that's been deleted). I did this primarily to convince myself that it would very directly fix the erratic segfault bug that I'd tracked down to https://github.com/rheiland/PhysiCell/blob/fix-die-check-nbrs/core/PhysiCell_signal_behavior.cpp#L783 . Also, since this "fix" didn't involve rearranging code in Excellent point on calling out concerns in So long as we all agree that #338 will fix the issue of having invalid cell pointers in |
Gotcha. I'm all in on resolving this issue sooner than later. So, I'm happy to agree to #338 and move towards merging. |
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: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 thewhile
loop and saving thefinal.*
simulation outputs.The text was updated successfully, but these errors were encountered: