Repository navigation
fix: clear[] crashed after a fire whose front had stopped - #194
yanissrairi wants to merge 2 commits into
Conversation
When the last event is taken out of the TimeTable, getUpcomingEvent left head pointing at it. If that event then had an infinite time (its node stopped), insert() deleted it and head dangled, so clear() deleted it a second time. dropAtomEvents could likewise delete the event being processed.
545bbef to
1b011b7
Compare
|
thanks @yanissrairi the clear[] hasn't been much tested yet. My problem is testing it into a coupled fire/atmospher context with MPI and Fortan bindings, which i have no time to do yet.. very sorry. I'll be back on these around Oct 20. |
# Conflicts: # CHANGELOG.md
antonio-leblanc
left a comment
There was a problem hiding this comment.
Thanks @yanissrairi! Reproduced the crash on dev and the fix here; real_case output is byte-identical before and after. I merged dev in to fix the CHANGELOG conflict.
|
Tested the coupled case with this branch vs dev:
Result: 107 of 119 output files ( |
When a fire's front stops everywhere (e.g. an ignition in non-burnable fuel), the next
clear[]segfaults.getUpcomingEventtook the last event out but leftheadpointing at it. The stopped node's event has an infinite time, soinsert()deleted it, andclear()deleted it again throughhead. The fix setshead = nullptrin that branch.Reproduction, from
tests/runff:Added
tests/unit/test_timetable.cpp, which crashes without the fix.ctestandrunffpass.