|
|
geep999 wrote:
> 1611 lcc.tested = true;
Good work in picking this up: looking at the code it's fairly clear what's
happening. Since the test (lcc.tested == false) isn't segfaulting but the
assignment is, the memory must have been freed during TraceShadowRay(). The
only thing that would cause that is a re-alloc of the cache via resize(),
which is exactly what's done in ComputeShadowColor().
Suggestion: as an experiment, try changing the initial value of the cache
(line 153) to a much larger value and see if the fault goes away. I suspect
it will (note this is not the solution, just a test: the solution is to
either avoid the need to resize, or to not keep references to the data
across calls to the trace functions).
-- Chris
Post a reply to this message
|
|