GithubHelp home page GithubHelp logo

Comments (6)

zoltanp avatar zoltanp commented on May 25, 2024

Hi,
in case you are building KTechLab from sources, can you try building it with build-developer.sh and running it with run-developer.sh ? This way the Address Sanitiser feature of GCC is turned on, which should catch any crashes and dump some useful information about it.

from ktechlab.

abalfoort avatar abalfoort commented on May 25, 2024

Here it is:

qt5ct: using qt5ct plugin
kf5.kservice.sycoca: Service type not found: "application/x-ktechlab"
kf5.kservice.sycoca: Service type not found: "application/x-circuit"
kf5.kservice.sycoca: Service type not found: "application/x-microbe"
kf5.kservice.sycoca: Service type not found: "application/x-flowcode"
Shortcut for action  "file_new" "New File" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
qt5ct: D-Bus global menu: no
org.kde.ktechlab: no available sizes for  "C (.c)"
Shortcut for action  "cancelCurrentOperation" "Cancel" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "edit_delete" "Delete" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "edit_raise" "Raise Selection" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "edit_lower" "Lower Selection" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher'
kdeinit5: Launched KLauncher, pid = 5920, result = 0
qt5ct: using qt5ct plugin
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit5: opened connection to :0.0
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/file.so'
=================================================================
==5200==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000468480 at pc 0x559eff8cce79 bp 0x7ffd17203380 sp 0x7ffd17203378
READ of size 8 at 0x607000468480 thread T0
    #0 0x559eff8cce78 in PropertyEditorItem::property() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18ee78)
    #1 0x559eff8c843c in PropertyEditor::updateDefaultsButton() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18a43c)
    #2 0x559eff8cae3c in PropertyEditor::resizeEvent(QResizeEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18ce3c)
    #3 0x7f6471801ebd in QWidget::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19debd)
    #4 0x7f64718a4cdd in QFrame::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x240cdd)
    #5 0x7f6471a161ea in QAbstractItemView::viewportEvent(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x3b21ea)
    #6 0x7f6470d3419a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a19a)
    #7 0x7f64717c34b0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4b0)
    #8 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #9 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #10 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #11 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #12 0x7f64718a5fb8 in QAbstractScrollAreaPrivate::layoutChildren_helper(bool*, bool*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x241fb8)
    #13 0x7f64718a6519 in QAbstractScrollAreaPrivate::layoutChildren() (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x242519)
    #14 0x7f64718a7851 in QAbstractScrollArea::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x243851)
    #15 0x7f6471a15ec8 in QAbstractItemView::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x3b1ec8)
    #16 0x7f64717c34c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)
    #17 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #18 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #19 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #20 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #21 0x7f64717e2f4f in QWidgetItem::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17ef4f)
    #22 0x7f64717d91af in QBoxLayout::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1751af)
    #23 0x7f64717df397 in QLayoutPrivate::doResize(QSize const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17b397)
    #24 0x7f64717c34a5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4a5)
    #25 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #26 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #27 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #28 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #29 0x7f64717e2f4f in QWidgetItem::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17ef4f)
    #30 0x7f64717d91af in QBoxLayout::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1751af)
    #31 0x7f64717df397 in QLayoutPrivate::doResize(QSize const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17b397)
    #32 0x7f64717e0428 in QLayout::activate() (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17c428)
    #33 0x7f64717c34a5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4a5)
    #34 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #35 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #36 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #37 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #38 0x7f647195c6af  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2f86af)
    #39 0x7f647195ea0a  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2faa0a)
    #40 0x7f6471801ebd in QWidget::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19debd)
    #41 0x7f64717c34c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)
    #42 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #43 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #44 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #45 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #46 0x7f647195c6af  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2f86af)
    #47 0x7f647195ea0a  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2faa0a)
    #48 0x7f6471801ebd in QWidget::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19debd)
    #49 0x7f64717c34c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)
    #50 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #51 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #52 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #53 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #54 0x7f64717e2f4f in QWidgetItem::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17ef4f)
    #55 0x7f64717d925f in QBoxLayout::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17525f)
    #56 0x7f64717df397 in QLayoutPrivate::doResize(QSize const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17b397)
    #57 0x7f64717c34a5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4a5)
    #58 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #59 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #60 0x7f64717f8e28 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x194e28)
    #61 0x7f64717f9bef in QWidget::setGeometry(QRect const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x195bef)
    #62 0x7f6471800e27  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19ce27)
    #63 0x7f64718035ca in QWidget::qt_metacall(QMetaObject::Call, int, void**) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19f5ca)
    #64 0x7f6470b6e1dc in QPropertyAnimation::updateCurrentValue(QVariant const&) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0xa41dc)
    #65 0x7f6470b6ac27  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0xa0c27)
    #66 0x7f6470b6b42f  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0xa142f)
    #67 0x7f6470b6edb8 in QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0xa4db8)
    #68 0x7f6470b6904b in QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x9f04b)
    #69 0x7f64718a8f43  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x244f43)
    #70 0x7f64718e062f  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x27c62f)
    #71 0x7f647190fca6  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2abca6)
    #72 0x7f647191355d  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2af55d)
    #73 0x7f64717df397 in QLayoutPrivate::doResize(QSize const&) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17b397)
    #74 0x7f64717e0428 in QLayout::activate() (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x17c428)
    #75 0x7f64717c34a5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4a5)
    #76 0x7f64717ca96f in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x16696f)
    #77 0x7f6470d34488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26a488)
    #78 0x7f6470d3746a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26d46a)
    #79 0x7f6470d86102  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2bc102)
    #80 0x7f6472a26f2d in g_main_context_dispatch (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4df2d)
    #81 0x7f6472a271c7  (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4e1c7)
    #82 0x7f6472a2725b in g_main_context_iteration (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4e25b)
    #83 0x7f6470d85726 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2bb726)
    #84 0x7f6466677490  (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5+0xdd490)
    #85 0x7f6470d3315a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x26915a)
    #86 0x7f6470d3b131 in QCoreApplication::exec() (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x271131)
    #87 0x559eff895886 in main (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x157886)
    #88 0x7f647060a09a in __libc_start_main ../csu/libc-start.c:308
    #89 0x559eff892aa9 in _start (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x154aa9)

