Opened 4 years ago

Closed 4 years ago

#6256 closed defect (fixed)

OMEdit crashing on double-click in SSP model

Reported by: Andreas Heuermann Owned by: Adeel Asghar
Priority: critical Milestone: 1.16.2
Component: OMEdit Version: v1.17.0-dev
Keywords: OMEdit, SSP Cc:

Description

I wanted to create a decent bug report when creating a new SSP model with an ME FMU imported, but actually OMEdit is crashing before I can import the FMU.
When I double-clicked the root system of a SSP model OMEdit will crash.

So I did run OMEdit with GDB and noticed two problems:

  1. During the start of OMEdit I get:
    Andreas@DESKTOP-OSJIVA0 MINGW64 ~
    # gdb /c/Program\ Files/OpenModelica1.17.0-dev-64bit/bin/OMEdit.exe
    GNU gdb (GDB) 9.2
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "x86_64-w64-mingw32".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from C:/Program Files/OpenModelica1.17.0-dev-64bit/bin/OMEdit.exe...
    (gdb) r
    Starting program: C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\OMEdit.exe
    [New Thread 7548.0x32b8]
    [New Thread 7548.0x3094]
    [New Thread 7548.0x3054]
    [New Thread 7548.0x414]
    [New Thread 7548.0x3ef8]
    [New Thread 7548.0x678]
    [New Thread 7548.0x339c]
    [New Thread 7548.0x3798]
    [New Thread 7548.0x3f44]
    [New Thread 7548.0x16d4]
    [New Thread 7548.0x425c]
    [New Thread 7548.0x40fc]
    [New Thread 7548.0x37e8]
    [New Thread 7548.0x3ee0]
    [New Thread 7548.0x1c98]
    [New Thread 7548.0x29a4]
    [New Thread 7548.0x41bc]
    [New Thread 7548.0x3cc4]
    [New Thread 7548.0x2d74]
    [New Thread 7548.0x3f5c]
    [New Thread 7548.0xee4]
    [New Thread 7548.0x3c34]
    [Thread 7548.0x3c34 exited with code 0]
    [New Thread 7548.0xd90]
    [New Thread 7548.0x4294]
    [New Thread 7548.0x3078]
    [New Thread 7548.0x3c84]
    warning: mincore\com\oleaut32\dispatch\ups.cpp(2122)\OLEAUT32.dll!00007FFED0E695F6: (caller: 00007FFED0E68A09) ReturnHr(1) tid(140) 8002801D Bibliothek nicht registriert.
    [New Thread 7548.0xca8]
    [New Thread 7548.0x2cd0]
    [New Thread 7548.0x2878]
    [New Thread 7548.0x3c90]
    [New Thread 7548.0x3938]
    [New Thread 7548.0x169c]
    [New Thread 7548.0x3594]
    [New Thread 7548.0xa58]
    [New Thread 7548.0x3fbc]
    [New Thread 7548.0x4048]
    [New Thread 7548.0x17e0]
    [New Thread 7548.0x3f28]
    [New Thread 7548.0x38ac]
    [New Thread 7548.0x1ae0]
    [New Thread 7548.0x4198]
    [New Thread 7548.0x2d84]
    [New Thread 7548.0x41e8]
    [New Thread 7548.0x38b0]
    [New Thread 7548.0x40c0]
    [New Thread 7548.0x16b0]
    [New Thread 7548.0x2040]
    [New Thread 7548.0x3ed4]
    [New Thread 7548.0x43a8]
    [New Thread 7548.0x2464]
    [New Thread 7548.0x3f64]
    [New Thread 7548.0x2180]
    [New Thread 7548.0x18dc]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    [New Thread 7548.0x960]
    [New Thread 7548.0x16a0]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    [New Thread 7548.0x3e08]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    [New Thread 7548.0x2008]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    [Thread 7548.0xee4 exited with code 0]
    [Thread 7548.0x2878 exited with code 0]
    [Thread 7548.0xca8 exited with code 0]
    [Thread 7548.0x40c0 exited with code 0]
    [Thread 7548.0x16b0 exited with code 0]
    [Thread 7548.0x43a8 exited with code 0]
    [Thread 7548.0x3ed4 exited with code 0]
    [Thread 7548.0x2cd0 exited with code 0]
    [Thread 7548.0x2464 exited with code 0]
    [Thread 7548.0x2040 exited with code 0]
    [Thread 7548.0x2180 exited with code 0]
    [Thread 7548.0x3f64 exited with code 0]
    [Thread 7548.0x3e08 exited with code 0]
    [Thread 7548.0x3c84 exited with code 0]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    [New Thread 7548.0x22dc]
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    Error while reading shared library symbols for C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll:
    C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\libssl-1_1-x64.dll: error reading symbols
    

