openstudiocoalition / OpenStudioApplication

The OpenStudio Application is a fully featured graphical interface to OpenStudio models including envelope, loads, schedules, and HVAC.
https://openstudiocoalition.org
Other
132 stars 25 forks source link

Space Types library item collapses after dragging in Space Type from library #116

Closed macumber closed 1 week ago

macumber commented 7 years ago

Have to keep opening this to drag in more space types

ljbrackney commented 7 years ago

Agree. I believe Construction Sets have the same issue. Irritating.

ljbrackney commented 6 years ago

This needs to be escalated. Now that we're adding larger (DEER) libraries that are needed in real workflows, this becomes a significant PITA.

jmarrec commented 3 years ago

Still true as of v1.2.0-rc5

jmarrec commented 2 years ago

I narrowed it down, this is what triggers it: https://github.com/openstudiocoalition/OpenStudioApplication/blob/7227462c53fd50e9d3e9d9c2209dc0ded90654f6/src/openstudio_lib/ModelObjectListView.cpp#L56-L83

partial backtrace:

(lldb) c
Process 45337 resuming
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.29
    frame #0: 0x0000000100633cc4 OpenStudioApp`openstudio::OSDropZone::onDrop(this=0x000060000304d9e0, itemId=0x000000016fdf9de8) at OSDropZone.cpp:252:20
   249  }
   250
   251  void OSDropZone::onDrop(const OSItemId& itemId) {
-> 252    emit itemDropped(itemId);
   253  }
   254
   255  void OSDropZone::setItemIds(const std::vector<OSItemId>& itemIds) {
Target 0: (OpenStudioApp) stopped.
(lldb) c
Process 45337 resuming
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.30
    frame #0: 0x00000001006668ac OpenStudioApp`openstudio::OSVectorController::onDrop(this=0x0000600000397740, itemId=0x000000016fdf9de8) at OSVectorController.cpp:60:58
   57
   58   void OSVectorController::onReplaceItem(OSItem* currentItem, const OSItemId& replacementItemId) {}
   59
-> 60   void OSVectorController::onDrop(const OSItemId& itemId) {}
   61
   62   void OSVectorController::onMakeNewItem() {}
   63
Target 0: (OpenStudioApp) stopped
(lldb) c
Process 45337 resuming
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:SpaceType' and named '189.1-2009 - Office - BreakRoom - CZ1-3' to '189.1-2009 - Office - BreakRoom - CZ1-3 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:People' and named '189.1-2009 - Office - BreakRoom - CZ1-3 People' to '189.1-2009 - Office - BreakRoom - CZ1-3 People 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:Lights' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Lights' to '189.1-2009 - Office - BreakRoom - CZ1-3 Lights 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:ElectricEquipment' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Electric Equipment' to '189.1-2009 - Office - BreakRoom - CZ1-3 Electric Equipment 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:SpaceInfiltration:DesignFlowRate' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Infiltration' to '189.1-2009 - Office - BreakRoom - CZ1-3 Infiltration 1' to avoid a name conflict upon WorkspaceObject addition.
[OSGridView] <-2> Creating cell wrapper row=2, col=0
[OSGridView] <-2> Creating cell wrapper row=2, col=1
[OSGridView] <-2> Creating cell wrapper row=2, col=2
[OSGridView] <-2> Creating cell wrapper row=2, col=3
[OSGridView] <-2> Creating cell wrapper row=2, col=4
[OSGridView] <-2> Creating cell wrapper row=2, col=5
[OSGridView] <-2> Creating cell wrapper row=2, col=6
[OSGridView] <-2> Creating cell wrapper row=2, col=7
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 22.1
    frame #0: 0x00000001005f0a58 OpenStudioApp`openstudio::OSCollapsibleItemList::onItemSelected(this=0x000060000338c820, item=0x000000016aa23920) at OSCollapsibleItemList.cpp:216:16
   213  }
   214
   215  void OSCollapsibleItemList::onItemSelected(OSItem* item) {
-> 216    QLayoutItem* layoutItem = nullptr;
   217    OSCollapsibleItem* collapsibleItem = nullptr;
   218
   219    for (int i = 0; i < m_vLayout->count(); ++i) {
Target 0: (OpenStudioApp) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 22.1
  * frame #0: 0x00000001005f0a58 OpenStudioApp`openstudio::OSCollapsibleItemList::onItemSelected(this=0x000060000338c820, item=0x000000016aa23920) at OSCollapsibleItemList.cpp:216:16
    frame #1: 0x00000001005f7648 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<openstudio::OSItem*>, void, void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*)>::call(f=3c 0a 5f 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000338c820, arg=0x000000016fdf8e18)(openstudio::OSItem*), openstudio::OSCollapsibleItemList*, void**) at qobjectdefs_impl.h:171:13
    frame #2: 0x00000001005f75a8 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*)>::call<QtPrivate::List<openstudio::OSItem*>, void>(f=3c 0a 5f 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000338c820, arg=0x000000016fdf8e18)(openstudio::OSItem*), openstudio::OSCollapsibleItemList*, void**) at qobjectdefs_impl.h:208:13
    frame #3: 0x00000001005f74d8 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*), QtPrivate::List<openstudio::OSItem*>, void>::impl(which=1, this_=0x00006000003bb8c0, r=0x000060000338c820, a=0x000000016fdf8e18, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #4: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb8c0, r=0x000060000338c820, a=0x000000016fdf8e18) at qobjectdefs_impl.h:399:51 [opt]
    frame #5: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x0000600002cea780, signal_index=8, argv=0x000000016fdf8e18) at qobject.cpp:3919:26 [opt]
    frame #6: 0x00000001012e3d00 OpenStudioApp`openstudio::OSCollapsibleItem::itemSelected(this=0x0000600002cea780, _t1=0x000000016aa23920) at moc_OSCollapsibleItem.cpp:265:5
    frame #7: 0x00000001005ee710 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<openstudio::OSItem*>, void, void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*)>::call(f=a0 3c 2e 01 01 00 00 00 00 00 00 00 00 00 00 00, o=0x0000600002cea780, arg=0x000000016fdf9078)(openstudio::OSItem*), openstudio::OSCollapsibleItem*, void**) at qobjectdefs_impl.h:171:13
    frame #8: 0x00000001005ee670 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*)>::call<QtPrivate::List<openstudio::OSItem*>, void>(f=a0 3c 2e 01 01 00 00 00 00 00 00 00 00 00 00 00, o=0x0000600002cea780, arg=0x000000016fdf9078)(openstudio::OSItem*), openstudio::OSCollapsibleItem*, void**) at qobjectdefs_impl.h:208:13
    frame #9: 0x00000001005ee5a0 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*), QtPrivate::List<openstudio::OSItem*>, void>::impl(which=1, this_=0x00006000003bb780, r=0x0000600002cea780, a=0x000000016fdf9078, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #10: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb780, r=0x0000600002cea780, a=0x000000016fdf9078) at qobjectdefs_impl.h:399:51 [opt]
    frame #11: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x00006000021e6e90, signal_index=7, argv=0x000000016fdf9078) at qobject.cpp:3919:26 [opt]
    frame #12: 0x00000001012f0478 OpenStudioApp`openstudio::OSItemSelector::itemSelected(this=0x00006000021e6e90, _t1=0x000000016aa23920) at moc_OSItemSelector.cpp:175:5
    frame #13: 0x000000010065bebc OpenStudioApp`openstudio::OSItemList::selectItem(this=0x00006000021e6e90, selectItem=0x000000016aa23920) at OSItemList.cpp:275:14
    frame #14: 0x000000010065b05c OpenStudioApp`openstudio::OSItemList::setItemIds(this=0x00006000021e6e90, itemIds=size=32) at OSItemList.cpp:207:3
    frame #15: 0x0000000100661954 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void, void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&)>::call(f=d0 ae 65 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x00006000021e6e90, arg=0x000000016fdf93c8)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), openstudio::OSItemList*, void**) at qobjectdefs_impl.h:171:13
    frame #16: 0x00000001006618b8 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&)>::call<QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void>(f=d0 ae 65 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x00006000021e6e90, arg=0x000000016fdf93c8)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), openstudio::OSItemList*, void**) at qobjectdefs_impl.h:208:13
    frame #17: 0x00000001006617e8 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void>::impl(which=1, this_=0x00006000003bb1a0, r=0x00006000021e6e90, a=0x000000016fdf93c8, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #18: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb1a0, r=0x00006000021e6e90, a=0x000000016fdf93c8) at qobjectdefs_impl.h:399:51 [opt]
    frame #19: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x000060000184b380, signal_index=3, argv=0x000000016fdf93c8) at qobject.cpp:3919:26 [opt]
    frame #20: 0x00000001012f18a0 OpenStudioApp`openstudio::OSVectorController::itemIds(this=0x000060000184b380, _t1=size=32) at moc_OSVectorController.cpp:200:5
    frame #21: 0x00000001005c6d20 OpenStudioApp`openstudio::ModelObjectListController::objectAdded(this=0x000060000184b380, impl=std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>::element_type @ 0x000000016aa5e1c8 strong=66 weak=2, iddObjectType=0x000060000004eb00, handle=0x000060000004c870) at ModelObjectListView.cpp:74:10
    frame #22: 0x00000001005ccc8c OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&>, void, void (openstudio::ModelObjectListController::*)(std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&)>::call(f=b0 6c 5c 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000184b380, arg=0x00006000018620c0)(std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&), openstudio::ModelObjectListController*, void**) at qobjectdefs_impl.h:171:13
jmarrec commented 1 week ago

Can't reproduce on v1.8.0 with Ubuntu 24.04. I suppose this was changed in #713.

@macumber Can you try on windows (or any other platform) to confirm?