MultithreadCorner/Hydra

Runtime error in Eigen triggered by Splot constructor

dbrundu opened this issue · 1 comments

The following line in Splot.h

fCovMatrix << 0.0, 0.0, 0.0, 0.0;

triggers a runtime error in Eigen, if npdfs=3:

eigen3/Eigen/src/Core/CommaInitializer.h:120: XprType& Eigen::CommaInitializer<MatrixType>::finished() [with XprType = Eigen::Matrix<double, 3, 3>]: Assertion `((m_row+m_currentBlockRows) == m_xpr.rows() || m_xpr.cols() == 0) && m_col == m_xpr.cols() && "Too few coefficients passed to comma initializer (operator<<)"' failed.

This can be easily reproduced with Eigen only:

#include <Eigen/Dense>
int main(){
    Eigen::Matrix<double, 3, 3> matrix;
    matrix << 0.0, 0.0, 0.0, 0.0;
    return 0;
}

Solved. Thanks.
341a8aa