But OMEdit is starting, so no big deal I guess.


  1. Importing FMU in SSP causes OMEdit to crash

Steps to reproduce:

  • Load Modelica.Electrical.Analog.Examples.CauerLowPassAnalog from MSL 3.2.3
  • Export FMU with: File->Export->FMU
    [10] 12:36:35 Scripting Notification
    The FMU is generated at C:/OMDev/tools/msys/tmp/OpenModelica/OMEdit/Modelica.Electrical.Analog.Examples.CauerLowPassAnalog/Modelica.Electrical.Analog.Examples.CauerLowPassAnalog.fmu.
    
  • Create a new SSP model with: SSP->New SSP model. In the following dialog enter name: testCrashSSP, Root System Name: Root, Root System Type: Strongly Coupled and comfirm with ok.
  • Double click the Root system in the newly opened Diagram view. Now OMEdit will crash.

Report from gdb

warning: HEAP[OMEdit.exe]:
warning: Heap block at 000001843A1CEC60 modified at 000001843A1CEC90 past requested size of 20

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffed2649df3 in ntdll!RtlRegisterSecureMemoryCacheCallback ()
   from C:\Windows\SYSTEM32\ntdll.dll
(gdb) bt
(gdb) bt
#0  0x00007ffed2649df3 in ntdll!RtlRegisterSecureMemoryCacheCallback ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffed264647f in ntdll!RtlZeroHeap ()
   from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ffed260dfd8 in ntdll!memset () from C:\Windows\SYSTEM32\ntdll.dll
#3  0x00007ffed2648ca1 in ntdll!RtlRegisterSecureMemoryCacheCallback ()
   from C:\Windows\SYSTEM32\ntdll.dll
#4  0x00007ffed25fd018 in ntdll!memset () from C:\Windows\SYSTEM32\ntdll.dll
#5  0x00007ffed25695c4 in ntdll!RtlAllocateHeap ()
   from C:\Windows\SYSTEM32\ntdll.dll
#6  0x00007ffed2565d21 in ntdll!RtlFreeHeap ()
   from C:\Windows\SYSTEM32\ntdll.dll
#7  0x00007ffed16c9c9c in msvcrt!free () from C:\Windows\System32\msvcrt.dll
#8  0x00007ffe78402f1c in QSortFilterProxyModelPrivate::_q_clearMapping() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#9  0x00007ffe78402f99 in QSortFilterProxyModel::invalidate() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#10 0x00007ffe7850dee3 in void doActivate<false>(QObject*, int, void**) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#11 0x00007ffe783dfb72 in QAbstractItemModel::endRemoveRows() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#12 0x00007ff6b0a88a12 in LibraryTreeModel::unloadOMSModel (this=this@entry=
    0x184373ded70, pLibraryTreeItem=pLibraryTreeItem@entry=0x18440719c20,
    doDelete=<optimized out>, askQuestion=<optimized out>)
    at Modeling\LibraryTreeWidget.cpp:2040
#13 0x00007ff6b0a89229 in LibraryTreeModel::reLoadOMSimulatorModel (
    this=0x184373ded70, modelName=..., editedCref=..., snapShot=...)
    at Modeling\LibraryTreeWidget.cpp:2126
