TwidereProject / Twidere-Android

http://twidere.com
2.76k stars 377 forks source link

Refresh on start doesn't work on first start #440

Open Mr5quid opened 8 years ago

Mr5quid commented 8 years ago

Hi !

Since the last update (occurring on 3.0.6.1), the timeline doesn't refresh on start and manual refreshing seems to do nothing. I have to kill the app from multitask and restart it and then all the new tweets appear instantly, suggesting that it dit refresh but did not show new content.

Needless to say the "Refresh on start" option in activated.

I'm running CM 13.0-20160301-NIGHTLY-crackling on a Wileyfox Swift.

I will provide logs if you're interested in seeing them.

Mr5quid commented 8 years ago

Hi,

I found a workaround for this issue : turning off the "remember position" setting.

mariotaku commented 8 years ago

I can't reproduce this issue, does it still not working on newer versions?

Mr5quid commented 8 years ago

Hi mariotaku, I'm pleased to see an answer :)

To answer your question : yes it is still happening. There has seemed to be an update almost every day for some time now but yes this is something I am still living with. Not only that but my workaround has stopped working (turning off the "remember position" setting) since the update that featured the new settings menu.

However since last month I did profile the issue a little bit better : it only seems to occur when loading a lot of new content. For instance when I get up my device wants to load about 100 tweets and that's when I have to kill the app before seeing this new content. If it's just for ten tweets or so it loads them fine.

mariotaku commented 8 years ago

I tried to set 'load item limit' to 200 and refresh on start seems worked without problem. I'll try release 3.1.3, please see if it works.

Mr5quid commented 8 years ago

Just upgraded to 3.1.3, Twidere crashes instantly on start. Here's the error. http://pastebin.com/c02f5dah

Mr5quid commented 8 years ago

Hi,

So after testing the latest version (3.1.4.2) for a few days I can tell you that it's still happening. I didn't want to write back unless I had some logs to share but I can't crack the pattern. It seems to happen randomly. What I know is that it never happens if I loaded the new content recently but yet it doesn't really seem to be time dependant neither since It can happen after only three hours since the last refresh whereas it can load it fine after ten hours ...

It's complicated to get some logs of it happening because I need to be bridged via ADB every time I refresh the app. With no visible pattern I'll just have to wait until I'm in luck. Well, now that I'm thinking of it out loud I guess I could use another method to get the logs.

Anyway that's all I have for now. It's really not a big deal but it's just odd. I didn't have this issue before.

benoitjpnet commented 8 years ago

https://youtu.be/mr0MHgDyEhQ I have the same or similar bug. How can we get a verbose mode?

mpiffault commented 8 years ago

Hi, I have a similar issue. For me it seems to happen when twidere had been in the background for some time (quite hard to reproduce on purpose). I pull down to refresh timeline, the spinner appear, and nothing is happening. By this moment, I can try to refresh multiple times, I'll won't be able to. I'll have to kill the app to be able to refresh the timeline again.

orithena commented 8 years ago

Can confirm what mpiffault writes. Is there a UI-Read-from-Cache-Thread and a Network-Write-to-Cache-Thread? If so, it seems to me that occasionally the Reader fails to receive a "done" message from the Writer, then the User is getting impatient, tries to refresh, a new Writer is started, but is being blocked by the still-running first Writer.

Backing out of Twidere and starting it again then kills and restarts all threads and re-reads everything from cache; which is why the User now can read on, but does never have a "load more" option in this case.

I think this is related to timeouts. This occurs more often when I'm throttled down to GPRS speed while moving in a spotty network (i.e. having a german mobile data plan that's over it's monthly high speed quota and therefore throttled by the network provider down to GPRS speed; and travelling by train with Deutsche Bahn). I surmise that this is very hard to reproduce at home or in Japan. One might be able to reproduce it by shielding the phone (aluminum foil?) from the next cell tower so that the phone just does not drop the data connection, but also dropping 99.9% of the packets coming in.

I can't find a timeout setting in Twidere, so I can't try changing that to see whether this behaviour changes ... strange, I thought I have seen such a setting a year ago or something like that.