Closed johnhaddon closed 7 months ago
Did a bit more digging. The crash only occurs when not providing the "index"
output array which the language docs imply is optional (and which can be omitted fine in non-batched mode), but which BatchedRendererServices claims is mandatory. The crash then occurs when writing via an invalid pointer in default_pointcloud_search()
.
So this is OK :
point points[5];
int indices[5];
pointcloud_search( filename, pW, 100, 5, 1, "position", points, "index", indices );
But this crashes :
point points[5];
pointcloud_search( filename, pW, 100, 5, 1, "position", points );
@AlexMWells Can you take a look at this?
I added an additional unit test and can confirm it does indeed crash:
#### Error: this command failed:
2/2 Test #999: pointcloud.batched.opt ...........***Failed 3.47 sec
/bin/sh: line 1: 138828 Aborted (core dumped) testshade --center --vary_pdxdy -g 256 256 -t 1 -param radius 0.1 -od uint8 -o Cout out_rdcloud_varying_no_index.tif rdcloud_varying_no_index >> out.txt 2>> out.txt
I'll look at the implementation...
I created https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1753
to address the crash
Problem
Expected behavior:
pointcloud_search()
returns the same result in batched shading mode as in regular mode.Actual behavior:
pointcloud_search()
crashes in batched shading mode with the following stack trace :Steps to Reproduce
pointcloud_search()
and run it in batched mode.(These repro steps are a bit lame - I can probably come up with something more specific if the bug doesn't immediately jump out at you).
Versions