#14 0x00007ff6b0e61bc3 in OMSimulatorUndoCommand::redoInternal (
    this=0x18459844410) at Modeling\Commands.cpp:1622
#15 0x00007ff6b0abaae7 in UndoStack::push (this=0x1845931e3c0,
    cmd=0x18459844410) at Modeling\ModelWidgetContainer.cpp:4204
#16 ModelWidget::createOMSimulatorUndoCommand (this=<optimized out>,
    commandText=..., doSnapShot=true)
    at Modeling\ModelWidgetContainer.cpp:6286
#17 0x00007ff6b0d33cd0 in ElementPropertiesDialog::updateProperties (
    this=<optimized out>) at OMS\ElementPropertiesDialog.cpp:403
#18 0x00007ffe7850dee3 in void doActivate<false>(QObject*, int, void**) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#19 0x00007ffe74cd35d5 in QAbstractButtonPrivate::emitClicked() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#20 0x00007ffe74cd5764 in QAbstractButtonPrivate::click() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#21 0x00007ffe74cd5973 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#22 0x00007ffe74c273b8 in QWidget::event(QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#23 0x00007ffe74be7fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#24 0x00007ffe74bef327 in QApplication::notify(QObject*, QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#25 0x00007ffe784247a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#26 0x00007ffe74bee307 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#27 0x00007ffe74c3f7a2 in QWidgetWindow::handleMouseEvent(QMouseEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#28 0x00007ffe74c42915 in QWidgetWindow::event(QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#29 0x00007ffe74be7fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#30 0x00007ffe784247a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#31 0x00007ffe778d0250 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Gui.dll
#32 0x00007ffe778a552c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Gui.dll
#33 0x00007ffe7848065f in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#34 0x00007ffe73f11db5 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\platforms\qwindows.dll
#35 0x00007ffe78422843 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#36 0x00007ffe74dd9ce0 in QDialog::exec() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#37 0x00007ff6b0ac778a in Element::handleOMSComponentDoubleClick (this=
    0x184368ba300) at .\Element/Element.h:283
#38 GraphicsView::handleDoubleClickOnComponent (
    this=this@entry=0x1843ed7a530, event=<optimized out>,
    event@entry=0x44699fbf10) at Modeling\ModelWidgetContainer.cpp:3494
#39 0x00007ff6b0ac79e6 in GraphicsView::mouseDoubleClickEvent (
    this=0x1843ed7a530, event=0x44699fbf10)
    at Modeling\ModelWidgetContainer.cpp:3546
#40 0x00007ffe74c279c1 in QWidget::event(QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#41 0x00007ffe74cce6d4 in QFrame::event(QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#42 0x00007ffe78422fac in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) [clone .part.0] ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#43 0x00007ffe74be7fc2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#44 0x00007ffe74bef327 in QApplication::notify(QObject*, QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#45 0x00007ffe784247a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#46 0x00007ffe74bee307 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#47 0x00007ffe74c3f7a2 in QWidgetWindow::handleMouseEvent(QMouseEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#48 0x00007ffe74c42915 in QWidgetWindow::event(QEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#49 0x00007ffe74be7fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Widgets.dll
#50 0x00007ffe784247a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#51 0x00007ffe778d0230 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Gui.dll
#52 0x00007ffe778a552c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Gui.dll
#53 0x00007ffe7848065f in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#54 0x00007ffe73f11db5 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\platforms\qwindows.dll
#55 0x00007ffe78422843 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#56 0x00007ffe7842b4f7 in QCoreApplication::exec() ()
   from C:\Program Files\OpenModelica1.17.0-dev-64bit\bin\Qt5Core.dll
#57 0x00007ff6b09f189c in qMain (argc=1, argv=argv@entry=0x1842de085f0)
    at main.cpp:175
#58 0x00007ff6b0ff30f4 in WinMain () at qtmain_win.cpp:97
#59 0x000000014066bd22 in ?? ()
#60 0x00007ff6b09f13c1 in __tmainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:333
#61 0x00007ff6b09f14d6 in WinMainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:186
(gdb)

