RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.02k stars 186 forks source link

vector subscript out of range? #326

Closed tom-sakai601220 closed 5 years ago

tom-sakai601220 commented 5 years ago

When I run ospTutorialBouncingSpheres() debug build, Debugger suggest " Expression: vector subscript out of range

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. " void PathTracer::commit() { &areaPDF[0]<----uninitialized() }

johguenther commented 5 years ago

Thanks for reporting. I think this is a false positive, as we do not actually access the first element (even when the vector is empty). Anyway, the current implementation (for the next release) already changed this passage, thus I'll close.

crowbar27 commented 4 years ago

There is a similar one in components/ospcommon/utility/ParameterizedObject.cpp:63. &paramList[0] can be replaced by paramList.data() as in a303a25 to fix it.