gaschler / bounding-mesh

Implementation of the bounding mesh and bounding convex decomposition algorithms for single-sided mesh approximation

Home Page:http://www.boundingmesh.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion 'rows() == other.rows()' fails in Debug mode

gaschler opened this issue · comments

The assertion 'rows() == other.rows()' fails in Debug mode inside Decimator::solveConstrainedMinimizationInequalities.
This always happens, for instance in the first test case:

test 1
Start 1: testBoundingmeshTorus

1: Test command: Debug/boundingmesh "-v" "100" "examples/torus/torus.off" "Debug/torus_decimated.off"
1: Test timeout computed to be: 9.99988e+06
1: boundingmesh: /usr/include/eigen3/Eigen/src/Core/Assign.h:505: Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, Derived = Eigen::Matrix<double, -0x00000000000000001, 1>]: Assertion `rows() == other.rows() && cols() == other.cols()' failed.
1/6 Test # 1: testBoundingmeshTorus ...................***Exception: Other 0.18 sec
test 2

Fixed by a4b7387, ran test again in Ubuntu 12.04 and 16.04 Debug mode.
If an Eigen vector is supposed to have size zero, it should not be constructed by MatrixXd(0, 0), but better with Eigen::VectorXd::Zero(0).