eteran / nedit-ng

a Qt5 port of the NEdit using modern C++14
GNU General Public License v2.0
96 stars 26 forks source link

crash with 2020.1-204-gfd49503 #314

Closed marilmanen closed 2 years ago

marilmanen commented 3 years ago

This time crash happened while I was doing something else and I didn't see the actual crash

#0  0x00002b409038a090 in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#1  0x00002b40905a56db in QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) ()
    at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#2  0x00002b40905a5bd8 in QObject::connectImpl(QObject const*, void**, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) ()
    at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#3  0x00000000004e92ee in DocumentWidget::resumeMacroExecution() (type=Qt::AutoConnection, slot=..., context=<optimized out>, signal=
    (void (QTimer::*)(QTimer * const, QTimer::QPrivateSignal)) 0x2b40905b48f0 <QTimer::timeout(QTimer::QPrivateSignal)>, sender=<optimized out>)
    at /tools/ext/free/qt/5.15.3/include/QtCore/qobject.h:347
#4  0x00000000004e92ee in DocumentWidget::resumeMacroExecution() (this=0x69c0230) at /tools/ext/free/downloads/nedit-ng/src/DocumentWidget.cpp:5419
#5  0x00000000005a5b3a in QtPrivate::QFunctorSlotObject<(anonymous namespace)::listDialogMS(DocumentWidget*, Arguments, DataValue*)::<lambda(int)>, 1, QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (__closure=0x27a42d0) at /tools/ext/free/downloads/nedit-ng/src/macro.cpp:2965
#6  0x00000000005a5b3a in QtPrivate::QFunctorSlotObject<(anonymous namespace)::listDialogMS(DocumentWidget*, Arguments, DataValue*)::<lambda(int)>, 1, QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (arg=<optimized out>, f=...) at /tools/ext/free/qt/5.15.3/include/QtCore/qobjectdefs_impl.h:146
#7  0x00000000005a5b3a in QtPrivate::QFunctorSlotObject<(anonymous namespace)::listDialogMS(DocumentWidget*, Arguments, DataValue*)::<lambda(int)>, 1, QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (arg=<optimized out>, f=...) at /tools/ext/free/qt/5.15.3/include/QtCore/qobjectdefs_impl.h:256
#8  0x00000000005a5b3a in QtPrivate::QFunctorSlotObject<(anonymous namespace)::listDialogMS(DocumentWidget*, Arguments, DataValue*)::<lambda(int)>, 1, QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x27a42c0, r=<optimized out>, a=<optimized out>, ret=<optimized out>)
    at /tools/ext/free/qt/5.15.3/include/QtCore/qobjectdefs_impl.h:443
#9  0x00002b40905b0024 in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#10 0x00002b408f56186e in QDialog::finished(int) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#11 0x00002b40905b0024 in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#12 0x00002b408f461f22 in QAbstractButton::clicked(bool) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#13 0x00002b408f46210a in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#14 0x00002b408f4634aa in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#15 0x00002b408f463675 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#16 0x00002b408f3b9de8 in QWidget::event(QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#17 0x00002b408f4fce9f in QPushButton::event(QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#18 0x00002b408f37bbec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#19 0x00002b408f3833a7 in QApplication::notify(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#20 0x00002b4090574aa3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#21 0x00002b408f381b3c in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#22 0x00002b408f3d3d3a in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#23 0x00002b408f3d6acb in  () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#24 0x00002b408f37bbec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#25 0x00002b408f38252f in QApplication::notify(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Widgets.so.5
#26 0x00002b4090574aa3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#27 0x00002b408fb9537b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Gui.so.5
#28 0x00002b408fb96845 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /tools/ext/free/qt/5.15.3/lib/libQt5Gui.so.5
#29 0x00002b408fb7049b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /tools/ext/free/qt/5.15.3/lib/libQt5Gui.so.5
#30 0x00002b40973636fa in  () at /tools/ext/free/qt/5.15.3/lib/libQt5XcbQpa.so.5
#31 0x00002b4094c63099 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#32 0x00002b4094c633f8 in g_main_context_iterate.isra.19 () at /lib64/libglib-2.0.so.0
#33 0x00002b4094c634ac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#34 0x00002b40905d399c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#35 0x00002b409057346a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#36 0x00002b409057c583 in QCoreApplication::exec() () at /tools/ext/free/qt/5.15.3/lib/libQt5Core.so.5
#37 0x0000000000480d92 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /tools/ext/free/downloads/nedit-ng/src/nedit.cpp:146
eteran commented 3 years ago

You always have something interesting for me!

This looks like it happened during macro resuming. I'll check it out!

marilmanen commented 3 years ago

Now I got same core dump again. I also notice that I was not using the latest version, so I'll update to the latest .

eteran commented 3 years ago

Oh yea, please do an update! I couldn't quite nail the cause of this one down, so it's been hard to diagnose. Maybe if we're lucky it's already been fixed, LOL.

eteran commented 3 years ago

So a POSSIBLE fix is in... maybe. Basically I found a spot where during macro execution, legacy nedit was using an uninitialized variable, and NG was simply crashing. It had to do with macro execution when the cursor is not currently visible. So I can imagine a scenario where you've got some delayed macro execution or even a macro executing the background and hitting it.

Since it's not the same exact backtrace, I'm not going to close this issue just yet, but will be cautiously optimistically keeping an eye on it ;-)

marilmanen commented 3 years ago

I have now the latest version in use, so let's see if I can make it crash :-)

eteran commented 3 years ago

Good luck, You are one of the more reliable "testers" I have, each finding helps!

eteran commented 2 years ago

Closing this since it's unclear if the crash happened with the latest code. Please open a new issue with details if you experience a crash again.