Search function is quite buggy

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

Post Reply
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Search function is quite buggy

Post by *AndriusS »

Search function is very important for me, but I found it quite buggy in Android versions of Total Commander... I have tested it on Android 2.3.6 and Android 4.4.4 versions and tested it with two versions of TC: V2.70 and newest V2.91.
Bellow I'm providing two indications of my bad experience:
1. Searching for any (*) file, containing some text (eg.: "SomeText") in the directory with a plenty of empty files (the size of the file equals to 0 bytes) results in never-ending search process. In my case there was a directory /dev on the "rooted" phone;
2. Searching for any (*) file, containing some text (eg.: "SomeText") in large files (about 100MB) sometimes ends-up with a crash of Total Commander.

P.S.: In my case Total Commander is forever granted with SuperUser permissions on my phone.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40066
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Search function is quite buggy

Post by *ghisler(Author) »

1. /dev are not empty files, they are devices. TC probably tries to read from these devices, which can be an endless stream.
2. Not confirmed, do you see a notification to send a bug report to me? If yes, please use it.
Author of Total Commander
http://www.ghisler.com
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Re: Search function is quite buggy

Post by *AndriusS »

I have tested issue #2 in more closely and found the way to reproduce the crash as easy as possible... Contrary to what was said a few days ago, the problem is not about large files. Below I list the steps I was using to achieve the crash:
1. Firstly, I have deleted all unused files in SDcard to run this test more quickly;
2. Then, I'm going to the "File system root":
Image: https://www.part.lt/img/877749b292085050375c77529a297624119.png

3. Then, I push the button "More" and selecting the "Search..." option:
Image: https://www.part.lt/img/20386227ad37302fb1d26e3232f124d9506.png

4. Entering some text in the "Containing text" box and tapping the "Search" button:
Image: https://www.part.lt/img/7ffbdf803b185c3210703dbd8c7801fd882.png

5. Then the searching process is running and suddenly my phone (!!!) crashes in about 15-20 secs;
6. After that, my phone automatically restarts...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40066
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Search function is quite buggy

Post by *ghisler(Author) »

Maybe it's a faulty file system. Apps shouldn't be able to crash the entire phone, so it must be a crash at a lower operating system level when reading from a file fails.
Author of Total Commander
http://www.ghisler.com
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Re: Search function is quite buggy

Post by *AndriusS »

I have spent some time by digging deeper into this technical issue and identified the file which is causing the crash of the system: it's "/d/emdh/reg"...
Maybe, is it worth to improve the searching algorithm in TC? - I mean, to include an imperative built-in rule: Not to read the file if the size of this file is smaller than the length of the string in the field "Containing text".
Of course, the user of the current version of TC could also make it manually: by checking the checkbox "Size" and by entering the minimal number of bytes. But the technical solution with an additional built-in rule would be pretty nice, more stable and more user-friendly :wink:... And most important - without any changes in the TC's GUI.
Last edited by AndriusS on 2020-03-11, 22:07 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40066
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Search function is quite buggy

Post by *ghisler(Author) »

There is no folder /d on any of my devices. Is this a typo? Do you mean /data ?
Author of Total Commander
http://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 11839
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Search function is quite buggy

Post by *Hacker »

Christian,
I think for me /d appeared when I activated Use root functions everywhere. There were different dirs shown with this function on than with off.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Re: Search function is quite buggy

Post by *AndriusS »

ghisler(Author) wrote:
2020-03-11, 18:35 UTC
There is no folder /d on any of my devices. Is this a typo? Do you mean /data ?
No, /d and /data are two different folders. See the screenshots below:
Image: https://www.part.lt/img/3b32db6aad1b0c4a2127378ebbdd56cb751.png
Image: https://www.part.lt/img/fa974b7bf3a8b69ffeaa7bc3a2db73b0245.png
Hacker wrote:
2020-03-11, 18:51 UTC
I think for me /d appeared when I activated Use root functions everywhere. There were different dirs shown with this function on than with off.
The checkbox "Root functions everywhere" is unchecked in TC, but TC app is forever granted with SuperUser permissions on my phone.

P.S.: Currently, I'm using Samsung GT-S7500 with Cyanogenmod 11 ROM, based on Android KitKat 4.4.4
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40066
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Search function is quite buggy

Post by *ghisler(Author) »

Do you really need to search through all these system folders?
Author of Total Commander
http://www.ghisler.com
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Re: Search function is quite buggy

Post by *AndriusS »

Yes... It's very useful in case somebody have no idea of where to search for specific file(s) containing some text.
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Search function is quite buggy

Post by *DrShark »

I also have /d/ dir on Meizu M2 with Android 5.1 (not rooted), but here the Search of TC4A, without or with "Containing text:" option active, doesn't crash TC or Android/phone.
UPD. I can confirm the phone crash on not rooted Android 4.3.1 device while searching the text in /d/! I just sent a link to a video of the crash to cghisler address.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Search function is quite buggy

Post by *DrShark »

2AndriusS and everyone who had/has serious problems like hangs, crashes, device reboots while using the Search in Total Commander for Android.

Latest Total Commander test version, 3.10 beta 8, introduced internal (not user-configurable) blocklist which includes filenames which are known for making troubles for TC Search, like endless or extremely long search/hangs, Android hangs or restarts/reboots of the device.

I have already reported by email some names of files because of which the search had serious troubles in Android environments I access.

It would be nice it you could check whether your Android device still reboots when searching for content in /d/ with newest TC version.
If yes, would be nice if you could try to locate the full path of file or directory on trying to access which the reboot happens.

Some hints to make finding such file more quickly:
1) while in /d/ you can select just all files or all folders using the first left "Sel" button on TC4A toolbar.
This way you can quicky find whether it crashes by some file in /d/, or somewhere in its dubdir.
Then you can do the same in each subdir of /d/.
2) new TC beta added a way to exclude folders in a Search folder:
* | *excludesfilename* *excludesdirname*/
3) you can also try Hide files (ignore list) to reduce search locations, although Ignore list is not used in some cases (you may notice this if you'r using TC4A with root functions everywhere option enabled and root rights granted) - it is not supported in:
- root folders
- plugins
(Christian Ghisler mentions following reason: "Issuing a "remove directory" command in one of these would delete also non-empty dirs, so showing a directory with ignored files as empty is very risky")
4) to check whether the files are troubled, you can use TC Editor to open them.
Although possible problem which happens if to open some file with TC Editor (or trying to copy/move it) doesn't always mean the Search will have a problem as well, usually it does. So it's an easy way to find most of such problematic files. New internal blocklist is currently used by Search function only.

Since most of Android system files don't have an extension, for optimal use of TC Editor you can add an internal association with if for files with no extension: go to Configure..., Internal associations, for New association type a dot (.) as extension.

Also note that TC Editor intentionally doesn't open the files with "c" permission which means a "character device", while other TC fuctions like Search may access them and in some cases hang etc., though most (all?) the "character device" files are located under /dev/.

For /dev/ and everything under it the new internal blocklist currently intentionally is not used - it's a devices directory which is not meant for searching by regular user, and TC4A doesn't search under /dev/, /sys/ and /proc/ when search starts in / (root). The log files are also currently NOT considered for addding to the blocklist. However, I guess it's OK to post all the file names and their location here if they cause troubles with any TC functions, just describe what kind of problem you have with file (or directory) - this information will be useful for adding such names to personal exclude/ignore lists by users.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
Post Reply