Bug 1208 - OpenWater2 fails on some machines during photon map construction
Summary: OpenWater2 fails on some machines during photon map construction
Status: RESOLVED FIXED
Alias: None
Product: DIRSIG4
Classification: Unclassified
Component: Demonstrations (show other bugs)
Version: 4.7.0-release
Hardware: Other Other
: P5 normal
Assignee: Scott D. Brown
URL:
Depends on:
Blocks:
 
Reported: 2016-01-20 12:19 EST by Adam Goodenough
Modified: 2016-01-20 12:25 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Goodenough 2016-01-20 12:19:31 EST
When generating the photon map for the OpenWater2 demo, the simulation will either crash with a segmentation fault or exit without a message on some machines. This appears to occur approximately 0.2% into the construction of the map and does so consistently on a machine that produces the error. This problem does not occur on any of the normal dirsig build machines.
Comment 1 Adam Goodenough 2016-01-20 12:25:30 EST
This issue was tracked to a rare out of bounds array access when a ray hit the outer edge of a height field. Index bounds checks were not properly in place for the "cell" storage (as opposed to the height field point storage). 

Since this appeared to be limited to precision based errors (i.e. hit points on or just barely passed the edge) the fix was to add a range check and push such out of bounds indexes into the last cell in each dimension. No significant behavioral differences are expected and the simulation seems to run cleanly on available architectures.