Android-app: tagging eventually hangs in 2.4.0beta4

Created on 12 Jul 2020  路  14Comments  路  Source: wallabag/android-app

Issue details

When tagging articles, after a few entries, the apps completely hangs and becomes unresponsive enough for Android to ask me if I want to kill it.

Duplicate?

no

Actual behaviour

Fairly reliably, before I get to type "add" on the third tag (see "steps to reproduce", below), the entire app hangs and becomes completely unresponsive. After a while, Android asks me to have mercy on the poor phone's battery and to kill the app.

If I let it be, the Manage tags dialog eventually closes on its own and the app restarts, presumably it crashes. The article stays untagged, both according to the main Wallabag web UI and the Android app.

Expected behaviour

I should be able to add many tags, and this was indeed working fine in the 2.3.0 version.

Steps to reproduce the issue

  1. Tap on the top-left hamburger menu
  2. Tap on the <untagged> "tag"
  3. Tap on an article
  4. Tap on the top-right "three dot" menu
  5. Tap on Manage tags
  6. Type a tag, tap "add"

Repeat the last step two or three times.

Environment details

  • wallabag app version: 2.4.0beta4 (regression from 2.3.0)
  • wallabag app installation source F-Droid
  • Android OS version: 7.1.2 AOSP derivative, 2019-10-05 patch level
  • Android ROM: Fairphone OS ("Saibon")
  • Android hardware: Fairphone 2
  • wallabag server version: 2.3.7
  • Do you have Two-Factor-Authentication enabled?: no

Logs

wallabag server

I do not have access to the server logs.

Web server

N/A.

Your experience with wallabag Android app

This app is great! I use it all the time, both on my phone and on my Onyx e-reader, it's pretty awesome. It usually works great and I absolutely love the idea of having an "untagged" search (which the Web UI could have too already has! sorry, I forgot! :)), I can't wait to upgrade to the beta everywhere. :)

Bug

Most helpful comment

it works!

All 14 comments

The report is solid, but I haven't been able to reproduce it so far, so bear with me as I have to ask some clarifying questions.

Is there any background activity (synchronization, article sweeping)?
You don't have to press "save" (the checkmark in the action bar) to reproduce it?
Does it have any relevance whether you type in new tags or already existing ones (existing on other articles)?
Do you add tags one by one or use a comma-separated string with multiple tags?
At which point exactly does the app stop responding (you can try to check responsiveness by scrolling screen / tag lists):

  • Before you start typing another tag (I guess it is generally equivalent to "after last Add tap").
  • After you started typing (even if a character did not appear in the text field).
  • In the middle of typing (when some characters are present in the text field).

The report is solid, but I haven't been able to reproduce it so far, so bear with me as I have to ask some clarifying questions.

Thanks! :)

Is there any background activity (synchronization, article sweeping)?

Yes, I had "Sweeping deleted articles" happening most of the time because of what was discussed in #909... ;) But now I have turned this off and can still reproduce.

You don't have to press "save" (the checkmark in the action bar) to reproduce it?

No.

Does it have any relevance whether you type in new tags or already existing ones (existing on other articles)?

I do not believe so. I am not sure I have tried typing new tags, but I could try, once it unfreezes from this round of reproducer. ;)

Do you add tags one by one or use a comma-separated string with multiple tags?

I type a tag text and tap "ADD".

At which point exactly does the app stop responding (you can try to check responsiveness by scrolling screen / tag lists):
Before you start typing another tag (I guess it is generally equivalent to "after last Add tap").
After you started typing (even if a character did not appear in the text field).
In the middle of typing (when some characters are present in the text field).

I believe it is the first, "Before I start typing another tag", but I never get the chance to do so. As soon as I tap the "ADD" button, the app hangs and doesn't even get the chance to update the UI to show the new tag in the list above the text dialog.

The app is generally responsive all the way up until i tap the ADD button a third time, pretty systematically. I thought it might have been a variable number of times, but now I can reproduce reliably.. I should also note that tag typing is slower than it used to be. It feels like it slows down more and more as I add tags, and that the last tag I try to add is the straw that breaks the camel's back and just slows it down so much than it fails.

Here's a screen recording showing the problem.

recording_20200713_093325

How much tags do you have (approximately: tens, hundreds, thousands)?

Can you provide logs of the problem ("Settings -> Miscellaneous -> Save logcat output to a file")? You can truncate the log: events before "ManageArticleTagsA" appears in the log don't matter.

I wonder what would happen if you added one tag, removed it, added another tag (or the same), removed it again. All that a couple of times. I want to find out whether it's the number of currently added tags or something else.

over 6000 tags. i will try to get a log and do more tests later.

No wonder I can't reproduce it with my ~250 test tags. I guess that's explains it - the app is probably garbage collecting all the time (it reacts to every change of the text field and creates a lot of arrays). Nothing to fix per se.

What we should do is limit the number of suggested tags - there's no point in displaying all of them. I think something like 50 should be more than enough.

@anarcat do you have any suggestions regarding tags UI/UX? I may try to improve something not too complicated while I'm at it.

No wonder I can't reproduce it with my ~250 test tags. I guess that's explains it - the app is probably garbage collecting all the time (it reacts to every change of the text field and creates a lot of arrays). Nothing to fix per se.

Well what's troubling is that it's a regression: 2.3.0 didn't do that in the past...

What we should do is limit the number of suggested tags - there's no point in displaying all of them. I think something like 50 should be more than enough.

Makes sense, I would also recommend sorting by frequency on the server side, if at all possible, that way you reuse the most common tags and avoid typos (which I have quite a few of).

Well what's troubling is that it's a regression: 2.3.0 didn't do that in the past...

Fair point. 2.3.0 suggests no tags when the text field is empty, the beta suggests all tags. I think that change was enough to cause the performance regression when dealing with over 6k tags.

I would also recommend sorting by frequency

Maybe in the future, I created an issue for that.

I wonder what would happen if you added one tag, removed it, added another tag (or the same), removed it again. All that a couple of times. I want to find out whether it's the number of currently added tags or something else.

I have tried that and i can add and remove two tags repeatedly without problems.

I have not tried extracting a log: it seems the entire app crashes after a while in the hang part, so i'm not sure the log will contain anything useful...

I don't think it is worth putting beta.5 in F-Droid.
@anarcat can you test with APK from releases (not compatible with the F-Droid version)?
I can also build an APK with different appid (can be installed alongside the F-Droid version) if needed.

I don't think it is worth putting beta.5 in F-Droid
@anarcat can you test with APK from releases (not compatible with the F-Droid version)?
I can also build an APK with different appid (can be installed alongside the F-Droid version) if needed.

a little busy right now, would be much easier for me to test from android.

i'll also note a new information i hadn't noticed before: if I open the "manage tags" dialog on an existing article with already more than 2 tags, the dialog also hangs. so it might be just the problem with the existing tags?

@anarcat can you try beta.6 from F-Droid?

it works!

Thanks for reporting and helping with debugging!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicosomb picture nicosomb  路  10Comments

nicosomb picture nicosomb  路  3Comments

BNolet picture BNolet  路  7Comments

shtrom picture shtrom  路  3Comments

msebald picture msebald  路  8Comments