Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when deleting letters in a search. #3581

Closed
ManzoniGiuseppe opened this issue Dec 6, 2023 · 20 comments · Fixed by #3592
Closed

App crashes when deleting letters in a search. #3581

ManzoniGiuseppe opened this issue Dec 6, 2023 · 20 comments · Fixed by #3592
Assignees
Labels
Android Vitals Issues reported in Android Vitals (Google Play Console) bug question search
Milestone

Comments

@ManzoniGiuseppe
Copy link

Describe the bug
Deleting letters in the search due to a mistake may cause a crash. I had five until now during normal usage.

Expected behavior
It should not crash.

Steps to reproduce the behavior:
It's quite hard to see what is wrong because the crashes happen with a delay, and slowing how quickly I type alters the results. I found the following steps usually work:

  1. Open a book like wiktionary or wikipedia english
  2. Click on the search icon
  3. Write something, e.g "super" or "paladin"
  4. Delete one letter at the time from the last, while timing the delete when the research result should appear
  5. If timed right it crashes before you run out of letters.

Environment

  • Version of Kiwix Android : 3.8.1 from website apk
  • Device : Fairphone 4
  • OS version : 13
@gouri-panda gouri-panda added bug question search Android Vitals Issues reported in Android Vitals (Google Play Console) labels Dec 6, 2023
@ManzoniGiuseppe
Copy link
Author

It's not a priority because I can just try to remember to wait before deleting characters. I posted it just so you know.

@gouri-panda
Copy link
Collaborator

@MohitMaliFtechiz This may be another regression. We need to fix this properly 😪

@gouri-panda
Copy link
Collaborator

@ManzoniGiuseppe Thank you for posting the issue! We'll fix this ASAP.

@MohitMaliFtechiz MohitMaliFtechiz added this to the 3.9.0 milestone Dec 7, 2023
@MohitMaliFtechiz MohitMaliFtechiz self-assigned this Dec 7, 2023
@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe Thanks for opening the ticket.

@MohitMaliFtechiz This may be another regression. We need to fix this properly 😪

@gouri-panda I am testing it on my device to reproduce the error. Once I reproduce this I will place a fix on this ASAP.

@ManzoniGiuseppe
Copy link
Author

If you have trouble reproducing it, I made a screen clip to show what I do and how the app responds https://mega.nz/file/ZHdH0S4D#Ly1BiSKtAD6-D0y_dvegfCaXvgOSUxUOG5mE1hzx4wI

@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe Thanks for providing the video.

@gouri-panda Are you able to reproduce this error? Since I am not able to reproduce this error(with version 3.8.1) on both devices e.g. Pixel 7a, and Samsung M21 with the provided information as well as I have tried different ways to reproduce the error.

Searchissuewithsamsung.mp4
searchissuewithpixel7a.mp4

@ManzoniGiuseppe Can you please provide the device logs it would be helpful for us to debug the problem.
You can find it under the Help -> Send diagnostic report.

@ManzoniGiuseppe
Copy link
Author

logs1701950848259.txt

@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe Thanks.

@ManzoniGiuseppe
Copy link
Author

Just now I opened the app, wrote "meteors" in wiktionary and it crashed without ever deleting a letter. It seems to me the problem is a 'press a key when the results update' and not 'press a backspace when the results update' and sometimes it dies at the key after the contemporaneous press (or it just slows down, it's quite arbitrary, really)

@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe Can you please try with apk https://drive.google.com/file/d/11JYfBfYf3H4dIUibZ0tuMlT_vtOEm0xn/view?usp=sharing is the issue is still exist at your end?

@ManzoniGiuseppe
Copy link
Author

It's more sturdy. For example, if I write "paladin" and delete them one by one, the problem usually happens when I go from "pa" to "p" and now it often keeps loading for a four seconds (which I guess could be 'normal' loading time) and then it continues normally instead of a crash, but they still happen somtimes. Similarly, I can still crash it by writing "sup" one letter at a time while matching the updates, but it's harder to do. Lastly, I noticed I can't crash it if there are a few letters already, but only for the first few.

@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe I am testing with https://download.kiwix.org/zim/wiktionary/wiktionary_en_all_maxi_2023-07.zim that is 8.3 GB. Are you testing with more bigger one? can you please point out the exact zim file that you are using, might be this is a bug reproducible with a particular zim file.

@ManzoniGiuseppe
Copy link
Author

The ones that crash are:

  • wikipedia_en_all_maxi_2023-09.zim 95.6 GB 6.8 M articles
  • wikisource_en_all_maxi_2022-09.zim 16.2 GB 3.5 M articles
  • wiktionary_en_all_maxi_2023-07.zim 8.3 GB 7.5 M articles
    All downloaded from inside the app.

@ManzoniGiuseppe
Copy link
Author

The biggest I have beside them is

  • wikibooks_en_all_maxi_2021-03.zim 4.3 GB 92K articles
    And I can't make it crash

@MohitMaliFtechiz
Copy link
Collaborator

The ones that crash are:
wikipedia_en_all_maxi_2023-09.zim 95.6 GB 6.8 M articles
wikisource_en_all_maxi_2022-09.zim 16.2 GB 3.5 M articles
wiktionary_en_all_maxi_2023-07.zim 8.3 GB 7.5 M articles
All downloaded from inside the app.

The biggest I have beside them is

  • wikibooks_en_all_maxi_2021-03.zim 4.3 GB 92K articles
    And I can't make it crash

@ManzoniGiuseppe Thanks it will be very helpful.

@gremid
Copy link

gremid commented Dec 8, 2023

@MohitMaliFtechiz @kelson42 I can reproduce it on the DWDS Custom App 2023-11-20 (Build: 7233250), probably in a stable way:

  1. Search for an entry with a frequent prefix, i. e. "verabreden", (ver- being a common prefix for verbs in German)
  2. Once the list of suggestions is reduced to a few or one entry, hold the backspace key to quickly delete the search input.
  3. Once the deletion of the input "hits" the 3-character prefix, the suggestion list should be rapidly expanded with lots of index entries. This is when the app crashes in my case.

@ManzoniGiuseppe
Copy link
Author

I tried what @gremid said to see if it also crashes for me (with wiktionary and the patched app from the link above) and it did crash, but the behavior was weirder. If I wrote "verabreden" and then deleted all letters, it crashed (once they were all deleted, as mine doesn't update the results if keys are being pressed) but any further attempt did not work. When I stopped the delete at "ve" it crashed, but in this case it also happened only once. The other crash happened when I stopped the delete at "vera", and then it always worked. I can only guess there is a cache somewhere that alters the behavior after the first crash.

@MohitMaliFtechiz
Copy link
Collaborator

MohitMaliFtechiz commented Dec 12, 2023

@ManzoniGiuseppe Thanks for telling us the detailed behavior of the application crash, can you please try with https://drive.google.com/file/d/11JYfBfYf3H4dIUibZ0tuMlT_vtOEm0xn/view?usp=sharing? are you still able to reproduce the error?

@ManzoniGiuseppe
Copy link
Author

@MohitMaliFtechiz As far as I can tell the bug is fixed, thank you.

@MohitMaliFtechiz
Copy link
Collaborator

@ManzoniGiuseppe Thanks for your feedback 😇.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Vitals Issues reported in Android Vitals (Google Play Console) bug question search
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants