Hangs on start and on navigating directories
This is a simple GUI for the command line tool grep and pdfgrep
Status: Beta
Brought to you by:
sstein73
Hi there!
I was so happy to find that software. Great idea! Unfortunately it just does not really work in Xubuntu (20.04) and Kubuntu 20.04. Nothing happens when starting from gui, And from comandline you can see 100% CPU-usage - but nothing else happens. This happen not always - it works, when I start pdfgrepgui from command line while not from my home-directory! So I tried to configure it with removing the marker from "Verzeichnis speichern". Result was an error at the next start saying something like
"" ist not a valid string ... risk data corruption...
Any other try to navigate to another directory makes the software hang.
Hello Georg,
thank you for you comments.
I think the 100% CPU usage combined with no response from the program is because the program is looking for the pdf files at startup. The program don't use the command line tool pdfgrep in order to find the pdf files, it has it's own routine for this function.
Every time when you change the directory, all pdf files will be searched again in the folders/subfolders and will be shown in the listbox. If you have ten thousands of pdf files in these folders or a weak wireless connection on a server, the search can be very slowly and it looks like, that the program would hang.
In order to avoid this, I have changed the code in V0.3, so you can see the number of pdf files, which has been found during search.
Unfortunately I was not able to reproduce the the error you’ve got after disabeling the Checkbox “Save directory” in the options. But I changed the code in V0.3, that the current working directory is shown in the Listbox at startup, so I hope this error won’t appear anymore.
Please try Version 0.3, if now is all working.
Thanks.
Best regards
Stephan
Hello Georg,
there had been also some bugs (loops, when changing the search directory, which delayed the search for pdf files, etc.). I have changed some code, hoping to get rid of most bugs.
Please try Version 0.3.1
Best regards
Stephan
Hi Stephan
Sorry to say but still the programm seems unresponsive if started from my home-directory. For ...uhm ... more Minutes than I will ever wait, and there are not so many files in here.
When I call the Command from another directoy ( subdirectory with about 2.500 files ch about 450 are PDF-files)it works flawless and in reasonable time.
I can navigate from there to my home. There are all in all about 30.000 files in my home and subdirectories which seems not so much to me ( Browser-Cache, configs, Mail-Subdirectories an all that nonsense included). Alas - as i navigate pdfgrepgui to my home it gets lame and ... starts counting all the files in home and subdirectories at an unreasanable speed - after more then 3 minuites it has about 7000 files checked, while eating unreasonable amounts of CPU.
Seem, that strategy is not so good. I mean e.g a simple
is done in a few seconds,
Second: In ubuntu 20.04 in a nfs-environment I get after starting an Error:
"" is an invalid integer. (...)
apart from that the problems seem similar.
Hi Georg,
thank you for you email.
It looks like that I have to look deeper in this.
On my system (debian bullseye) I don't have these problems (or not seen until today), also not when using nfs. When I open a nfs folder with >20k files, it takes about 15 seconds, until the program shows 8255 pdf files in the box.
In my home directory I have less files (~1300) and it is very fast, when opening the program (less than 2 sek for showing ~2k pdf files).
I will install ubuntu 20.04 and I will try to reproduce the problem, by running the program step by step. It will take some time, because I am the next two weeks not in the office.
Best regards
Stephan
Hi Georg,
I had some time and I've installed Ubuntu 20.04. I also added some thousands pdf files, but I was not able to reproduce the problem. Perhaps a fresh installed system with nothing except of some pdf files does not make problems.
I have now added a logging in the program (new version 0.4.1), which logs the startup of the program.
Please install the new version and start the program from a command prompt: "pdfgrepgui -log -anonym" and send me the logfile (homedir/.config/pdfgrepgui/log.txt), when the program lags again.
Perhaps I can see, where the program hangs.
One remark: the findallfiles procedure, I use, also follows every symbolic link. When I type find . -name ".pdf" the symbolic links are not searched and I get much less results.
Perhaps you have defect symlinks. To find out, please run symlinks . (the "." is for the current dir or use symlink ~). If you have defect links, please remove them.
Best regards
Stephan
Last edit: Stephan Stein 2022-07-30
Thanks for adding the log option. My complete logfiles stay private because of senistive information in naming of directories. But the problem is obvious as you see here:
11:54:03 :: found pdf file : /home/georg/dosdevices/z:/home/georg/dosdevices/z:/home/georg/dosdevices/z:/home/georg/dosdevices/z:/home/georg/dosdevices/z:/home/georg/text/texmf/tex/latex/g-brief/x.pdf
Llisting the pdf-files gets in endless recursion as it follows symlinks (e.g. in my directory dosdevices, which is used for wine, my home directory shows up which contains dosdevices, whre my homediretroy shows up which...)
So of course you have endless iteration.
Hello Georg,
I am sorry that is not working in your configuration, perhaps you can change the links, that they are not referencing themselves.
Unfortunately it is not possible - or I didn't found it - to stop the used procedures to follow links. I will keep this in mind, perhaps I will find a solution for this later.
I have a new Version online, where you can show the folders instead of the files. But it will also follow the links and there will be probably the same problem. But if you want, you can give it a try.
Best regards
Stephan
Hello,
in Version 0.6.0 following SymLinks can be deactivated. This should solve the problem. There is also a commandline option -nosyml, in order to deactivate symlinks at startup.
Best regards
Stephan