New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!

# Bug 798

Summary: SparseQR<SparseMatrix<double> >::factorize() hits assertion failure on uncompressed input matrix
Product: Eigen Reporter: renshaw
Component: SparseAssignee: Nobody <eigen.nobody>
Status: NEW ---
Severity: Unknown
Priority: Normal
Version: 3.2
Hardware: x86 - 64-bit
OS: Linux
Whiteboard:
Attachments:
Description Flags
source code to reproduce the problem none

 renshaw 2014-04-18 16:14:19 UTC ```Created attachment 454 [details] source code to reproduce the problem When I compile and run the attached program, which constructs a 2x2 sparse matrix of doubles and attempts to perform a QR factorization, I get the following output: Nonzero entries: (_,_) (_,_) (0.5,1) (_,_) Outer pointers: 0 2 \$ Inner non zeros: 0 1 \$ 0 0 0 0.5 a.out: eigen/Eigen/src/Core/DenseCoeffsBase.h:412: Eigen::DenseCoeffsBase::Scalar& Eigen::DenseCoeffsBase::operator()(Eigen::DenseCoeffsBase::Index) [with Derived = Eigen::Matrix, Eigen::DenseCoeffsBase::Scalar = int, Eigen::DenseCoeffsBase::Index = long int]: Assertion `index >= 0 && index < size()' failed. Aborted (core dumped) If I run the program under valgrind, I get some reports about uninitialized memory: ==20561== Conditional jump or move depends on uninitialised value(s) ==20561== at 0x515C8A8: sqrt (w_sqrt.c:28) ==20561== by 0x404D84: Eigen::SparseMatrixBase, -1, 1, true> >::norm() const (SparseDot.h:90) ==20561== by 0x402B18: Eigen::SparseQR, Eigen::NaturalOrdering >::factorize(Eigen::SparseMatrix const&) (SparseQR.h:332) ==20561== by 0x401FC3: Eigen::SparseQR, Eigen::NaturalOrdering >::compute(Eigen::SparseMatrix const&) (SparseQR.h:87) ==20561== by 0x400FCB: main (bug135.cpp:19)```