You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Program will crash if user tries to change a model parameter that does not exist, if a variable of the same name exists locally in HCOM.
To Reproduce
Open a new model without a system parameter named "x"
x = 5
chpa x 3
Program will crash
Expected behavior
Show some clever error message.
The text was updated successfully, but these errors were encountered:
//If no parameters found, try if component name can be evaluated by component index instead
if(parameterNames.isEmpty())
{
evaluateExpression(splitCmd[0].section(".",0,0));
if(mAnsType == Scalar)
{
QString compName = pSystem->getModelObjects().at(mAnsScalar)->getName();
splitCmd[0].replace(0, splitCmd[0].section(".",0,0).size(), compName);
getParameters(splitCmd[0], parameterNames);
}
}
I dont know either, get rid of it.
Probably some ancient stuff, it is not possible for the user to expect at which index in the pointer vector a particular component resides.
Yes, I noticed :) It might have been related to my multicore benchmark models, which were autogenerated by HCOM and had very many components of the same type. But it is useless today, so I will remove it.
Describe the bug
Program will crash if user tries to change a model parameter that does not exist, if a variable of the same name exists locally in HCOM.
To Reproduce
Expected behavior
Show some clever error message.
The text was updated successfully, but these errors were encountered: