-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
infinity loop in function CirclesGridFinder::getFirstCorner() in circlesgrid.cpp #18713
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugcategory: calib3dconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
Hi, I find that there is an infinity loop bug inside the CirclesGridFinder::getFirstCorner() in circlesgrid.cpp :
bool isInsider[cornersCount];
for (size_t i = 0; i < cornersCount; i++) {
isInsider[i] = doesIntersectionExist(largeSegments[i], smallSegments);
}
int cornerIdx = 0;
bool waitOutsider = true;
for (;;) {
if (waitOutsider) {
if (!isInsider[(cornerIdx + 1) % cornersCount])
waitOutsider = false;
} else {
if (isInsider[(cornerIdx + 1) % cornersCount])
break;
}
cornerIdx = (cornerIdx + 1) % cornersCount;
}
if isInsider[] is all false, then this will become an infinity loop, that's where my program stuck.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: calib3dconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete