Skip to content

Invalid Crankcase Heater Capacity Function of Outdoor Temperature Curve Name will crash #10959

@mjwitte

Description

@mjwitte

Issue overview

Crankcase Heater Capacity Function of Outdoor Temperature Curve Name was added to 9(?) objects in #9949.
If an invalid curve name is entered in this field there will be a crash. Here's an example of the code from DXCoils.cc

https://github.com/NREL/EnergyPlus/blob/d2c044e29a2d5fb3632473e85f039af2e796db4f/src/EnergyPlus/DXCoils.cc#L1238-L1248

        // A12, \field Crankcase Heater Capacity Function of Outdoor Temperature Curve Name
        if (!lAlphaBlanks(12)) {
            thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(12));
            ErrorsFound |= Curve::CheckCurveDims(state,
                                                 thisDXCoil.CrankcaseHeaterCapacityCurveIndex, // Curve index
                                                 {1},                                          // Valid dimensions
                                                 RoutineName,                                  // Routine name
                                                 CurrentModuleObject,                          // Object Type
                                                 thisDXCoil.Name,                              // Object Name
                                                 cAlphaFields(12));                            // Field Name
        }

If the curve name is not found, CrankcaseHeaterCapacityCurveIndex is zero and CheckCurveDims will fail with an array bounds error. Need to check for zero first and throw a severe error.

Search for CrankcaseHeaterCapacityCurveIndex = to find every instance of this.

Operating System (Multiple choices)

Any

Operating System Version

Any

Version of EnergyPlus

25.1.0-IOFreeze

Unmethours link or helpdesk ticket number

Helpdesk ticket 16849

Defect file

Here's a test file for one object type, Coil:Cooling:DX:CurveFit:Performance

10989-DXCoilSystemAuto-BadCurve.idf.txt

Metadata

Metadata

Assignees

Labels

TriageIssue needs to be assessed and labeled, further information on reported might be neededUnconfirmedDefectDefect has not yet confirmed to be an actual issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions