This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 563

Summary: Eigen crash for SparseMatrix when using conservativeResize and block expressions
Product: Eigen Reporter: Clemens Hofreither <clemens.hofreither>
Component: SparseAssignee: Nobody <eigen.nobody>
Status: RESOLVED FIXED    
Severity: Unknown CC: desire.nuentsa_wakam, gael.guennebaud
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 387    

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 
https://bitbucket.org/eigen/eigen/commits/0eba9a2cc801/
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
https://bitbucket.org/eigen/eigen/commits/39da5830a0a0/
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 gitlab.com'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: https://gitlab.com/libeigen/eigen/issues/563.