Bug 460634 - Lokalize crashes when opening the find box
Summary: Lokalize crashes when opening the find box
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.08.1
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: wojnilowicz
URL:
Keywords: drkonqi
: 466062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-18 01:30 UTC by Emir SARI
Modified: 2025-01-19 19:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emir SARI 2022-10-18 01:30:54 UTC
Application: lokalize (22.08.1)

Qt Version: 5.15.6
Frameworks Version: 5.98.0
Operating System: Linux 5.15.0-50-generic x86_64
Windowing System: X11
Distribution: KDE neon User - 5.26
DrKonqi: 5.26.0 [KCrashBackend]

-- Information about the crash:
Lokalize crashes 8 out of 10 times when following the path Edit - Find. If it successfully opens, it still crashes when trying to open an entry from the results table.

The crash can be reproduced every time.

-- Backtrace:
Application: Lokalize (lokalize), signal: Segmentation fault

[New LWP 15501]
[New LWP 15503]
[New LWP 15504]
[New LWP 15505]
[New LWP 15506]
[New LWP 15507]
[New LWP 15508]
[New LWP 15509]
[New LWP 15513]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007ff1de73c99f in __GI___poll (fds=0x7ffd2a170bf8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
[Current thread is 1 (Thread 0x7ff1dafb09c0 (LWP 15499))]

Thread 10 (Thread 0x7ff1ad9b8700 (LWP 15513)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557704a0e634) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557704a0e5e0, cond=0x557704a0e608) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557704a0e608, mutex=0x557704a0e5e0) at pthread_cond_wait.c:647
#3  0x00007ff1dec905eb in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ff1dec8da91 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ff1dec8a543 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7ff1af7fe700 (LWP 15509)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55770498ee80) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55770498ee30, cond=0x55770498ee58) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55770498ee58, mutex=0x55770498ee30) at pthread_cond_wait.c:647
#3  0x00007ff1dec905eb in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ff1dec8da91 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ff1dec8a543 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7ff1affff700 (LWP 15508)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557704982cd4) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557704982c80, cond=0x557704982ca8) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557704982ca8, mutex=0x557704982c80) at pthread_cond_wait.c:647
#3  0x00007ff1dec905eb in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ff1dfd5d35a in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ff1dec8a543 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7ff1c6849700 (LWP 15507)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557703e2a2c8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557703e2a278, cond=0x557703e2a2a0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557703e2a2a0, mutex=0x557703e2a278) at pthread_cond_wait.c:647
#3  0x00007ff1d263a5eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007ff1d263a1eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7ff1d0c71700 (LWP 15506)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557703e345d0) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557703e34580, cond=0x557703e345a8) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557703e345a8, mutex=0x557703e34580) at pthread_cond_wait.c:647
#3  0x00007ff1d2d2318b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007ff1d2d2310b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7ff1d1472700 (LWP 15505)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557703e345d0) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557703e34580, cond=0x557703e345a8) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557703e345a8, mutex=0x557703e34580) at pthread_cond_wait.c:647
#3  0x00007ff1d2d2318b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007ff1d2d2310b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7ff1d1c73700 (LWP 15504)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557703e39d38) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557703e39ce8, cond=0x557703e39d10) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557703e39d10, mutex=0x557703e39ce8) at pthread_cond_wait.c:647
#3  0x00007ff1d2d2607b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007ff1d2d25edb in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7ff1d2474700 (LWP 15503)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557703e39bd8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557703e39b88, cond=0x557703e39bb0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x557703e39bb0, mutex=0x557703e39b88) at pthread_cond_wait.c:647
#3  0x00007ff1d2d2607b in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007ff1d2d25edb in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7ff1da18f700 (LWP 15501)):
#0  0x00007ffd2a1adaed in clock_gettime ()
#1  0x00007ff1de7070b5 in __GI___clock_gettime (clock_id=1, tp=0x7ff1da18e920) at ../sysdeps/unix/sysv/linux/clock_gettime.c:38
#2  0x00007ff1deecb465 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ff1deec9cfd in QTimerInfoList::updateCurrentTime() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ff1deeca2d9 in QTimerInfoList::timerWait(timespec&) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ff1deecb8f6 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ff1dd5188ef in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ff1dd51929b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ff1dd5194a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ff1deecbb9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ff1dee6fb3b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ff1dec89342 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ff1df17df4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#13 0x00007ff1dec8a543 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ff1de12c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x00007ff1de749133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ff1dafb09c0 (LWP 15499)):
[KCrash Handler]
#4  0x00007ff1dfcb1fd0 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ff1dfcb3242 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ff1dfb63db6 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ff1dfcb585b in QMenu::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ff1dfb20e43 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ff1dfb29e47 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ff1dee7103a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ff1dfb29147 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ff1dfb7fa3e in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ff1dfb822c4 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ff1dfb20e43 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ff1dfb29c58 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ff1dee7103a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ff1df4217c0 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#18 0x00007ff1df422e65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#19 0x00007ff1df3f96bc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007ff1da8cfe3e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#21 0x00007ff1dd51917d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ff1dd519400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ff1dd5194a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ff1deecbb82 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ff1dee6fb3b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ff1dee77ce4 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x000055770285f7db in ?? ()
#28 0x00007ff1de64e083 in __libc_start_main (main=0x55770285ec70, argc=1, argv=0x7ffd2a1727a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd2a172798) at ../csu/libc-start.c:308
#29 0x000055770286060e in _start ()
[Inferior 1 (process 15499) detached]

Reported using DrKonqi
Comment 1 Bug Janitor Service 2023-02-19 09:20:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/32
Comment 2 wojnilowicz 2023-02-19 09:34:21 UTC
1. The crash happens because code leaks memory in Lokalize and in Qt\KDE (See also bug #466062)
2. If Lokalize code would not leak memory then Edit->Find could be opened without a crash with a Ctrl+F shortcut
3. The proposed patch fixes the leak in Lokalize and works around the leak in Qt\KDE
Comment 3 wojnilowicz 2023-02-21 22:23:47 UTC
Git commit fcf8180abce948dc48348ae2811e1804d3bcc278 by Łukasz Wojniłowicz.
Committed on 21/02/2023 at 15:57.
Pushed by aacid into branch 'master'.

Fix the memory leak after Edit->Find in the project tab

M  +2    -0    src/filesearch/filesearchtab.cpp
M  +8    -1    src/project/projecttab.cpp
M  +5    -0    src/project/projecttab.h

https://invent.kde.org/sdk/lokalize/commit/fcf8180abce948dc48348ae2811e1804d3bcc278
Comment 4 Christoph Cullmann 2025-01-19 19:16:30 UTC
*** Bug 466062 has been marked as a duplicate of this bug. ***