[Clam-devel] We are in RED!
JunJun
wangjun at dsp.ac.cn
Sat Jun 14 01:15:35 PDT 2008
I tried to reproduce the RED of the testfarm, by changing:
void testStoreOn()
{
const double bounds[]={90, 100, 110, 120};
DiscontinuousSegmentation segmentationEven(200, bounds, bounds+4);
......
}
into:
void testStoreOn()
{
const double bounds[]={90, 100, 110, 120};
DiscontinuousSegmentation segmentationEven(200, bounds, bounds+3);
......
}
In this case, it should throw an OffsetMissing(), right? However, it didn't, but continued the
xmldump business and output as followed:
......................................................................F............................
.............................
!!!FAILURES!!!
Test Results:
Run: 127 Failures: 1 Errors: 0
1) test: CLAMTest::DiscontinuousSegmentationTest::testStoreOn (F) line: 710
UnitTests\VisualizationTests\DiscontinuousSegmentationTest.cxx
assertion failed
- differ at index: 20
expected: <Segmentation size="4">90 100 110 120</Segmentation>
but was: <Segmentation size="2">90 100</Segmentation>
Then,
I changed the OffsetMissing related code in DiscontinuousSegmentation.hxx where the line:
if (it==end) throw OffsetMissing();
is changed into:
if (it==end) {
std::cout<<"it did throw offsetMissing!"<<std::endl;
throw OffsetMissing();
}
then I recompiled CLAM and the unittests, and then comes the expected output:
*****************************************************************
......
it did throw offsetMissing!
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'CLAM::DiscontinuousSegmentation::OffsetMissing'
what(): Odd number of segmentation points, every segment beggining must be followed by its
ending
*****************************************************************
I tried the above steps twice and confirmed that it was not random.
Another point is, even "DiscontinuousSegmentation segmentationEven(200, bounds, bounds+3)" does throw
an offsetMissing, the case for testfarm, which is "DiscontinuousSegmentation segmentationEven(200,
bounds, bounds+4)", works just fine :-(
Hope that some human being can finish reading this disordered mail, and hope the clue helps a little.
Jun
More information about the clam-devel
mailing list