My OS: Windows 10
OpenModelica Version: v1.17.0-dev-225-gb23dde892d (64-bit)

Change History (5)

comment:1 by Adrian Pop, 4 years ago

After these changes:

  • OMEdit/OMEditLIB/Element/Element.h

    diff --git a/OMEdit/OMEditLIB/Element/Element.h b/OMEdit/OMEditLIB/Element/Element.h
    index 9bb74fc92f..5f4b097c61 100644
    a b public:  
    280280  void updateElementTransformations(const Transformation &oldTransformation, const bool positionChanged);
    281281  void updateComponentTransformations(const Transformation &oldTransformation, const bool positionChanged) {updateElementTransformations(oldTransformation, positionChanged);}
    282282  void handleOMSElementDoubleClick();
    283   void handleOMSComponentDoubleClick() {return handleOMSElementDoubleClick();}
    284283  bool isInBus() {return mpBusComponent != 0;}
    285284  void setBusComponent(Element *pBusComponent);
    286285  Element* getBusComponent() {return mpBusComponent;}
  • OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp

    diff --git a/OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp b/OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp
    index fc211aaff5..bcaa8b95be 100644
    a b bool GraphicsView::handleDoubleClickOnComponent(QMouseEvent *event)  
    34913491      if (mpModelWidget->getLibraryTreeItem()->getLibraryType() == LibraryTreeItem::CompositeModel) {
    34923492        pRootComponent->showSubModelAttributes();
    34933493      } else if (mpModelWidget->getLibraryTreeItem()->getLibraryType() == LibraryTreeItem::OMS) {
    3494         pRootComponent->handleOMSComponentDoubleClick();
     3494        pRootComponent->handleOMSElementDoubleClick();
    34953495      } else {
    34963496        removeCurrentTransition();
    34973497        /* ticket:4401 Open component class with shift + double click */

I now get the dialog after double click but if I press
Ok or Cancel it just dies with the following trace:

(gdb) #0  0x00007ff91c589df3 in ntdll!RtlRegisterSecureMemoryCacheCallback ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff91c58647f in ntdll!RtlZeroHeap ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff91c54dfd8 in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x00007ff91c588ca1 in ntdll!RtlRegisterSecureMemoryCacheCallback ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x00007ff91c53d018 in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
#5  0x00007ff91c4a95c4 in ntdll!RtlAllocateHeap ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x00007ff91c4a5d21 in ntdll!RtlFreeHeap ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#7  0x00007ff91b249c9c in msvcrt!free () from C:\WINDOWS\System32\msvcrt.dll
#8  0x00007ff8dcc72f1c in QSortFilterProxyModelPrivate::_q_clearMapping() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#9  0x00007ff8dcc72f99 in QSortFilterProxyModel::invalidate() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#10 0x00007ff8dcd7dee3 in void doActivate<false>(QObject*, int, void**) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#11 0x00007ff8dcc4fb72 in QAbstractItemModel::endRemoveRows() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#12 0x00007ff6ad8c8a12 in LibraryTreeModel::unloadOMSModel (
    this=this@entry=0x133692974a0, 
    pLibraryTreeItem=pLibraryTreeItem@entry=0x1330d52eb00, 
    doDelete=<optimized out>, askQuestion=<optimized out>)
    at Modeling\LibraryTreeWidget.cpp:2040
#13 0x00007ff6ad8c9229 in LibraryTreeModel::reLoadOMSimulatorModel (
    this=0x133692974a0, modelName=..., editedCref=..., snapShot=...)
    at Modeling\LibraryTreeWidget.cpp:2126
#14 0x00007ff6adca1bc3 in OMSimulatorUndoCommand::redoInternal (
    this=0x1330d628b30) at Modeling\Commands.cpp:1622
#15 0x00007ff6ad8faae7 in UndoStack::push (this=0x1336b060070, 
    cmd=0x1330d628b30) at Modeling\ModelWidgetContainer.cpp:4204
#16 ModelWidget::createOMSimulatorUndoCommand (this=<optimized out>, 
    commandText=..., doSnapShot=true)
    at Modeling\ModelWidgetContainer.cpp:6286
