This bugzilla service is closed. All entries have been migrated to
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: 2019-12-04 12:08 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
Comment 3 Nobody 2019-12-04 12:08:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

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