?Search results randomly forgotten

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

?Search results randomly forgotten

Post by *MarcinW »

I noticed random problems with Alt+F7 search results - when opening search window again, sometimes it is not filled with previous search results. This problem does NOT seem to depend on memory usage, because Task Manager shows that TC memory usage can be as low as few MB when the problem appears.

When I was performing tests, I noticed two distinguishable cases:

1) I press Alt+F7, "Search for" is empty, "Search in" contains "C:\". Of course, this will find a lot of files. After closing and reopening Alt+F7 window, the result list is almost always empty.

2) I press Alt+F7, "Search for" contains "*.dll", "Search in" contains "C:\WINDOWS\SYSTEM32" and "Find text" contains "GetClassNameA". There is a lot of "*.dll" files in this directory, but the result list is quite short, because most of these files don't contain "GetClassNameA" string. After closing and reopening Alt+F7 window, the result list is sometimes empty, but in most cases is loaded properly.

Tested with 32-bit Beta 15, with Windows 2000 and Windows XP.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Search settings are normally NOT all restored. For example, TC will suggest the path in the currently active file panel for the start of the search.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

ghisler(Author) wrote:Search settings are normally NOT all restored.
The bug report is not about search settings but search results.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah, sorry, I misunderstood. The search settings are preserved when you use "Go to file" or "Cancel". They are NOT preserved when you use "Feed to listbox", because the list is then passed to the main program.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2ghisler(Author)

I think you still misunderstand - the observation is, that searches with a short result list is shown again when the Search dialog is reopened, but long lists are not shown - is that by design - or is it a bug?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Some explanations:

a) I don't feed to listbox - I just use "Go to file" or "Cancel". The normal behavior is that the result list should be restored, but it is sometimes randomly forgotten.

b) I noticed that the problem appears for long result lists and also for short result lists (when "Find text" option is active). And this problem does not seem to be connected with available memory.

Maybe some debug info could be added to the next beta, by using OutputDebugString API. For example something like:
- "Saving 123 search results",
- "Saved 123 search results",
- "Failed to save 123 search results",
- "Restoring 123 search results",
- "Restored 123 search results",
- "Failed to restore 123 search results",
- "123 search results cleared".
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, cannot reproduce.

Maybe you just opened the separate search dialog by accident.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

I can reproduce this problem also with TC 8.01, where the separate search dialog is not present.
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2ghisler(Author)
Step to reproduce under Windows XP:

1. Goto root of drive C:
2. Press Alt+F7
3. Leave the "Search for" field blank and start the search
4. At the end of the search I have approximately 60000 files and 7700 dirs in the search results list.
5. Close the Find Files dialog by clicking the red x in the upper right corner.
6. Press Alt+F7 again - no search result is shown.

It only happens if I close the Find Files dialog with the red x in the upper right corner - not when I press Escape or use the [Cancel] button.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

petermad wrote:It only happens if I close the Find Files dialog with the red x in the upper right corner - not when I press Escape or use the [Cancel] button.
Well, you found the real cause of the problem :). The problem is 100% reproducible when clicking "x" or pressing Alt+F4. And length of the result list doesn't matter.
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

petermad wrote:Step to reproduce under Windows XP:

1. Goto root of drive C:
2. Press Alt+F7
3. Leave the "Search for" field blank and start the search
4. At the end of the search I have approximately 60000 files and 7700 dirs in the search results list.
5. Close the Find Files dialog by clicking the red x in the upper right corner.
6. Press Alt+F7 again - no search result is shown.
Confirm the problem in TC 8.01 and 8.5 beta 15 (32 Bit); don't know about 64 Bit TC, though.
It only happens if I close the Find Files dialog with the red x in the upper right corner - not when I press Escape or use the [Cancel] button.
It happens if the search dialog is closed with Alt+F4 as well.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I just tested 64bit version - it also happens here!
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah yes, I totally forgot - the search is only saved when you use Cancel or go to file. It is not preserved when you use the red X or "Feed to listbox". I don't remember why it is this way, but it seems to be intentional - it's the same in 32-bit and 64-bit.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Mhmm, so the right question is not if this behavior intentional or not, but how this can be helpful for the user. In other words: what is the advantage of clearing search results list. In my personal opinion there is no such advantage - time of loading the list is meaningless, and I don't see any other reasons for clearing the list. The list could be safely restored in all cases, and if the user doesn't need the list, he may simply ignore it...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It could be useful to reduce the used memory (RAM). A large search result can eat a lot of RAM.
Author of Total Commander
https://www.ghisler.com
Post Reply