0x607000468480 is located 64 bytes inside of 72-byte region [0x607000468440,0x607000468488)
freed by thread T0 here:
    #0 0x7f6473e06aa0 in operator delete(void*) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xebaa0)
    #1 0x559eff8c339b in PropertyEditorItem::~PropertyEditorItem() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18539b)
    #2 0x7f6471a6826a  (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x40426a)

previously allocated by thread T0 here:
    #0 0x7f6473e05d30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x559eff8ca0ba in PropertyEditor::fill() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18c0ba)
    #2 0x559eff8c9306 in PropertyEditor::create(ItemGroup*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18b306)
    #3 0x559eff8c5aa0 in ItemEditor::slotUpdate(ItemGroup*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x187aa0)
    #4 0x559effb2acb1 in ItemInterface::slotUpdateItemInterface() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3eccb1)
    #5 0x559effe2cc1f in ItemInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x6eec1f)
    #6 0x7f6470d5d7f5 in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2937f5)
    #7 0x559effe2baa2 in ItemDocument::selectionChanged() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x6edaa2)
    #8 0x559effe2b2d0 in ItemDocument::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x6ed2d0)
    #9 0x7f6470d5d7f5 in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2937f5)
    #10 0x559effe2afdc in Item::selectionChanged() (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x6ecfdc)
    #11 0x559effcbc370 in Item::setSelected(bool) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x57e370)
    #12 0x559effb08b9b in CNItemGroup::addItem(Item*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3cab9b)
    #13 0x559effb0931d in CNItemGroup::addQCanvasItem(KtlQCanvasItem*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3cb31d)
    #14 0x559effae95fc in ItemDocument::select(KtlQCanvasItem*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3ab5fc)
    #15 0x559effb1a053 in CMItemMove::mousePressedInitial(EventInfo const&) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3dc053)
    #16 0x559effb122f2 in CMManager::mousePressEvent(EventInfo) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3d42f2)
    #17 0x559effacc567 in ItemView::contentsMousePressEvent(QMouseEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x38e567)
    #18 0x559effad078f in CVBEditor::event(QEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x39278f)
    #19 0x7f64717c34c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)

SUMMARY: AddressSanitizer: heap-use-after-free (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x18ee78) in PropertyEditorItem::property()
Shadow bytes around the buggy address:
  0x0c0e80085040: fa fa fd fd fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0e80085050: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd
  0x0c0e80085060: fd fd fd fd fd fd fd fd fa fa fa fa 00 00 00 00
  0x0c0e80085070: 00 00 00 00 00 fa fa fa fa fa fd fd fd fd fd fd
  0x0c0e80085080: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c0e80085090:[fd]fa fa fa fa fa 00 00 00 00 00 00 00 00 00 fa
  0x0c0e800850a0: fa fa fa fa fd fd fd fd fd fd fd fd fd fa fa fa
  0x0c0e800850b0: fa fa fd fd fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0e800850c0: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd
  0x0c0e800850d0: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
  0x0c0e800850e0: fd fd fd fd fd fa fa fa fa fa fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==5200==ABORTING

