Crash at undo delete band with field
Easy-to-use print report library and designer
Brought to you by:
aliks-os
Current QtRPT from Git (2016-03-17), Windows, MinGW, steps to reproduce:
=> Segmentation fault
In AddContainerCommand::undo() ~RptContainer() is called explicitly, however, the field seems to be already destroyed and the crash occurs when trying to destruct a QString of RptContainer.
>&"bt\n"
>~"#0 0x004917ea in load<int> (_q_value=@0xfeeefeee: <error reading variable>) at C:/Qt/Qt5.5.0/5.5/mingw492_32/include/QtCore/qgenericatomic.h:90\n"
>~"#1 QBasicAtomicInteger<int>::load (this=0xfeeefeee) at C:/Qt/Qt5.5.0/5.5/mingw492_32/include/QtCore/qbasicatomic.h:118\n"
>~"#2 0x004904f3 in QtPrivate::RefCount::deref (this=0xfeeefeee) at C:/Qt/Qt5.5.0/5.5/mingw492_32/include/QtCore/qrefcount.h:60\n"
>~"#3 0x0048d1b9 in QString::~QString (this=0x272bb660, __in_chrg=<optimized out>) at C:/Qt/Qt5.5.0/5.5/mingw492_32/include/QtCore/qstring.h:1053\n"
>~"#4 0x00435127 in RptContainer::~RptContainer (this=0x272bb5a8, __in_chrg=<optimized out>) at M:/GAx/Software/Libraries/qtrpt/QtRptDesigner/RptContainer.cpp:407\n"
>~"#5 0x00450a58 in AddContainerCommand::undo (this=0x274779d8) at M:/GAx/Software/Libraries/qtrpt/QtRptDesigner/UndoCommands.cpp:133\n"
>~"#6 0x144471cb in QUndoStack::undo (this=0x248b62c8) at util\\qundostack.cpp:697\n"
>~"#7 0x00421cd7 in MainWindow::undo (this=0x28fd88) at M:/GAx/Software/Libraries/qtrpt/QtRptDesigner/mainwindow.cpp:1339\n"
>~"#8 0x00454c0a in MainWindow::qt_static_metacall (_o=0x28fd88, _c=QMetaObject::InvokeMetaMethod, _id=42, _a=0x28c6f8) at Libraries/qtrpt/QtRptDesigner/moc_mainwindow.cpp:437\n"
>~"#9 0x028a6d5f in QMetaObject::activate (sender=0x2488c940, signalOffset=3, local_signal_index=1, argv=0x28c6f8) at kernel\\qobject.cpp:3718\n"
>~"#10 0x028a66a4 in QMetaObject::activate (sender=0x2488c940, m=0x1457c000 <_data_start__>, local_signal_index=1, argv=0x28c6f8) at kernel\\qobject.cpp:3583\n"
>~"#11 0x141146bd in QAction::triggered (this=0x2488c940, _t1=false) at .moc/debug/moc_qaction.cpp:365\n"
>~"#12 0x14113c3a in QAction::activate (this=0x2488c940, event=QAction::Trigger) at kernel\\qaction.cpp:1167\n"
>~"#13 0x14294185 in QMenuPrivate::activateCausedStack (this=0x2491ae30, causedStack=..., action=0x2488c940, action_e=QAction::Trigger, self=true) at widgets\\qmenu.cpp:1130\n"
>~"#14 0x142944f9 in QMenuPrivate::activateAction (this=0x2491ae30, action=0x2488c940, action_e=QAction::Trigger, self=true) at widgets\\qmenu.cpp:1207\n"
>~"#15 0x1429868a in QMenu::mouseReleaseEvent (this=0x2491ae00, e=0x28d118) at widgets\\qmenu.cpp:2536\n"
>~"#16 0x14153f21 in QWidget::event (this=0x2491ae00, event=0x28d118) at kernel\\qwidget.cpp:8665\n"
>~"#17 0x14298db9 in QMenu::event (this=0x2491ae00, e=0x28d118) at widgets\\qmenu.cpp:2650\n"
>~"#18 0x1411f3f1 in QApplicationPrivate::notify_helper (this=0x364268, receiver=0x2491ae00, e=0x28d118) at kernel\\qapplication.cpp:3717\n"
>~"#19 0x1411d513 in QApplication::notify (this=0x28fe44, receiver=0x2491ae00, e=0x28d118) at kernel\\qapplication.cpp:3277\n"
>~"#20 0x0287e86a in QCoreApplication::notifyInternal (this=0x28fe44, receiver=0x2491ae00, event=0x28d118) at kernel\\qcoreapplication.cpp:965\n"
>~"#21 0x14483ce5 in QCoreApplication::sendSpontaneousEvent (receiver=0x2491ae00, event=0x28d118) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227\n"
>~"#22 0x1411c1d1 in QApplicationPrivate::sendMouseEvent (receiver=0x2491ae00, event=0x28d118, alienWidget=0x0, nativeWidget=0x2491ae00, buttonDown=0x147b11b8 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\\qapplication.cpp:2771\n"
>~"#23 0x1416ad81 in QWidgetWindow::handleMouseEvent (this=0x248c2010, event=0x28d960) at kernel\\qwidgetwindow.cpp:452\n"
>~"#24 0x1416a402 in QWidgetWindow::event (this=0x248c2010, event=0x28d960) at kernel\\qwidgetwindow.cpp:210\n"
>~"#25 0x1411f3f1 in QApplicationPrivate::notify_helper (this=0x364268, receiver=0x248c2010, e=0x28d960) at kernel\\qapplication.cpp:3717\n"
>~"#26 0x1411cda7 in QApplication::notify (this=0x28fe44, receiver=0x248c2010, e=0x28d960) at kernel\\qapplication.cpp:3161\n"
>~"#27 0x0287e86a in QCoreApplication::notifyInternal (this=0x28fe44, receiver=0x248c2010, event=0x28d960) at kernel\\qcoreapplication.cpp:965\n"
>~"#28 0x08083f3d in QCoreApplication::sendSpontaneousEvent (receiver=0x248c2010, event=0x28d960) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227\n"
>~"#29 0x07d58c78 in QGuiApplicationPrivate::processMouseEvent (e=0x2749ec28) at kernel\\qguiapplication.cpp:1790\n"
>~"#30 0x07d582a8 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x2749ec28) at kernel\\qguiapplication.cpp:1582\n"
>~"#31 0x07d4b8de in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\\qwindowsysteminterface.cpp:608\n"
>~"#32 0x6285ebf1 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x364468) at qwindowsguieventdispatcher.cpp:82\n"
>~"#33 0x028cba98 in qt_internal_proc(HWND__*, unsigned int, unsigned int, long)@16 (hwnd=0xd048c, message=1025, wp=0, lp=0) at kernel\\qeventdispatcher_win.cpp:412\n"
>~"#34 0x76c162fa in gapfnScSendMessage () from C:\\Windows\\syswow64\\user32.dll\n"
fixed