LIGGGHTS BUG - store/state command can lead to segmentation fault (v3.8.0)

Submitted by martin.kozakovic on Tue, 01/07/2020 - 18:41

by DaveK
Jan Evangelista Purkyně University in Ústí nad Labem Faculty of Science +420 47528 3306

During initialization of store/state command in

fix_store_state.cpp

function

FixStoreState::end_of_step()

and its sub-command

modify->addstep_compute(nextstep);

produces segmentation fault when no compute is involved in formula

Error is caused by non-initialised

n_timeflag

within modify.cpp

Suggested correction:

********************************************
modify.cpp:

a) add

n_timeflag = 0;

to function

Modify::Modify(LAMMPS *lmp) : Pointers(lmp)

b) add

if(list_timeflag == NULL) list_init_compute();

at the beggining of function

void Modify::addstep_compute(bigint newstep)

AttachmentSize
Binary Data modify.cpp_.gz9.31 KB