Application: kig (20.04.0) Qt Version: 5.12.5 Frameworks Version: 5.70.0 Operating System: Linux 5.6.0-2-amd64 x86_64 Distribution: Debian GNU/Linux bullseye/sid -- Information about the crash: - What I was doing when the application crashed: Try to export a document with kig 20.04 as SVG and kig crashes every time. The crash can be reproduced every time. -- Backtrace: Application: Kig (kig), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7f9db9650800 (LWP 263683))] Thread 2 (Thread 0x7f9db6654700 (LWP 263685)): #0 __GI___libc_read (nbytes=16, buf=0x7f9db6653b60, fd=9) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __GI___libc_read (fd=9, buf=0x7f9db6653b60, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x00007f9dbbe38f5f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f9dbbdf134e in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f9dbbdf17a2 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f9dbbdf191f in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007f9dbd85f7db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f9dbd8086db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #8 0x00007f9dbd6496f1 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #9 0x00007f9dbcbb04e6 in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5 #10 0x00007f9dbd64a872 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #11 0x00007f9dbc77ef27 in start_thread (arg=<optimized out>) at pthread_create.c:479 #12 0x00007f9dbd2de31f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7f9db9650800 (LWP 263683)): [KCrash Handler] #4 0x00007f9dbd8e5680 in QArrayData::shared_null () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f9db4d4be4f in SVGExporter::run (this=<optimized out>, part=..., w=...) at ./filters/svgexporter.cc:73 #6 0x00007f9dbd8344e8 in QMetaObject::activate(QObject*, int, int, void**) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f9dbe1fe812 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #8 0x00007f9dbe200e52 in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #9 0x00007f9dbe3824e2 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #10 0x00007f9dbe389b5a in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #11 0x00007f9dbe38ab82 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #12 0x00007f9dbe246776 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007f9dbe38d173 in QMenu::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007f9dbe204c32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007f9dbe20e3e3 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007f9dbd809a52 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #17 0x00007f9dbe20d4f3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007f9dbe2629c4 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007f9dbe264ec4 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007f9dbe204c32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007f9dbe20e190 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007f9dbd809a52 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #23 0x00007f9dbdbe8a13 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #24 0x00007f9dbdbea26b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #25 0x00007f9dbdbc4ecb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #26 0x00007f9db9214cda in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #27 0x00007f9dbbdf160d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #28 0x00007f9dbbdf1890 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #29 0x00007f9dbbdf191f in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #30 0x00007f9dbd85f7c1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #31 0x00007f9dbd8086db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #32 0x00007f9dbd810182 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #33 0x0000564b06004783 in main (argc=<optimized out>, argv=<optimized out>) at ./kig/main.cpp:147 [Inferior 1 (process 263683) detached] Possible duplicates by query: bug 422200, bug 418660, bug 409497, bug 381101, bug 377656. Reported using DrKonqi
Known working version: kig from 17.08.3 (debian stable packages)
Reproduced on master.
Looking at the code, it looks like the old version tried to embed the SVG options into the file dialog. I remember we re-introduced a configurable dialog for e.g. JPEG options in recent versions, and the correct fix would be to port to this new file dialog functions. A quick workaround is the remove the "delete opts;" line in the SVG exporter.
Crashes also when exporting to LaTeX, Image, and Asymptote because of the same reason. The options widget is also deleted via "delete optdlg;" in kigfiledialog.cc
*** Bug 422952 has been marked as a duplicate of this bug. ***
Can confirm for version kig-20.08.1-1.fc33.x86_64 on a Fedora 33 installation
can confirm with the latest git source: $ kig --version kig 21.03.70 when exporting to SVG kig dumps core with a segmentation fault: kf.kio.core: "Could not enter folder tags:/." Segmentation fault (core dumped) Now... this is a *nasty* bug. It could easily cause loss of work to the user. I tested the workaround proposed by Christof Feck and it works. So, shouldn't we go for it?
Git commit 8ea5219728cc6e727329a514f69ca69bca9f47db by David E. Narvaez. Committed on 07/12/2020 at 13:01. Pushed by narvaez into branch 'release/20.12'. Prevent Deletion of Option Dialog These are used (and deleted) later by the callers. This is a temporary fix so that it will go into the 20.12 release. A proper fix as outlined in Comment 3 of the bug report should go to master. FIXED-IN: 20.12.1 M +0 -1 misc/kigfiledialog.cc https://invent.kde.org/education/kig/commit/8ea5219728cc6e727329a514f69ca69bca9f47db
Could a fix (at least the temporary fix mentioned in comment #3) please be ported back to versions in which the error occurs? This is at least the case down to 20.04. This version is still used in current versions of released distros (e.g. openSuSE 15.3) and an update to 21 or above requires updating Qt libraries or even more which causes a lot of effort. Is there an easy alternative that I don't see? Should I ask the distributor for an update to 20.12? Thank you very much.
(In reply to Axel Schwank from comment #9) > Could a fix (at least the temporary fix mentioned in comment #3) please be > ported back to versions in which the error occurs? Backports for older versions of Gear are handled by the distributions, not upstream.