-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eigen assert errors (Clang + Visual Studio 2019) #4
Comments
Hi, thank you for trying out the software on OS X and creating the respective pull request for clang :) The software was developed on Windows using the Visual Studio 2017 compiler and I did not have a chance to test it on other platforms. All the inputs/outputs in the directory run fine under these conditions, but I encounter similar issues with the 2019 compiler, which is probably related to the one you are facing with Clang. I am very sorry about this. Support for different platform is something worth addressing. To do so the most effective way is probably to (1) set up a unit test, (2) turn on more compiler warnings (3) debug and repeat. I am keeping this issue opened as reference (editing the title) and will merge your pull request when I get to do the above, which won't be in the immediate future, but will try to give it a shot in the next weeks. |
I did find what I'm pretty sure was a bug (added to my pull request #2 ) relating to bitwise operator precedence. Alas, it still crashes unpredictably. For the two times I have managed to produce output, the results differ: |
It's not lack of determinism in the algorithm, there is a bug in the code preventing the curve optimization stage to run. I obtain the same result by commenting out multi_polygon.cpp:256 (_solve_curves()). If you look closely, the per-corner primitive classification are the same between the two results, but the curves in the bottom row correspond to the initial guess. As you pointed out in the first issue, the crashes you were obtaining were exactly in the CurveSequenceFitter::solve(), where the global optimization happens, hence the correlation between the two events. I presume you managed to obtain the results by running it multiple times on the code compiled on Clang/OS X. As discussed above this is problem needs to be further investigated. I did not test the code on multiple platforms (no doubt I should have done that) and it's unfortunate that it's not showing up in VS2017. I will do my best to investigate it soon, after I've set up a simple test to make sure that outputs remain unchanged between commits. |
According to my research on the subject, the particular eigen assert error I get can be caused by a non-triangular sparse matrix being passed to the sparse triangular solver. |
For a single simple test example, (data/binary_input/apple-32/input.png), polyfit will sometimes manage to run and produce the desired output, but most of the time it will crash due to an eigen assert in the triangular solver.
According to my debug trace, this happens due to CurveSequenceFitter::solve(), called from MultiPolygonTracer::trace(). Is this software not yet stable, or am I doing something wrong (my platform is OS X)?
The text was updated successfully, but these errors were encountered: