fix #1230: Heat geodesics example crashes#1237
Closed
xinyazhang wants to merge 5 commits intolibigl:devfrom
Closed
fix #1230: Heat geodesics example crashes#1237xinyazhang wants to merge 5 commits intolibigl:devfrom
xinyazhang wants to merge 5 commits intolibigl:devfrom
Conversation
This bug is a combination of three components: Visual C++, Eigen, and how igl::heat_geodesics_precompute uses Eigen::SparseMatrix. For some reason, if transpose() is called before sparseView() on Windows, the returned SparseMatrix cannot be iterated over with the the standard method (more precisely, the InnerIterator may have invalid indices during the iteration). Thus, a lot of functions would fail, including functions from Eigen itself. This patch let heat_geodesics_precompute() calls sparseView() BEFORE transpose(), and solved the problem.
Contributor
|
Thanks for doing the hard working of tracking down this issue. Looks like a great candidate to submit as a possible but to Eigen, too. |
Collaborator
|
Hmm why are we even transposing a diagonal sparse matrix in the first place? Anyway thanks for finding this, esp. as we don't have that many Windows maintainers. I would also love to hear a bit more from upstream as to what is causing this. |
Contributor
|
We're not.
`M.diagonal()` returns the digaonal of M as a (dense) column vector.
`Aeq` needs this as a sparse row vector.
|
Collaborator
|
Ah, right, I got confused with |
…bigl#1239) * Add conda environment file for boost (helpful for Windows users). * Try to update Travis image for macOS.
…r-clang update IGL_DEPRECATED to handle clang (e.g. on macOS) as well.
…nto xinyazhang-pr-1230-rev1
Collaborator
|
Fixed by #1288 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Describe your changes and what you've already done to test it.]
Check all that apply (change to
[x])This change swap the calling of transpose() and sparseView() and fixed the igl::heat_geodesics_precompute on Windows.
tutorial/716_HeatGeodesics has been tested on Windows with
cmake -DLIBIGL_USE_STATIC_LIBRARY=OFF ..P.S. I'm not an expert of Eigen so I've no idea this comes from misusing of Eigen, a Windows bug in Eigen, or a compiler bug from Visual C++.