Closed jcprpr closed 1 year ago
A backtrace would be quite helpful if you can provide one. Otherwise, I won't be able to identify the issue. I am also using the Qt version on Linux, but I cannot induce such a crash.
(gdb) run
Starting program: /usr/local/bin/textadept
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff30026c0 (LWP 2779)]
[New Thread 0x7ffff28016c0 (LWP 2780)]
double free or corruption (!prev)
Thread 1 "textadept" received signal SIGABRT, Aborted.
0x00007ffff67d183c in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff67d183c in () at /usr/lib/libc.so.6
#1 0x00007ffff6781668 in raise () at /usr/lib/libc.so.6
#2 0x00007ffff67694b8 in abort () at /usr/lib/libc.so.6
#3 0x00007ffff676a390 in () at /usr/lib/libc.so.6
#4 0x00007ffff67db7b7 in () at /usr/lib/libc.so.6
#5 0x00007ffff67dda18 in () at /usr/lib/libc.so.6
#6 0x00007ffff67e0413 in free () at /usr/lib/libc.so.6
#7 0x00005555557a2eeb in QVarLengthArray<char, 1024>::~QVarLengthArray() ()
#8 0x00005555557a186e in ScintillaEditBase::inputMethodQuery(Qt::InputMethodQuery) const ()
#9 0x00007ffff7a812bf in QWidget::event(QEvent*) ()
at /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff7b2f703 in QFrame::event(QEvent*) ()
at /usr/lib/libQt5Widgets.so.5
#11 0x000055555579f013 in ScintillaEditBase::event(QEvent*) ()
#12 0x00007ffff7a4a93f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff6fbb6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt5Core.so.5
#14 0x00007ffff1d65b19 in ()
at /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so
#15 0x00007ffff73b5ca4 in QInputMethod::update(QFlags<Qt::InputMethodQuery>) ()
at /usr/lib/libQt5Gui.so.5
#16 0x00005555557a1a7b in ScintillaEditBase::notifyParent(Scintilla::NotificationData) ()
#17 0x000055555579b443 in ScintillaEditBase::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#18 0x00007ffff6ff07f3 in () at /usr/lib/libQt5Core.so.5
#19 0x000055555579df8e in Scintilla::Internal::ScintillaQt::notifyParent(Scintilla::NotificationData) ()
#20 0x00005555557a5402 in Scintilla::Internal::ScintillaQt::NotifyParent(Scintilla::NotificationData) ()
#21 0x00005555558243e8 in Scintilla::Internal::Editor::NotifyUpdateUI() ()
#22 0x000055555581fd50 in Scintilla::Internal::Editor::Paint(Scintilla::Internal::Surface*, Scintilla::Internal::PRectangle) ()
#23 0x00005555557a6b03 in Scintilla::Internal::ScintillaQt::PartialPaint(Scintilla::Internal::PRectangle const&) ()
#24 0x000055555579f07c in ScintillaEditBase::paintEvent(QPaintEvent*) ()
#25 0x00007ffff7a81080 in QWidget::event(QEvent*) ()
at /usr/lib/libQt5Widgets.so.5
#26 0x00007ffff7b2f703 in QFrame::event(QEvent*) ()
at /usr/lib/libQt5Widgets.so.5
#27 0x00007ffff6fb8702 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#28 0x00007ffff7a4a92f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt5Widgets.so.5
#29 0x00007ffff6fbb6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt5Core.so.5
#30 0x00007ffff7a74fbb in QWidgetPrivate::sendPaintEvent(QRegion const&) ()
at /usr/lib/libQt5Widgets.so.5
#31 0x00007ffff7a763bd in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#32 0x00007ffff7a76dce in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
at /usr/lib/libQt5Widgets.so.5
#33 0x00007ffff7a7585e in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#34 0x00007ffff7a76dce in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
at /usr/lib/libQt5Widgets.so.5
#35 0x00007ffff7a7585e in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#36 0x00007ffff7a76dce in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
at /usr/lib/libQt5Widgets.so.5
#37 0x00007ffff7a7585e in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#38 0x00007ffff7a76dce in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
at /usr/lib/libQt5Widgets.so.5
#39 0x00007ffff7a7585e in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#40 0x00007ffff7a76dce in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
at /usr/lib/libQt5Widgets.so.5
#41 0x00007ffff7a7585e in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5
#42 0x00007ffff7a56719 in () at /usr/lib/libQt5Widgets.so.5
#43 0x00007ffff7a81111 in QWidget::event(QEvent*) ()
at /usr/lib/libQt5Widgets.so.5
#44 0x00007ffff7a4a93f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt5Widgets.so.5
#45 0x00007ffff6fbb6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt5Core.so.5
#46 0x00007ffff6fc065b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#47 0x00007ffff70066d8 in () at /usr/lib/libQt5Core.so.5
#48 0x00007ffff5ca6a31 in g_main_context_dispatch ()
at /usr/lib/libglib-2.0.so.0
#49 0x00007ffff5d03cc9 in () at /usr/lib/libglib-2.0.so.0
#50 0x00007ffff5ca40e2 in g_main_context_iteration ()
at /usr/lib/libglib-2.0.so.0
#51 0x00007ffff700a51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#52 0x00007ffff6fba404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#53 0x00007ffff6fbb8a3 in QCoreApplication::exec() ()
at /usr/lib/libQt5Core.so.5
#54 0x00005555557200b1 in Application::exec() ()
#55 0x0000555555719a7b in main ()
When trying to paste the text here I managed to reproduce the issue with ctrl + a.
Thanks. This is an issue in Scintilla, Textadept's editing component. More specifically it looks like it's an issue with the Qt input method. The most recent release of Scintilla had a lot of Qt input changes, so this is probably a regression. I'll report it upstream.
Hopefully this is fixed via https://github.com/orbitalquark/textadept/commit/7ddeec6debdc7854435f2e3e1d90061e757ec13c and will be in the next nightly build. The patch comes from upstream.
A quick check indicates that the issue is solved, thanks for the prompt fix.
Textadept crashes when selecting a large (but not unreasonably large) amount of text with keyboard (shift + arrow keys) or with mouse. I could not reproduce the problem with ctrl + a. The error message is usually
double free or corruption (!prev)
but one time I gotfree(): invalid next size (normal)
. I am using version 12 on Linux (qt) and things seem to be fine in the terminal version and in version 12 beta.