|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0133 |
| Class | BUG |
| Severity | 2 |
| Status | ready |
Models: Seine/Operation
Found: 2026-11-02, feature shared-testtools (T6): SeineCallOrder without AttractorNameNet crashed in SeineOperation::SeineOperation [clone .cold] once the test creator reported the missing parameter as an error.
src/seine/SeineOperation.cpp:49 creator->GetStringParam("AttractorNameNet", m_attractorNameNet); (no default) and every getter above it run before :51-54, which say "The filter is set up before any check can throw" and call m_BridleTensionFilter.Initialize(2, tensionFilterConstant);.fhsim/src/simobject/utilities/PrintDuringExec.cpp:170-173 [[noreturn]] void PrintDuringExec::ReportError(...) { ...; throw(Exceptions(errorMessage)); }.sfh/filters/IIR: IIR::IIR() sets m_adVal, m_adLastMeasurement, m_adMeasurementDiff, m_adValueDiff to 0 but not m_adValueAdvance; IIR::~IIR() does delete[] m_adValueAdvance;.When the constructor throws before Initialize, the member m_BridleTensionFilter is destroyed and deletes an uninitialised pointer.
A missing AttractorNameNet, or any bad parameter read before line 54, crashes FhSim (segfault) instead of reporting the parameter error.
m_BridleTensionFilter.Initialize(...) first in the constructor, before any parameter getter that can throw (read TensionFilterConstant first). Local, no result change.IIR::IIR() also sets m_adValueAdvance = 0 (fhlib is not in repos/; needs an fhlib release). Fixes every user of a default-constructed IIR.Do 1 now; report 2 to fhlib.
Construct Seine/Operation with the test creator and no AttractorNameNet: expect a thrown parameter error naming AttractorNameNet, not a crash (fails today with a segfault).
None for valid input: the filter's initial state does not depend on the other parameters.