Created attachment 127593 [details] Console output: Lokalize start, open project, click on source link, kill Lokalize STEPS TO REPRODUCE 1. Download source code wich contains translation files (for example maser branch of Inkscape); 2. Open project and click on entry in "Translation Units" window; 3. In window "Unit metadata" section "File:" click on link to source code; for example I got link "../src/live_effects/effect.cpp:275"; 4. Dialog "Source file lookup" appears; click "Locally" and select correct folder (link to source file must be valid); After that: - usage of all CPU core jumps to 100%, - memory usage grows until it reaches ~100%, - constantly appearing instances of text editor (in my case: Kate; in count 239 after killing Lokalize); all editors contains same file; - Lokalize became unresponsive; - process newer ends until I kill Lokalize. EXPECTED RESULT Lokalize must open link in only one external editor. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 19.10 KDE Plasma Version: 5.18.3 KDE Frameworks Version: 5.67.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION Attached console output.
Hello, What are your external editor settings in lokalize ? It's in Settings/General/Use a custom editor to open source files
Created attachment 127600 [details] Settings -> General
Setting "Use a custom editor to open source files" is unchecked. Attaching screenshot.
Confirmed with that po file from inkscape, I'll work on a fix Quite impressive spam :)
Recently I found: - if option "Use custom editor" is unchecked then during that "spam" I can switch desktops, use a process manager to kill Lokalize; - if that option is checked (field contains a string "kate %1:%2") then during "spam" system becomes unresponsive (can't switch desktops, etc.), I can only move mouse and press "Power" button to shutdown PC.
What folder did you select for the sources ? The one containing the po files?
Git commit 4812b6a3019ee7c49e52b5c4ad0fecc889f865ba by Simon Depiets. Committed on 26/04/2020 at 11:09. Pushed by sdepiets into branch 'master'. Prevent infinite loop on empty src folder There was an issue when the source folder didn't contain any source files, in that case the list of source files/directories remained empty and the folder was subsequently rescanned, creating an infinite loop. M +4 -1 src/project/project.cpp M +2 -0 src/project/project.h https://commits.kde.org/lokalize/4812b6a3019ee7c49e52b5c4ad0fecc889f865ba
(In reply to Simon Depiets from comment #6) > What folder did you select for the sources ? The one containing the po files? Folder containing the PO files.
I had an infinite loop there because that folder doesn't contain any source file, thus paths with ../ work only through direct resolution, but the indexation of the folder had an infinite loop. Could you build lokalize from master and give it a try?
(In reply to Simon Depiets from comment #9) > Could you build lokalize from master and give it a try? I followed instructions from https://userbase.kde.org/Lokalize. Also I installed packages about which CMake complained. But I had no success to build Lokalize (make log attached). Wrong versions of installed libraries.
Created attachment 127893 [details] Failed build log (make)
I meant: wrong version of libraries?
I just changed that because it's deprecated in the latest Qt, it should build if you "git revert 1bf326b"
(In reply to Simon Depiets from comment #13) > I just changed that because it's deprecated in the latest Qt, it should > build if you "git revert 1bf326b" I executed "git checkout 1bf326b" instead of "git revert..." (complains about registering, e-mail, and then every time prints "fatal: revert failed"), then applied a patch (I followed a link in comment #7) and compiled Lokalize. Now file in a link is opened in external editor and no more "spam". But I can do it only once, second click on a link has no effect.
What are the source files/messages you're trying to open? I noticed some files are missing from inkscape sources (until I build I guess)
(In reply to Simon Depiets from comment #15) > What are the source files/messages you're trying to open? I noticed some > files are missing from inkscape sources (until I build I guess) I am working on file "./po/lt.po"; there in first entry "Smart Jelly" is a link "../share/filters/filters.svg.h:2". If click that link then file opens in Kate. And after that this and other links no longer works (no reaction from Lokalize). I also found that some files are missing, maybe they are in "build" subfolder (I had build a Inkscape but didn't check if they are there). To get sources I used command "git clone --recurse-submodules https://gitlab.com/inkscape/inkscape.git" as written in "https://inkscape.org/develop/getting-started/".
I can't reproduce the files not opening, if you didn't check custom editor, then files will be opened according to the defined file association (for instance xml are opened in chrome on my computer).
Git commit 754114c4da162f3660d4a241830b3492442b3eaa by Simon Depiets. Committed on 06/05/2020 at 06:50. Pushed by sdepiets into branch 'release/20.04'. Prevent infinite loop on empty src folder There was an issue when the source folder didn't contain any source files, in that case the list of source files/directories remained empty and the folder was subsequently rescanned, creating an infinite loop. M +4 -1 src/project/project.cpp M +2 -0 src/project/project.h https://commits.kde.org/lokalize/754114c4da162f3660d4a241830b3492442b3eaa