Closed GoogleCodeExporter closed 9 years ago
A bit fixed patch.
Original comment by popov...@gmail.com
on 7 Sep 2012 at 5:44
Attachments:
Hi Sergey,
Thank you very much for the patch. Could you please submit the patch via
gerrit? That way you get the credit, we get the signed CLA and the worflow is
simpler?
The details on using the gerrit workflow are at
http://code.google.com/p/ceres-solver/wiki/DevelopingCeres
Sameer
Original comment by sameerag...@google.com
on 7 Sep 2012 at 5:49
Hi Sergey,
I have pushed your change to levenberg_marquardt_test.cc upstream. The changes
to evaluator_test.cc should not be needed. Because we explicitly resize these
vectors inside Evaluator::Evaluate. If they are being resized incorrectly, then
we have a bigger problem. Could you send me a crash log of the failing test, as
I am unable to reproduce it on my end.
Thanks,
Sameer
Original comment by sameerag...@google.com
on 8 Sep 2012 at 12:07
Hi Sameer,
Thanks for the information. I have investigated the issue with debugger and
found that evaluator_test crushes only in debug mode when residuals[0] is
called for the vector of zero size (please, see the patch in attachment). This
is debug assertion in std::vector::operator[], not a segfault actually :).
My build environment is Win7 32 bit, MSVC 10.
Regards,
Sergey
Original comment by popov...@gmail.com
on 8 Sep 2012 at 9:32
Attachments:
evaluator_test error message
Original comment by popov...@gmail.com
on 8 Sep 2012 at 3:07
Attachments:
Hi Sergey,
Thanks for following this up.
I put an explicit check for the lengths of these vectors, and I still can't
trigger this assert.
Could you point me to the particular test case inside evaluator_test thats
causing this failure?
Thanks,
Sameer
Original comment by sameerag...@google.com
on 8 Sep 2012 at 7:06
Hi Sameer,
The evaluator_test failure is MSVC specific. I have found that
std::vector<T>::operator[] implementation of the libstdc++ library that comes
with GCC does not check subscript range. Probably this is the reason why you
can't trigger the assert. The name of the test case that causing failure is
"StaticEvaluateTest.MultipleParameterAndResidualBlocks". The patch.diff patch
fixes the bug.
Regards,
Sergey
Original comment by popov...@gmail.com
on 9 Sep 2012 at 12:41
Hi Sergey,
I understand that it is a MSVC specific failure. What I was curious about was,
the conditions in the test code that were causing this failure. Thanks for
tracking down the name the failing test. I will take a closer look.
Sameer
Original comment by sameerag...@google.com
on 9 Sep 2012 at 2:12
okay, I think I was looking at your patch wrong earlier.
You are right about the fix. I am pushing the changes upstream.
Thanks for your patience.
Sameer
Original comment by sameerag...@google.com
on 9 Sep 2012 at 2:18
Original issue reported on code.google.com by
popov...@gmail.com
on 7 Sep 2012 at 5:28Attachments: