Skip to content
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

App crashes when cloning air loop containing AirLoopHVAC:UnitarySystem #351

Closed
eringold opened this issue May 27, 2021 · 4 comments
Closed
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@eringold
Copy link
Contributor

Issue overview

Maybe related to #217

Current Behavior

App crashes (closes with no message) when cloning an AirLoopHVAC with AirLoopHVAC:UnitarySystem on supply side.

Steps to Reproduce

  1. Create empty Air Loop
  2. Drag in AirLoopHVAC:UnitarySystem (I used just DX coil UnitarySystem, so there's no loop connections) to supply side
  3. Click 'x2' button
  4. App will close

Possible Solution

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): Windows 10
  • Version of OpenStudioApplication (if using an intermediate build, include SHA): 1.2.0-alpha+e47cbb1e9c
@eringold eringold added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label May 27, 2021
@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2021

Ok, this seems like an App problem, can't reproduce in the CLI

[1] OSApp-build(main)> m = Model.new
=> #<OpenStudio::Model::Model:0x000056515b4af850 @__swigtype__="_p_openstudio__model__Model">
[2] OSApp-build(main)> a = AirLoopHVAC.new(m)
=> #<OpenStudio::Model::AirLoopHVAC:0x000056515b2f2058 @__swigtype__="_p_openstudio__model__AirLoopHVAC">
[3] OSApp-build(main)> unitary = AirLoopHVACUnitarySystem.new(m)
=> #<OpenStudio::Model::AirLoopHVACUnitarySystem:0x000056515b0969a8 @__swigtype__="_p_openstudio__model__AirLoopHVACUnitarySystem">
[4] OSApp-build(main)> unitary.addToNode(a.supplyOutletNode)
=> true
[5] OSApp-build(main)> a.clone(m)
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:AirLoopHVAC' and named 'Air Loop HVAC 1' to 'Air Loop HVAC 2' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:Schedule:Constant' and named 'Always On Discrete' to 'Always On Discrete 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:AirLoopHVAC:UnitarySystem' and named 'Air Loop HVAC Unitary System 1' to 'Air Loop HVAC Unitary System 2' to avoid a name conflict upon WorkspaceObject addition.
=> #<OpenStudio::Model::ModelObject:0x000056515a3d4f58 @__swigtype__="_p_openstudio__model__ModelObject">

@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2021

It looks like an orphaned node... I've definitely seen something similar in the past:

(lldb) bt
* thread #1, name = 'OpenStudioApp', stop reason = hit program assert
    frame #0: 0x00007fffe8d0e18b libc.so.6`raise + 203
    frame #1: 0x00007fffe8ced859 libc.so.6`abort + 299
    frame #2: 0x00007fffe8ced729 libc.so.6`___lldb_unnamed_symbol8$$libc.so.6 + 15
    frame #3: 0x00007fffe8cfef36 libc.so.6`__assert_fail + 70
  * frame #4: 0x0000555555ff461f OpenStudioApp`boost::optional<openstudio::model::Loop>::get(this=0x00007fffffffb5c0) at optional.hpp:1212:40
    frame #5: 0x0000555555febf20 OpenStudioApp`openstudio::SupplySideItem::SupplySideItem(this=0x00005555599ccce0, parent=0x0000555559a45040, supplyInletNode=0x00007fffffffb680, supplyOutletNodes=size=1) at GridItem.cpp:2947:44
    frame #6: 0x0000555555fd9e0c OpenStudioApp`openstudio::SystemItem::SystemItem(this=0x0000555559a45030, loop=Loop @ 0x00007fffffffb870, loopScene=0x0000555559b98400) at GridItem.cpp:1180:81
    frame #7: 0x00005555561ea9d7 OpenStudioApp`openstudio::LoopScene::layout(this=0x0000555559b98400) at LoopScene.cpp:81:57
    frame #8: 0x00005555561ebc69 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (openstudio::LoopScene::*)()>::call(f=8c a8 1e 56 55 55 00 00 00 00 00 00 00 00 00 00, o=0x0000555559b98400, arg=0x0000555559c7f758)(), openstudio::LoopScene*, void**) at qobjectdefs_impl.h:152:20
    frame #9: 0x00005555561ebbe8 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::LoopScene::*)()>::call<QtPrivate::List<>, void>(f=8c a8 1e 56 55 55 00 00 00 00 00 00 00 00 00 00, o=0x0000555559b98400, arg=0x0000555559c7f758)(), openstudio::LoopScene*, void**) at qobjectdefs_impl.h:185:95
    frame #10: 0x00005555561eb9cb OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::LoopScene::*)(), QtPrivate::List<>, void>::impl(which=1, this_=0x0000555559cc0d30, r=0x0000555559b98400, a=0x0000555559c7f758, ret=0x0000000000000000) at qobjectdefs_impl.h:418:49
    frame #11: 0x00007fffe9509cf3 libQt5Core.so.5`QObject::event(QEvent*) + 211
    frame #12: 0x00007fffea7cd8bb libQt5Widgets.so.5`QGraphicsScene::event(QEvent*) + 1179
    frame #13: 0x00007fffea4ca13c libQt5Widgets.so.5`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
    frame #14: 0x00007fffea4d0d10 libQt5Widgets.so.5`QApplication::notify(QObject*, QEvent*) + 688
    frame #15: 0x0000555555f4d66b OpenStudioApp`openstudio::OSAppBase::notify(this=0x00007fffffffc8b0, receiver=0x0000555559b98400, e=0x0000555559c7f710) at OSAppBase.cpp:78:30
    frame #16: 0x0000555555f20d41 OpenStudioApp`openstudio::OpenStudioApp::notify(this=0x00007fffffffc8b0, receiver=0x0000555559b98400, event=0x0000555559c7f710) at OpenStudioApp.cpp:1073:27
    frame #17: 0x00007fffe94da8f8 libQt5Core.so.5`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 264
    frame #18: 0x00007fffe94dd962 libQt5Core.so.5`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 546
    frame #19: 0x00007fffe9536a83 libQt5Core.so.5`postEventSourceDispatch(_GSource*, int (*)(void*), void*) + 19
    frame #20: 0x00007fffe472917d libglib-2.0.so.0`g_main_context_dispatch + 637
    frame #21: 0x00007fffe4729400 libglib-2.0.so.0`___lldb_unnamed_symbol197$$libglib-2.0.so.0 + 528
    frame #22: 0x00007fffe47294a3 libglib-2.0.so.0`g_main_context_iteration + 51
    frame #23: 0x00007fffe953611c libQt5Core.so.5`QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 92
    frame #24: 0x00005555561bc3d2 OpenStudioApp`openstudio::HVACSystemsController::update(this=0x0000555557875780) at HVACSystemsController.cpp:337:42
    frame #25: 0x00005555561dac75 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (openstudio::HVACSystemsController::*)()>::call(f=94 c0 1b 56 55 55 00 00 00 00 00 00 00 00 00 00, o=0x0000555557875780, arg=0x00005555596cbd58)(), openstudio::HVACSystemsController*, void**) at qobjectdefs_impl.h:152:20
    frame #26: 0x00005555561d818b OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::HVACSystemsController::*)()>::call<QtPrivate::List<>, void>(f=94 c0 1b 56 55 55 00 00 00 00 00 00 00 00 00 00, o=0x0000555557875780, arg=0x00005555596cbd58)(), openstudio::HVACSystemsController*, void**) at qobjectdefs_impl.h:185:95
    frame #27: 0x00005555561d3f19 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::HVACSystemsController::*)(), QtPrivate::List<>, void>::impl(which=1, this_=0x0000555559bd1620, r=0x0000555557875780, a=0x00005555596cbd58, ret=0x0000000000000000) at qobjectdefs_impl.h:418:49
    frame #28: 0x00007fffe9509cf3 libQt5Core.so.5`QObject::event(QEvent*) + 211
    frame #29: 0x00007fffea4ca13c libQt5Widgets.so.5`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
    frame #30: 0x00007fffea4d0d10 libQt5Widgets.so.5`QApplication::notify(QObject*, QEvent*) + 688
    frame #31: 0x0000555555f4d66b OpenStudioApp`openstudio::OSAppBase::notify(this=0x00007fffffffc8b0, receiver=0x0000555557875780, e=0x00005555596cbd10) at OSAppBase.cpp:78:30
    frame #32: 0x0000555555f20d41 OpenStudioApp`openstudio::OpenStudioApp::notify(this=0x00007fffffffc8b0, receiver=0x0000555557875780, event=0x00005555596cbd10) at OpenStudioApp.cpp:1073:27
    frame #33: 0x00007fffe94da8f8 libQt5Core.so.5`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 264
    frame #34: 0x00007fffe94dd962 libQt5Core.so.5`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 546
    frame #35: 0x00007fffe9536a83 libQt5Core.so.5`postEventSourceDispatch(_GSource*, int (*)(void*), void*) + 19
    frame #36: 0x00007fffe472917d libglib-2.0.so.0`g_main_context_dispatch + 637
    frame #37: 0x00007fffe4729400 libglib-2.0.so.0`___lldb_unnamed_symbol197$$libglib-2.0.so.0 + 528
    frame #38: 0x00007fffe47294a3 libglib-2.0.so.0`g_main_context_iteration + 51
    frame #39: 0x00007fffe953611c libQt5Core.so.5`QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 92
    frame #40: 0x00007fffe94d930a libQt5Core.so.5`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 266
    frame #41: 0x00007fffe94e22b3 libQt5Core.so.5`QCoreApplication::exec() + 131
    frame #42: 0x0000555555f13c15 OpenStudioApp`main(argc=1, argv=0x00007fffffffcc78) at main.cpp:245:28
    frame #43: 0x00007fffe8cef0b3 libc.so.6`__libc_start_main + 243
    frame #44: 0x0000555555f12b0e OpenStudioApp`_start + 46

@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2021

Yeah, actually it is a SDK issue. I can crash the app only by using the CLI to prepare the model

[1] OSApp-build(main)> m = Model.new; a = AirLoopHVAC.new(m); unitary = AirLoopHVACUnitarySystem.new(m); unitary.addToNode(a.supplyOutletNode)
=> true
[2] OSApp-build(main)> a2 = a.clone(m).to_AirLoopHVAC.get
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:AirLoopHVAC' and named 'Air Loop HVAC 1' to 'Air Loop HVAC 2' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:Schedule:Constant' and named 'Always On Discrete' to 'Always On Discrete 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:AirLoopHVAC:UnitarySystem' and named 'Air Loop HVAC Unitary System 1' to 'Air Loop HVAC Unitary System 2' to avoid a name conflict upon WorkspaceObject addition.
=> #<OpenStudio::Model::AirLoopHVAC:0x00005623c414db68 @__swigtype__="_p_openstudio__model__AirLoopHVAC">

[4] OSApp-build(main)> m.save('2cli.osm')

@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2021

Moved to NREL/OpenStudio#4335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

2 participants