Opened 7 years ago

Closed 7 years ago

#9659 closed bug (fixed)

Queries doesn't work anymore

Reported by: Giova84 Owned by: anevilyak
Priority: normal Milestone: R1
Component: Kits/Locale Kit Version: R1/Development
Keywords: Queries doesn't work anymore Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

hrev45480. Here i have 3 disk formatted with BFS, and these disk are formatted with query support. When i attempt to find something on these disk, i always obtain.. Nothing. checkfs doesn't report any issue, lsindex on disk show index. This is the output of syslog:

KERN: bfs: Could not parse query "(name=="*[][][]*")", stopped at: ""
KERN: bfs: bfs_open_query:2161: Invalid Argument
KERN: bfs: Could not parse query "(name=="*[][][]*")", stopped at: ""
KERN: bfs: bfs_open_query:2161: Invalid Argument
KERN: bfs: Could not parse query "(name=="*[][][]*")", stopped at: ""
KERN: bfs: bfs_open_query:2161: Invalid Argument
KERN: bfs: Could not parse query "(name=="*[][][]*")", stopped at: ""
KERN: bfs: bfs_open_query:2161: Invalid Argument
KERN: vm_soft_fault: va 0x0 not covered by area in address space
KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x0, ip 0x147767d, write 0, user 1, thread 0xebb

What went wrong?

Change History (11)

comment:1 by Giova84, 7 years ago

A news: if i search files using mime type (eg text files), i obtain results. Seems that i can no longer search files with a keyword, in "Find" window.

comment:2 by anevilyak, 7 years ago

Does e.g. query name="*" from Terminal work?

comment:3 by axeld, 7 years ago

Component: File Systems/BFSApplications/Tracker

Exactly what the syslog says: the query entered is not valid. Maybe some changes within the locale kit broke getting upper/lower case characters. What did you search for, anyway? ASCII characters or UTF-8 ones?

comment:4 by Giova84, 7 years ago

From Terminal works ok.

in reply to:  3 comment:5 by Giova84, 7 years ago

Replying to axeld:

Exactly what the syslog says: the query entered is not valid. Maybe some changes within the locale kit broke getting upper/lower case characters. What did you search for, anyway? ASCII characters or UTF-8 ones?

I have tried with anything: text files (documents) audio, and so on. The result is the same if i use indifferebtly lower or uppercase. UTF-8.

comment:6 by anevilyak, 7 years ago

What he meant was, in the example above that you showed a syslog extract for, what was the search string you put into Find?

comment:7 by Giova84, 7 years ago

Ok, sorry. The keyword was "sample" (without quotes).

comment:8 by Giova84, 7 years ago

Another news: if i use @ and # as keyword, i am able to obtain results. So ASCII characters works and UTF-8 doesn't?

comment:9 by anevilyak, 7 years ago

Component: Applications/TrackerKits/Locale Kit
Owner: changed from axeld to anevilyak
Status: newin-progress

Problem understood, will fix it after work today. It's a similar regression to the one that led to #9649.

in reply to:  9 comment:10 by siarzhuk, 7 years ago

Replying to anevilyak:

Problem understood, will fix it after work today. It's a similar regression to the one that led to #9649.

You are right. The same fix you did for FromUTF8 help to resolve this issue by advancing pointer in ToUTF8:

diff --git a/src/kits/locale/UnicodeChar.cpp b/src/kits/locale/UnicodeChar.cpp
index eed3b9c..bdb032c 100644
--- a/src/kits/locale/UnicodeChar.cpp
+++ b/src/kits/locale/UnicodeChar.cpp
@@ -245,6 +245,7 @@ BUnicodeChar::ToUTF8(uint32 c, char **out)
 {
        int i = 0;
        U8_APPEND_UNSAFE(*out, i, c);
+      *out += i;
 }

comment:11 by anevilyak, 7 years ago

Resolution: fixed
Status: in-progressclosed

Indeed, fixed in hrev45484. Should have reviewed that when I fixed the other one, but oh well, programmer's laziness.

Note: See TracTickets for help on using tickets.