Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 653
    • Issues 653
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigen
  • eigeneigen
  • Issues
  • #1669
Closed
Open
Created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

Zero-sized matrices generate assertion failures

Submitted by Kerry Loux

Assigned to Nobody

Link to original bugzilla bug (#1669)
Version: 3.3 (current stable)

Description

In previous versions (including v3.2) inverses of zero-sized matrices were supported. The following code, for example, would compile and execute without issue in v3.2:

Eigen::MatrixXd a;// NOTE: using Eigen::Matrix<double, 0, 0> fails with compile-time error on the last line below
a.resize(0,0);
Eigen::Matrix<double, 0, 1> b;
std::cout << a.inverse() * b << std::endl;

In v3.3, this code generates the following runtime error:
Assertion failed: this->rows()>0 && this->cols()>0 && "you are using an empty matrix", file c:\lib\eigen\eigen\src\core\redux.h, line 413

It appears that the file eigen/Eigen/src/Core/Redux.h has many assertions with this "you are using an empty matrix" explanation which are not there in v3.2.

Because this was supported in v3.2 and there are good reasons to continue to support such code, I believe this behavior is a bug.

Blocking

#558 (closed) #814 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking