Skip to content

[RBF] Multi quaternion imput cause crash #9

@RDelet

Description

@RDelet

I noticed a crash when you have a setup with more than one quaternion inputs.
I share my test scene -> test_rbf.zip

In the code the crash comes from LinearRegressionSolver::solve when we exit the function. This is due to a memory overflow of inputDistance with the three nested for loops.
In my example, I have two quaternion inputs. theta_.cols() has a size of 8 but since we iterate twice over inputQuatCount and also over sampleCount we should have a size of 16.

Theta_ is set in LinearRegressionSolver::setFeatures with size of: valueCols + sampleCount * 2 * inputQuatCount.
I can avoid this crash with valueCols + sampleCount * 2 * (inputQuatCount * inputQuatCount) but in this case the second input do not have any modification on output value.

Since the code allows for multiple quaternion inputs to be connected, I'm thinking it's possible to have this kind of scenario, but given the result, I'm wondering if it's really what we want.
I'll try to dig a little deeper into the subject, but if you have any ideas on how to solve it simply, or just to see if it's not possible, that would be a great help in advance.

Thank you in advance for your response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions