This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1704 - Eigen_assert fails when instantiating an Eigen::ConjugateGradient object with fixed-size matrices
Summary: Eigen_assert fails when instantiating an Eigen::ConjugateGradient object with...
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: General (show other bugs)
Version: 3.3 (current stable)
Hardware: x86 - 64-bit Mac OS
: Normal Crash
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-01 08:30 UTC by Peter Listov
Modified: 2019-12-04 18:36 UTC (History)
3 users (show)



Attachments

Description Peter Listov 2019-05-01 08:30:44 UTC
When instantiating an Eigen::ConjugateGradient object with fixed-size matrices, an eigen_assert fails at construction.

One can easily reproduce the problem when building with assertions enabled ("Debug" mode, NDEBUG not defined):

#include <Eigen/Dense>
#include <Eigen/IterativeLinearSolvers>

int main()
{
    Eigen::ConjugateGradient<Eigen::MatrixXd> cg2; // works fine
    Eigen::ConjugateGradient<Eigen::Matrix3d> cg1; // fails
}

The assert: Assertion failed: ((!(RowsAtCompileTime!=Dynamic) || (rows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (cols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || (rows<=MaxRowsAtCompileTime)) && (!(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic) || (cols<=MaxColsAtCompileTime)) && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array."), function resize, file /usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h, line 285.

The aforementioned code works fine in the "Release" mode.
Comment 1 Nobody 2019-12-04 18:36:31 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/1704.

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