Perhaps a recursion on freeing objects somewhere?

If you need the build-developer.log let me know (only unused parameters).

Btw: this also happens with the package (0.50.0-2) from Debian bullseye: https://packages.debian.org/bullseye/ktechlab

from ktechlab.

zoltanp avatar zoltanp commented on May 25, 2024

Thanks for the stack trace! The issue looks like a pointer-ownership related issue. Something got destroyed (a Property) and some pointer to it is not invalidated.

I've just reproduced the crash:

  1. place and select a resistor
  2. in the property editor click on any of its properties, in order to start editing it
  3. click on the circuit, to stop editing of the properties
    3.1. Expected: property value is kept, program continues
    3.2. Actually: crash with the same stack trace from above

Btw: this also happens with the package (0.50.0-2) from Debian bullseye: https://packages.debian.org/bullseye/ktechlab

As I see the situation, after fixing this issue, a new bugfix release should be done.
I do not want to ship a crashing program.

from ktechlab.

abalfoort avatar abalfoort commented on May 25, 2024

I'd like to see the change when you're done. I have been a programmer for the past 23 years but I've only recently begun studying on C.

from ktechlab.

zoltanp avatar zoltanp commented on May 25, 2024

This issue should be fixed by:

https://invent.kde.org/sdk/ktechlab/-/commit/730a5492e4780504a80db1a27dc307d8f61b4696

730a549

Apparently it has been a dangling pointer :-)
In the fix I've went completely paranoic about the state of the widgets.

Please verify if the crash persists. It it is fixed, feel free to close this issue.

It's interesting that I couldn't reproduce the issue on Qt 5.12.8 / Ubuntu 20.04.

from ktechlab.

abalfoort avatar abalfoort commented on May 25, 2024

I can confirm that this fixes the issue.
Thanks for the quick fix!

$ sh run-developer.sh
+ case "$(uname -s)" in
++ uname -s
+ echo Linux
Linux
+++ readlink -f run-developer.sh
++ dirname /home/solydxk/Downloads/ktechlab-master/run-developer.sh
+ SCRIPTDIR=/home/solydxk/Downloads/ktechlab-master
+ . /home/solydxk/Downloads/ktechlab-master/build-developer/prefix.sh
++ export PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
++ PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
++ export XDG_DATA_DIRS=/home/solydxk/Downloads/ktechlab-master/inst-developer/share:/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share
++ XDG_DATA_DIRS=/home/solydxk/Downloads/ktechlab-master/inst-developer/share:/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share
++ export XDG_CONFIG_DIRS=/home/solydxk/Downloads/ktechlab-master/inst-developer/etc/xdg:/etc/xdg
++ XDG_CONFIG_DIRS=/home/solydxk/Downloads/ktechlab-master/inst-developer/etc/xdg:/etc/xdg
++ export QT_PLUGIN_PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/lib/x86_64-linux-gnu/plugins:
++ QT_PLUGIN_PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/lib/x86_64-linux-gnu/plugins:
++ export QML2_IMPORT_PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/lib/x86_64-linux-gnu/qml:
++ QML2_IMPORT_PATH=/home/solydxk/Downloads/ktechlab-master/inst-developer/lib/x86_64-linux-gnu/qml:
+ export ASAN_OPTIONS=new_delete_type_mismatch=0
+ ASAN_OPTIONS=new_delete_type_mismatch=0
+ export 'QT_MESSAGE_PATTERN=%{file} : %{line} %{type} %{function} -- %{message}'
+ QT_MESSAGE_PATTERN='%{file} : %{line} %{type} %{function} -- %{message}'
+ tee /home/solydxk/Downloads/ktechlab-master/developer-run.log
+ /home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab
unknown : 0 debug unknown -- using qt5ct plugin
unknown : 0 critical unknown -- Shortcut for action  "file_new" "New File" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
unknown : 0 debug unknown -- D-Bus global menu: no
unknown : 0 warning unknown -- no available sizes for  "C (.c)"
unknown : 0 critical unknown -- Shortcut for action  "cancelCurrentOperation" "Cancel" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
unknown : 0 critical unknown -- Shortcut for action  "edit_delete" "Delete" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
unknown : 0 critical unknown -- Shortcut for action  "edit_raise" "Raise Selection" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
unknown : 0 critical unknown -- Shortcut for action  "edit_lower" "Lower Selection" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
unknown : 0 warning unknown -- 0x6110004c97f0 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.

