Open reginabally opened 3 years ago
I took a look into this but could not replicate the issue. I suspect that the issue may be caused by the mix character types in their notes. From the video in the ticket most of their notes appear to be of mixed character types. I wonder if we could replicate this issue if we had a sample. @reginabally could we ask them to give us a copy of the entire text from a note on their device that would satisfy the search query "poe" It is likely that one of their notes has this character set in it and I suspect that is the one causing the issue.
Fails | |
---|---|
:no_entry_sign: | Please add a type label to this issue. e.g. '[Type] Enhancement' |
Generated by :no_entry_sign: dangerJS
@charliescheer They've shared the notes in their most recent reply: 4228972-zd-woothemes
Setting the ticket on-hold for a bit.
I took a look at this today, I don't have a solution yet, and suspect this may take a bit of time to solve. @mdrockwell The problem is a specific note that the user shared the one that starts with Los Angeles lɔːsǽndʒləs
If they remove that note from their account they will be able to search again. I know this is not an ideal solution but for the time being that is probably the best way to go. The issue is with how swift breaks apart strings by words. My suspicion is that it does not like breaking the string apart by words using different languages at the same time, but I'm not 100% on that.
For my own reference, the issue is being caused by the EnumerateOption .byWords
enumerateSubstrings(in: range, options: [.localized, .byWords, .substringNotRequired]) { (_, wordRange, _, stop) in
If you remove the .byWords option the crash does not happen.
The problem is a specific note that the user shared the one that starts with Los Angeles lɔːsǽndʒləs If they remove that note from their account they will be able to search again.
They have done this and it did indeed allow them to search
The user reported in 4228972-zd-woothemes for crashes that happened on the iOS app when they performed a search using keywords "poe" or "poE". The crash happened when they tried different variations of the "e" characters like é.
Expected
It was expected that the app doesn't crash when searching for notes.
Observed
(Based on the details shared by the user since we're not able to reproduce this)
Reproduced
The user's screen recording with testing using different keyword variations can be downloaded in the ticket.
Note: The user's device language is in Japanese.