Bug 501646

Summary: Rescanning project files without a project open causes Lokalize to hang
Product: [Applications] lokalize Reporter: Atirut Wattanamongkol <atirut.wattanamongkol>
Component: translation memoryAssignee: Simon Depiets <sdepiets>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, shafff
Priority: NOR    
Version First Reported In: 24.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Atirut Wattanamongkol 2025-03-17 15:22:30 UTC
Rescanning project files without a project open causes Lokalize to hang, with the only way out being a `killall` command. KDE fails to terminate the app.


STEPS TO REPRODUCE
1. Open Lokalize, and make sure to close any projects
2. Rescan project files

OBSERVED RESULT
The app hangs indefinitely, with KDE unable to terminate the app.

EXPECTED RESULT
The app reports an error

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 41
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
None
Comment 1 Bug Janitor Service 2025-03-20 21:53:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/209
Comment 2 Finley Watson 2025-03-20 22:00:34 UTC
Git commit b436f2cfd095dcabe7be492453423612a28ebe97 by Finley Watson.
Committed on 20/03/2025 at 22:00.
Pushed by finw into branch 'master'.

Do not rescan translation memory if no project is loaded

This was rescanning from root / instead of a project dir
when there was no project loaded.

M  +6    -4    src/tm/tmtab.cpp

https://invent.kde.org/sdk/lokalize/-/commit/b436f2cfd095dcabe7be492453423612a28ebe97
Comment 3 Albert Astals Cid 2025-03-20 22:47:40 UTC
Git commit 1409be050f9d6beee38fd6ae6db96696a5129692 by Albert Astals Cid, on behalf of Finley Watson.
Committed on 20/03/2025 at 22:44.
Pushed by aacid into branch 'release/25.04'.

Do not rescan translation memory if no project is loaded

This was rescanning from root / instead of a project dir
when there was no project loaded.
(cherry picked from commit b436f2cfd095dcabe7be492453423612a28ebe97)

M  +6    -4    src/tm/tmtab.cpp

https://invent.kde.org/sdk/lokalize/-/commit/1409be050f9d6beee38fd6ae6db96696a5129692
Comment 4 Albert Astals Cid 2025-03-22 00:28:16 UTC
Git commit 9402eedba3ce294c63cc57256c97141b7daa01e9 by Albert Astals Cid, on behalf of Finley Watson.
Committed on 22/03/2025 at 00:28.
Pushed by aacid into branch 'master'.

Show warning when rescan clicked but no project is open

M  +5    -1    src/tm/tmtab.cpp

https://invent.kde.org/sdk/lokalize/-/commit/9402eedba3ce294c63cc57256c97141b7daa01e9