=================================================================
==5188==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4608 byte(s) in 18 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f0865e5a6d4  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x206d4)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f086b05dd30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x563ef916d3ef in Component::createResistance(Pin*, Pin*, double) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x5553ef)
    #2 0x563ef9169fe0 in Component::createResistance(ECNode*, ECNode*, double) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x551fe0)
    #3 0x563ef90c817f in Resistor::Resistor(ICNDocument*, bool, char const*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x4b017f)
    #4 0x563ef90c78bb in Resistor::construct(ItemDocument*, bool, char const*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x4af8bb)
    #5 0x563ef917a27a in ItemLibrary::createItem(QString const&, ItemDocument*, bool, char const*, bool) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x56227a)
    #6 0x563ef8fb5089 in ICNDocument::addItem(QString const&, QPoint const&, bool) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x39d089)
    #7 0x563ef8fa6154 in ItemView::dropEvent(QDropEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x38e154)
    #8 0x563ef8fab43b in CVBEditor::event(QEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x39343b)
    #9 0x7f0868a1b4c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f086b05dd30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x563ef916d3ef in Component::createResistance(Pin*, Pin*, double) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x5553ef)
    #2 0x563ef9169fe0 in Component::createResistance(ECNode*, ECNode*, double) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x551fe0)
    #3 0x563ef90c817f in Resistor::Resistor(ICNDocument*, bool, char const*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x4b017f)
    #4 0x563ef90c78bb in Resistor::construct(ItemDocument*, bool, char const*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x4af8bb)
    #5 0x563ef917a27a in ItemLibrary::createItem(QString const&, ItemDocument*, bool, char const*, bool) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x56227a)
    #6 0x563ef8fa81d1 in ItemView::createDragItem(QDragEnterEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x3901d1)
    #7 0x563ef9178a12 in CircuitView::dragEnterEvent(QDragEnterEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x560a12)
    #8 0x563ef8fab270 in CVBEditor::event(QEvent*) (/home/solydxk/Downloads/ktechlab-master/inst-developer/bin/ktechlab+0x393270)
    #9 0x7f0868a1b4c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15f4c0)

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7f086b05dd30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x7f086a6c835d  (/usr/lib/x86_64-linux-gnu/libKF5KHtml.so.5+0x37b35d)

Indirect leak of 8478 byte(s) in 10 object(s) allocated from:
    #0 0x7f086b05c720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
    #1 0x7f08657a6bac  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x32bac)

Indirect leak of 1088 byte(s) in 34 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f0865e5ad18  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20d18)

Indirect leak of 808 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657a69ac in _dbus_mem_pool_alloc (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x329ac)

Indirect leak of 528 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086578823f  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x1423f)

Indirect leak of 480 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657855f7  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x115f7)
    #2 0x7ffffffff  (<unknown module>)

Indirect leak of 464 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657a2a4f  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2ea4f)

Indirect leak of 448 byte(s) in 8 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f086578cedd in _dbus_credentials_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x18edd)

Indirect leak of 343 byte(s) in 33 object(s) allocated from:
    #0 0x7f086afad810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
    #1 0x7f0865e59fc4 in FcValueSave (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1ffc4)

Indirect leak of 280 byte(s) in 7 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657ace91  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x38e91)

Indirect leak of 264 byte(s) in 3 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086579b8ca  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x278ca)

Indirect leak of 224 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657a39cb in _dbus_hash_table_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2f9cb)

Indirect leak of 192 byte(s) in 4 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657acfb1  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x38fb1)

Indirect leak of 192 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086579850f in _dbus_message_loader_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2450f)

Indirect leak of 160 byte(s) in 4 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657ace3a  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x38e3a)

Indirect leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
    #1 0x7f08657987cb in _dbus_message_loader_get_unix_fds (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x247cb)

Indirect leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086579a2a7  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x262a7)

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086578820a  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x1420a)

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657881f9  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x141f9)

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f08657a6853 in _dbus_mem_pool_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x32853)

Indirect leak of 64 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657a70c9 in _dbus_string_copy_data (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x330c9)
    #2 0x3e715ab38b1643ff  (<unknown module>)

Indirect leak of 64 byte(s) in 8 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657a6df3  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x32df3)

Indirect leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f0865786181  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x12181)

Indirect leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x7f086579a682  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x26682)

Indirect leak of 45 byte(s) in 3 object(s) allocated from:
    #0 0x7f086b05c330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f08657a496e in _dbus_strdup (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x3096e)

Indirect leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0x7f086b05c720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
    #1 0x7f08657a382b  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2f82b)

SUMMARY: AddressSanitizer: 19842 byte(s) leaked in 165 allocation(s).

from ktechlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.