New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 563 - Eigen crash for SparseMatrix when using conservativeResize and block expressions
Summary: Eigen crash for SparseMatrix when using conservativeResize and block expressions
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Nobody
Depends on:
Blocks: 3.2
  Show dependency treegraph
Reported: 2013-03-09 12:44 UTC by Clemens Hofreither
Modified: 2013-04-12 13:20 UTC (History)
2 users (show)


Description Clemens Hofreither 2013-03-09 12:44:29 UTC
The following code segfaults on the latest Eigen development branch:


#include <Eigen/Sparse>

using namespace Eigen;

int main()
    SparseMatrix<double> A(3, 3);
    for (int i = 0; i < 3; ++i)
        A.insert(i,i) = 1.0;

    A.conservativeResize(3, 4);

    A.col(3) = A.col(2);


I understand this is still beta-level functionality, so take this bug report as you will.
Comment 1 Desire NUENTSA 2013-03-11 19:23:51 UTC
The matrix A is in uncompressed mode.
Sparse block methods do not support it at this time. 
We have put an assert to check it
changeset:   0eba9a2cc801
user:        dnuentsa
date:        2013-03-11 19:21:18
summary:     Bug 563 : Sparse block assignments should be called on compressed matrices. Uncompressed matrices will be supported later
affected #:  1 file
Comment 2 Gael Guennebaud 2013-04-12 13:20:59 UTC
Changeset:   39da5830a0a0
User:        ggael
Date:        2013-04-12 13:20:13
Summary:     Fix bug 563: assignement to Block<SparseMatrix> is now allowed on non-compressed matrices

Note You need to log in before you can comment on or make changes to this bug.