Ceres solver crashes the app, after throwing "Check failed: step_quality > 0.0..." error

64 views
Skip to first unread message

Anatoly Ryabchenko

unread,
Dec 1, 2024, 11:37:02 AM12/1/24
to Ceres Solver
Pretty much what the title says.

An example of the error, before crashing is:
F1201 17:25:35.770417 22568 levenberg_marquardt_strategy.cc:158] Check failed: step_quality > 0.0 (-6.39739 vs. 0)
*** Check failure stack trace: ***
Then the SIGABORT

From the stack trace, I see that the error is then happens inside the glog function:
google::LogMessage::Fail().

2 questions: 
1. What is the step quality? How can I ensure it's positive?
2. Should this crash the app or it is supposed to be a warning? 


Thank you.

Sameer Agarwal

unread,
Dec 1, 2024, 12:01:50 PM12/1/24
to ceres-...@googlegroups.com
This indicates a numerical error in computing the step size, and likely an indication of a bug in ceres.

Any chance you can share a reproduction with us?

I am not on my computer right now, when I am may also ask you to add a little bit of logging to the ceres code to better understand what's going on.

Sameer 

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ceres-solver/4e2d8d9f-88a0-4007-999b-b1d9f447fc65n%40googlegroups.com.

Anatoly Ryabchenko

unread,
Dec 19, 2024, 2:26:05 PM12/19/24
to Ceres Solver
Sorry for late reply

I have resolved the problem. There were 2 unrelated problems:
1. The numerical error happened only when I explicitly check if a point had (0.0, 0.0, 0.0) coordinates and added some very small depth to it, so that it would not create nans when rotated with a quaternion. I removed this and put the check outside.
2. There was a mistake in my code where I added parameter block outside of vector boundary, and it caused the segfault that was not detected earlier, since the memory was not actually accessed before the residual evaluation.
Reply all
Reply to author
Forward
0 new messages