I am using SPQR support in Eigen3.20-beta1. And
unfortunately I got some memory leak.
I tried Valgrind and got the flollowing error.
1,176 bytes in 1 blocks are possibly lost in loss record
13,376 of 14,289
in TangentProjection2::Projection() in
elastic/projection2.cpp:904
1: realloc in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: cholmod_l_realloc in
/home/nullas/workspace/build-PetGL-Debug/libelastic.so
3: cholmod_l_realloc_multiple in
/home/nullas/workspace/build-PetGL-Debug/libelastic.so
4: cholmod_l_reallocate_sparse in
/home/nullas/workspace/build-PetGL-Debug/libelastic.so
5: long SuiteSparseQR<double>(int,
double, long, int, cholmod_sparse_struct*,
cholmod_sparse_struct*, cholmod_dense_struct*,
cholmod_sparse_struct**, cholmod_dense_struct**,
cholmod_sparse_struct**, long**, cholmod_sparse_struct**,
long**, cholmod_dense_struct**, cholmod_common_struct*) in
/home/nullas/workspace/build-PetGL-Debug/libelastic.so
6: long SuiteSparseQR<double>(int,
double, long, cholmod_sparse_struct*,
cholmod_sparse_struct**, long**, cholmod_sparse_struct**,
long**, cholmod_dense_struct**, cholmod_common_struct*) in
/home/nullas/workspace/build-PetGL-Debug/libelastic.so
7:
Eigen::SPQR<Eigen::SparseMatrix<double, 0,
int>
>::compute(Eigen::SparseMatrix<double, 0,
int> const&) in <a
href="" class="moz-txt-link-rfc2396E" href="file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:98">"file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:98"
>/usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:98</a>
8:
Eigen::SPQR<Eigen::SparseMatrix<double, 0,
int>
>::SPQR(Eigen::SparseMatrix<double, 0,
int> const&) in <a
href="" class="moz-txt-link-rfc2396E" href="file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:80">"file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:80"
>/usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:80</a>
9: TangentProjection2::Projection() in <a
href="" class="moz-txt-link-rfc2396E" href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:904">"file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:904"
>elastic/projection2.cpp:904</a>
10: TangentProjection2::Next() in <a
href="" class="moz-txt-link-rfc2396E" href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:310">"file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:310"
>elastic/projection2.cpp:310</a>
11: ProjectionThreading2::run() in <a
href="" class="moz-txt-link-rfc2396E" href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2_thread.cpp:113">"file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2_thread.cpp:113"
>elastic/projection2_thread.cpp:113</a>
12: /usr/lib/libQtCore.so.4.8.4
G = F.transpose() * F; // F is not guaranteed to
be full rank.
Since my application use this batch of code at
each iteration, it will crash after a while.
Thank you for time.