Re: Crash on 1x1 matrix (was Re: [eigen] 2.0.1 soon?)

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


should be fixed in trunk. backporting it to the 2.0.x branch is another story...

On Mon, Mar 23, 2009 at 1:43 PM, Robert Lupton the Good
<rhl@xxxxxxxxxxxxxxxxxxx> wrote:
>> <rhl@xxxxxxxxxxxxxxxxxxx> wrote:
>>>
>>> There are some problems with 0- and 1- sized matrices that I'd
>>> like to get reported before 2.0.1!  eigen shouldn't crash on the
>>> trivial cases.
>>
>> can you be more specific ? I don't remember we still have such problems.
>
> I was going to! Here you go; this crashes with
>
> Assertion failed: (dim > 0), function Matrix, file
> /u/lsst/products/external/eigen/2.0.0/include/Eigen/src/Core/Matrix.h, line
> 312.
>
> And no, nImage isn't really a const int in the application, so I couldn't
> use
> Matrix1d even if it existed!
>
>                                R
>
> #include "Eigen/Core"
> #include "Eigen/QR"
>
> int main() {
>    const int nImage = 1;
>
>    Eigen::MatrixXd R(nImage, nImage);
>
>    R(0, 0) = 1.0;
>
>    Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> eVecValues(R);
> }
>
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/