Closed humeniuka closed 4 years ago
Input file for reproducing bug:
{ "bagel": [ { "title": "molecule", "basis": "svp", "df_basis": "svp-jkfit", "angstrom": true, "geometry": [ {"atom": "H", "xyz" : [ -0.227, -0.825, -2.666] }, {"atom": "O", "xyz" : [ 0.186, -0.147, -3.258] }, {"atom": "H", "xyz" : [ 0.030, 0.714, -2.796] } ] }, { "title" : "rohf", "charge" : 1 }, { "title" : "print", "file" : "h2o+_rohf.molden", "orbitals" : true } ]}
Without the "print" section no segmentation fault occurs. It seems that the crash is caused by line 161 in util/io/moldenout.cc. Replacing
util/io/moldenout.cc
ss << " Occup=" << setw(12) << occupB[i] << endl;
with
ss << " Occup=" << setw(12) << (occupB.empty() ? 0.0 : occupB[i]) << endl;
apparently solves the problem.
Fixed by 7da3dd22c91949b7042345aa9daae9a76a8d75c3 (I referenced a wrong number there)
Input file for reproducing bug:
Without the "print" section no segmentation fault occurs. It seems that the crash is caused by line 161 in
util/io/moldenout.cc
. Replacingwith
apparently solves the problem.