-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoilCoolingDX::clone crashes when called with another model #4544
Comments
backtrace: (lldb) bt
* thread #1, name = 'openstudio_mode', stop reason = hit program assert
frame #0: 0x00007fffefc4903b libc.so.6`raise + 203
frame #1: 0x00007fffefc28859 libc.so.6`abort + 299
frame #2: 0x00007fffefc28729 libc.so.6`___lldb_unnamed_symbol8$$libc.so.6 + 15
frame #3: 0x00007fffefc3a006 libc.so.6`__assert_fail + 70
* frame #4: 0x0000555555e7029e openstudio_model_tests`boost::assertion_failed(expr="result.size() > 0u", function="virtual openstudio::model::ModelObject openstudio::model::detail::ModelObject_Impl::clone(openstudio::model::Model) const", file="/media/DataExt4/Software/Others/OpenStudio/src/model/ModelObject.cpp", line=602) at Assert.hpp:61:3
frame #5: 0x00007ffff4191e74 libopenstudiolib.so`openstudio::model::detail::ModelObject_Impl::clone(this=0x0000555557224760, model=Model @ 0x00007fffffffc3a0) const at ModelObject.cpp:602:7
frame #6: 0x00007ffff48f9008 libopenstudiolib.so`openstudio::model::detail::HVACComponent_Impl::clone(this=0x0000555557224760, model=Model @ 0x00007fffffffc420) const at HVACComponent.cpp:404:43
frame #7: 0x00007ffff4c96b22 libopenstudiolib.so`openstudio::model::detail::StraightComponent_Impl::clone(this=0x0000555557224760, model=Model @ 0x00007fffffffc4d0) const at StraightComponent.cpp:175:55
frame #8: 0x00007ffff44bb140 libopenstudiolib.so`openstudio::model::detail::CoilCoolingDX_Impl::clone(this=0x0000555557224760, model=Model @ 0x00007fffffffc540) const at CoilCoolingDX.cpp:112:49
frame #9: 0x00007ffff4c9743c libopenstudiolib.so`openstudio::model::StraightComponent::clone(this=0x00007fffffffc600, model=Model @ 0x00007fffffffc660) const at StraightComponent.cpp:224:66
frame #10: 0x0000555555d26ea1 openstudio_model_tests`ModelFixture_CoilCoolingDX_cloneOtherModel_Test::TestBody(this=0x00005555571cfec0) at CoilCoolingDX_GTest.cpp:280:26
frame #11: 0x0000555556a0fb4e openstudio_model_tests`void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(object=0x00005555571cfec0, method=21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, location="the test body")(), char const*) at gtest.cc:2433:27
frame #12: 0x0000555556a094b5 openstudio_model_tests`void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(object=0x00005555571cfec0, method=21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, location="the test body")(), char const*) at gtest.cc:2469:52
frame #13: 0x00005555569e5ade openstudio_model_tests`testing::Test::Run(this=0x00005555571cfec0) at gtest.cc:2508:50
frame #14: 0x00005555569e64c9 openstudio_model_tests`testing::TestInfo::Run(this=0x00005555571074b0) at gtest.cc:2684:14
frame #15: 0x00005555569e6c1f openstudio_model_tests`testing::TestSuite::Run(this=0x00005555570df080) at gtest.cc:2816:31
frame #16: 0x00005555569f2d6f openstudio_model_tests`testing::internal::UnitTestImpl::RunAllTests(this=0x00005555570dede0) at gtest.cc:5338:47
frame #17: 0x0000555556a10f4d openstudio_model_tests`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x00005555570dede0, method=52 29 9f 56 55 55 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2433:27
frame #18: 0x0000555556a0a509 openstudio_model_tests`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x00005555570dede0, method=52 29 9f 56 55 55 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2469:52
frame #19: 0x00005555569f1583 openstudio_model_tests`testing::UnitTest::Run(this=0x0000555557071580) at gtest.cc:4925:55
frame #20: 0x00005555569c8a02 openstudio_model_tests`RUN_ALL_TESTS() at gtest.h:2473:49
frame #21: 0x00005555569c8984 openstudio_model_tests`main(argc=1, argv=0x00007fffffffcbd8) at gmock_main.cc:63:23
frame #22: 0x00007fffefc2a0b3 libc.so.6`__libc_start_main + 243
frame #23: 0x0000555555accd2e openstudio_model_tests`_start + 46 |
This boil dows to the fact that we have a situation where we have nested
The real issue is that m = Model.new
spd_1 = CoilCoolingDXCurveFitSpeed.new(m)
op_mode_base = CoilCoolingDXCurveFitOperatingMode.new(m)
performance_base = CoilCoolingDXCurveFitPerformance.new(m, op_mode_base)
cooling_coil_dx_1 = CoilCoolingDX.new(m, performance_base)
OpenStudio::Model::getRecursiveResourceSubTrees(cooling_coil_dx_1).map{|r| r.map{|c| c.nameString}}
=> [["Always On Discrete"],
["Coil Cooling DX Curve Fit Performance 1",
"Coil Cooling DX Curve Fit Operating Mode 1"],
["OnOff"],
["Coil Cooling DX Curve Fit Operating Mode 1"]] As you can see, the issue is the |
Test and confirm this is fixed with latest installer. Confirm there is a unit test |
Issue overview
Cloning a CoilCoolingDX crashes when it's cloned to another model.
Steps to Reproduce
Possible Solution
A double clone or mishandling of a required children is the likely cause.
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
Reported by @j-lorrey
The text was updated successfully, but these errors were encountered: