[PINPOINT-462]  Solve Crash (low-level) using UCAC3 catalog
Type Bug
Priority High
Severity Major
Component Astrometric Engine
Fixed In Version [5.1b5.1b
Versions Affected [5.1a5.1a
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 10/5/2010

Description
Reported by John Smith. He supplied an image and VB.NET code for repro scenario. The image is huge, so I didn't attach it here. The code is generic plate solving using UCAC3.

Comments
10/5/2010 9:17:25 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/pinpoint
SVN Revision 54
Affected files /trunk/HTML Help/doc/PinPoint.chm (Modified)
/trunk/HTML Help/doc/PinPointRELNOTES.htm (Modified)
/trunk/engine/PinPoint.rc (Modified)
/trunk/engine/usno/readucac3.cpp (Modified)
/trunk/setup/PinPointSetup.vdproj (Modified)
Check-in comment Engine 5.1.6 with UCAC3 bug fix, setup package now 5.1.6 (for 5.1b). This needs to go out to a couple of people and be slipstreamed. GEM:462
10/5/2010 8:28:54 AM   Bob Denny
Found it. Edge condition when doing multiple RA ranges, when the start of one range is exactly 0.0 RA. The bin was calculated with a negative number due to the truncating integer arithmetic. Very simple fix to clamp the bin at 0, low risk. Doing regression testing now.
10/5/2010 7:49:34 AM   Bob Denny
Reproduced the error.

Some sort of edge condition in readucac3/get_ucac3_stars, may be related to the ra-range bridging. The physical cause is a buffer overrun reading star records, the number of records to read came out negative! This happened with 'rarange' (# or ranges to read) = 2, during the first pass through the loop.