View Issue Details

IDProjectCategoryView StatusLast Update
0002553Double CommanderDefaultpublic2021-03-07 23:58
Reporterfredvej Assigned To 
PrioritylowSeveritytrivialReproducibilityalways
Status newResolutionopen 
ProjectionnoneETAnone 
Platformx86_64OSLinux KDE ManjaroOS Version5.8.18-1-MANJARO
Product Version0.9.9Product Build9478 
Summary0002553: Find Files search for file mask single ; causes Unhandled exception: ERangeError: Range check error
DescriptionWhen I used Alt-F7 Find Files to search for files with a semicolon in the name, I used the file mask ; that is a single semicolon. I expected a search for *;* , because "Search for part of file name" was checked.

The search caused a range check error, and I could choose Abort or Ignore in the dialog box. Choosing Ignore brought me back to the Find Files results panel, and I could click Cancel and then Close to return to the main panel.

Search for *;* works, but it finds all files and directories, not just the ones with a ; in the name.

I suspect that the reason is that ; is used as separator in a list of patterns to search for.

$ locale
LANG=en_DK.UTF-8
LC_CTYPE="en_DK.UTF-8"
LC_NUMERIC=da_DK.UTF-8
LC_TIME="en_DK.UTF-8"
LC_COLLATE="en_DK.UTF-8"
LC_MONETARY=da_DK.UTF-8
LC_MESSAGES="en_DK.UTF-8"
LC_PAPER=da_DK.UTF-8
LC_NAME="en_DK.UTF-8"
LC_ADDRESS="en_DK.UTF-8"
LC_TELEPHONE=da_DK.UTF-8
LC_MEASUREMENT="en_DK.UTF-8"
LC_IDENTIFICATION=da_DK.UTF-8
LC_ALL=

and da_DK.UTF-8 uses semicolon for separators (at least it does in Libreoffice Calc).
Steps To ReproduceAlt+F7 Find Files , File mask a single semicolon
;
and check "Search for part of file name". Click Start.
Additional InformationDouble Commander
Version: 0.9.9 beta
Revision: 9478
Build date: 2020/10/06
Lazarus: 2.0.10.0
FPC: 3.2.0
Platform: x86_64-Linux-qt5
OS version: Manjaro Linux

Widgetset library: Qt 5.15.1, libQt5Pas 5.6.1
----------------------------------------------------

error log $DC_CONFIG_PATH/doublecmd.err

--------------- 08-11-2020, 18:42:01 ---------------
| DC v0.9.9 beta Rev. 9478 -- x86_64-Linux-qt5
| Manjaro Linux -- Qt 5.15.1, libQt5Pas 5.6.1 | PID 165317
Unhandled exception: ERangeError: Range check error
  Stack trace:
  $00000000007DF29A line 1073, column 23 of dcstrutils.pas in /usr/bin/doublecmd
  $0000000000890D30 line 154, column 14 of ufindfiles.pas in /usr/bin/doublecmd
  $000000000088EA27 line 228, column 7 of uformcommands.pas in /usr/bin/doublecmd
  $0000000000A616C8 line 917, column 3 of fFindDlg.pas in /usr/bin/doublecmd
  $00000000006AA659 line 246, column 13 of include/customaction.inc in /usr/bin/doublecmd
  $000000000046D9D2 in /usr/bin/doublecmd
  $000000000069AF5A line 55, column 3 of include/buttoncontrol.inc in /usr/bin/doublecmd
  $000000000069B811 line 169, column 3 of include/buttons.inc in /usr/bin/doublecmd
  $000000000069AE26 line 21, column 5 of include/buttoncontrol.inc in /usr/bin/doublecmd
  $0000000000438D0A in /usr/bin/doublecmd
  $000000000064A645 line 5411, column 28 of include/wincontrol.inc in /usr/bin/doublecmd
  $00000000006EF746 line 5716, column 7 of qtwidgets.pas in /usr/bin/doublecmd
  $00000000006F06D3 line 6089, column 3 of qtwidgets.pas in /usr/bin/doublecmd
  $00007F2A554D2070 in /usr/lib/libQt5Core.so.5
  $00007F2A561D4B23 in /usr/lib/libQt5Widgets.so.5
TagsNo tags attached.
Attached Files
Fixed in Revision9584
Operating systemLinux
WidgetsetQt5
Architecture64-bit

Activities

Skif_off

2020-11-08 21:38

reporter   ~0003533

Semicolon ";" uses as delimiter in very many places (also not in DC only). For example, try something like "*.ini;*.conf" (without quotes) for find any ini- and conf-files at the same time.

In this case you can use simple workaround: check "Regular expressions" and try to find ";".

fredvej

2020-11-09 19:15

reporter   ~0003534

Last edited: 2020-11-09 19:17

Skif_off, I agree that the workaround can be used. This is an error caused by the user's bad input.

The question is, should searching for a delimiter cause an error, or should it be handled before starting the search? It could be handled with a dialog box saying something like "You can not search for the delimiter ; like this, try using regular expression .*;.* "

I have sat priority low and severity to trivial, for this error is easy to handle for the user, but it made me hunt for the cause for some time.

Skif_off

2020-11-09 22:10

reporter   ~0003535

Last edited: 2020-11-09 22:12

> The question is, should searching for a delimiter cause an error, or should it be handled before starting the search?

Of course not and it would be good to fix it, I wasn't talking about that :) (And I think I misused the word "workaround": this is not workaround, this is the only possible solution.)

> It could be handled with a dialog box saying something like "You can not search for the delimiter ; like this, try using regular expression .*;.* "

Some of the Find files dialog's fields have hint/tooltip (use mouse cursor):
- File mask: "Enter files names separated with ";"";
- Exclude subdirectories: "Enter directories names that should be excluded from search separated with ";"";
- Exclude files: "Enter files names that should be excluded from search separated with ";"".

P.S. Needs to add this to the DC Help, some time ago I added note about semicolon in the "Start in directory" field, but this is not enough, there was no need to hope for a hints/tooltips, because many people prefer keyboard using.
I will try.

kroysoft

2021-03-07 23:58

reporter   ~0003717

I've tried to reproduce this issue with the snapshot build rev. 9703 x86 on Windows 10 x64 OS, rev. 2004 - without success. My system didn't throw any error on this - though it starts to search and finds every single files, indeed (from user point of view I guess this behavior is still accpetable: I gave "two empty strings" for DC to find as "part of names". It's only semantic in my eyes - one possible intrpretation of the "bad request", so I'd consider this as fine.

Nevertheless, the point is that I couldn't see the issue on Windows, at least. I hope this help to narrow down to the root of the issue - if it's still exists in latest build...

Issue History

Date Modified Username Field Change
2020-11-08 21:14 fredvej New Issue
2020-11-08 21:14 fredvej File Added: searchpanel.Screenshot_20201108_184135.png
2020-11-08 21:38 Skif_off Note Added: 0003533
2020-11-09 19:15 fredvej Note Added: 0003534
2020-11-09 19:17 fredvej Note Edited: 0003534
2020-11-09 22:10 Skif_off Note Added: 0003535
2020-11-09 22:12 Skif_off Note Edited: 0003535
2020-11-11 22:53 Alexx2000 Fixed in Revision => 9584
2021-03-07 23:58 kroysoft Note Added: 0003717