steam-audio icon indicating copy to clipboard operation
steam-audio copied to clipboard

Crash when baking reflection probes with `IPL_BAKEDDATAVARIATION_REVERB`

Open lachbr opened this issue 3 years ago • 1 comments

I'm encountering a segfault when trying to bake reflection probes with IPL_BAKEDDATAVARIATION_REVERB. The bake begins and runs for a second or two, spewing this warning constantly: Warning: Simulating reflections for 1 sources, which is more than the max (0). Some sources will be ignored., before eventually crashing without finishing.

This is what my bake parameters look like:

IPLBakedDataIdentifier identifier{};
identifier.type = IPL_BAKEDDATATYPE_REFLECTIONS;
identifier.variation = IPL_BAKEDDATAVARIATION_REVERB;
IPLReflectionsBakeParams bake_params{};
bake_params.scene = scene;
bake_params.sceneType = IPL_SCENETYPE_DEFAULT;
bake_params.identifier = identifier;
bake_params.bakeFlags = IPL_REFLECTIONSBAKEFLAGS_BAKEPARAMETRIC;
bake_params.probeBatch = batch;
bake_params.numRays = 32768;
bake_params.numDiffuseSamples = 1024;
bake_params.numBounces = 64;
bake_params.simulatedDuration = 2.0f;
bake_params.savedDuration = 2.0f;
bake_params.order = 2;
bake_params.numThreads = 4;
bake_params.irradianceMinDistance = 1.0f;
iplReflectionsBakerBake(context, &bake_params, nullptr, nullptr);

Using IPL_BAKEDDATAVARIATION_STATICSOURCE/LISTENER with the rest of the parameters unchanged bakes fine and doesn't crash or spew any warnings.

Is the warning itself related to something I'm doing incorrectly or a parameter I'm not specifying? I don't see anything special in the documentation for the reverb variation vs static source/listener.

Thanks

lachbr avatar Dec 16 '21 11:12 lachbr

For the record, this is on v4.0.3 of the C API, and since phonon.dll doesn't have debug symbols, I can't provide a meaningful stack trace.

lachbr avatar Dec 16 '21 19:12 lachbr

We have just released v4.3.0 (https://github.com/ValveSoftware/steam-audio/releases/tag/v4.3.0), which fixes this issue.

lakulish avatar Jul 17 '23 18:07 lakulish