From 16a698ad4abdcf77b32ec9c797cdb462eec051c4 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 19 Sep 2012 12:43:39 +0000 Subject: Fix crash when tracking in planar motion model (and maybe some other) It was an Abort() caused by check for solver result not equal to USER_ABORT. In some cases solver returns USER_ABORT due to BoundaryCheckingCallback detects coordinates does not belong to image. Somehow this callback wasn't called in previous version of Ceres and in the same case marker was jumping. Now when the callback is called it seems we could simply return failure of tracking without aborting Blender. Probably this is in fact some issue somewhere else, would double check with Keir about this. --- extern/libmv/libmv/tracking/track_region.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'extern') diff --git a/extern/libmv/libmv/tracking/track_region.cc b/extern/libmv/libmv/tracking/track_region.cc index aef448eb2b6..8973a8d0148 100644 --- a/extern/libmv/libmv/tracking/track_region.cc +++ b/extern/libmv/libmv/tracking/track_region.cc @@ -1364,7 +1364,12 @@ void TemplatedTrackRegion(const FloatImage &image1, // TODO(keir): Update the result statistics. // TODO(keir): Add a normalize-cross-correlation variant. - CHECK_NE(summary.termination_type, ceres::USER_ABORT) << "Libmv bug."; + // TODO(sergey): in previous bundled Ceres from Windows branch our callback + // wasn't called, so USER_ABORT was never happen. + // now callback is calling and in some cases it returns SOLVER_ABORT + // not sure if it's bug somewhere or we could just mark tracking + // result as failed without causing general panic + // CHECK_NE(summary.termination_type, ceres::USER_ABORT) << "Libmv bug."; if (summary.termination_type == ceres::USER_ABORT) { result->termination = TrackRegionResult::FELL_OUT_OF_BOUNDS; return; -- cgit v1.2.3