#17 0x00007ff6adb73cd0 in ElementPropertiesDialog::updateProperties (
    this=<optimized out>) at OMS\ElementPropertiesDialog.cpp:403
#18 0x00007ff8dcd7dee3 in void doActivate<false>(QObject*, int, void**) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#19 0x00007ff8bdf835d5 in QAbstractButtonPrivate::emitClicked() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#20 0x00007ff8bdf85764 in QAbstractButtonPrivate::click() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#21 0x00007ff8bdf85973 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#22 0x00007ff8bded73b8 in QWidget::event(QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#23 0x00007ff8bde97fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#24 0x00007ff8bde9f327 in QApplication::notify(QObject*, QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#25 0x00007ff8dcc947a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#26 0x00007ff8bde9e307 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#27 0x00007ff8bdeef7a2 in QWidgetWindow::handleMouseEvent(QMouseEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#28 0x00007ff8bdef2915 in QWidgetWindow::event(QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#29 0x00007ff8bde97fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#30 0x00007ff8dcc947a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#31 0x00007ff8dc140250 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Gui.dll
#32 0x00007ff8dc11552c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Gui.dll
#33 0x00007ff8dccf065f in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#34 0x00007ff8d31c1db5 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\platforms\qwindows.dll
#35 0x00007ff8dcc92843 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#36 0x00007ff8be089ce0 in QDialog::exec() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#37 0x00007ff6ad90778a in GraphicsView::handleDoubleClickOnComponent (
    this=this@entry=0x1336afd79d0, event=<optimized out>, 
    event@entry=0x2cdd9fc000) at Modeling\ModelWidgetContainer.cpp:3494
#38 0x00007ff6ad9079e6 in GraphicsView::mouseDoubleClickEvent (
    this=0x1336afd79d0, event=0x2cdd9fc000)
    at Modeling\ModelWidgetContainer.cpp:3546
#39 0x00007ff8bded79c1 in QWidget::event(QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#40 0x00007ff8bdf7e6d4 in QFrame::event(QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#41 0x00007ff8dcc92fac in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) [clone .part.0] ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#42 0x00007ff8bde97fc2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#43 0x00007ff8bde9f327 in QApplication::notify(QObject*, QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#44 0x00007ff8dcc947a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#45 0x00007ff8bde9e307 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#46 0x00007ff8bdeef7a2 in QWidgetWindow::handleMouseEvent(QMouseEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#47 0x00007ff8bdef2915 in QWidgetWindow::event(QEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#48 0x00007ff8bde97fd3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Widgets.dll
#49 0x00007ff8dcc947a0 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#50 0x00007ff8dc140230 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Gui.dll
#51 0x00007ff8dc11552c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Gui.dll
#52 0x00007ff8dccf065f in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#53 0x00007ff8d31c1db5 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\platforms\qwindows.dll
#54 0x00007ff8dcc92843 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#55 0x00007ff8dcc9b4f7 in QCoreApplication::exec() ()
   from C:\home\adrpo33\dev\OpenModelica\build\bin\Qt5Core.dll
#56 0x00007ff6ad83189c in qMain (argc=1, argv=argv@entry=0x13362d886a0)
    at main.cpp:175
#57 0x00007ff6ade330f4 in WinMain () at qtmain_win.cpp:97
#58 0x000000014066bd22 in ?? ()
#59 0x00007ff6ad8313c1 in __tmainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:333
#60 0x00007ff6ad8314d6 in WinMainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:186

comment:2 by Adeel Asghar, 4 years ago

PR#7000 should fix the issue. Let me know if you still get a crash.

comment:3 by Francesco Casella, 4 years ago

Milestone: 1.17.01.16.2

If this works fine, I'd suggest to back-port it to 1.16.2

comment:4 by Adeel Asghar, 4 years ago

Yes this is definitely up for 1.16.2
I will port it.

Fixed in 354df18/OpenModelica.

comment:5 by Adeel Asghar, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.