focus-android icon indicating copy to clipboard operation
focus-android copied to clipboard

Settings Menu not displayed properly

Open SorinaFlorean opened this issue 8 years ago • 12 comments

Devices: Nexus 5 (Android 6.0.1) Nexus 6 (Android 7.1.1) build: Focus 4.0 Beta Build #3691

Steps to reproduce:

Launch Focus and go to Settings -> Search. Add a new search engine. Stay a couple of minutes(2-3) and tap back.

Expected results: All the options are correctly displayed, also when tapping back to Settings Menu.

Actual results: The options are one above each other. Not reproducible all the time but I observed this behavior leaving the app for a couple of minutes and then switching between options.

See screenshot: screenshot_20171206-142412 screenshot_20171206-154840

SorinaFlorean avatar Dec 06 '17 14:12 SorinaFlorean

Mhhhh. This looks like backstack shenanigans. In MainActivity we had some problems too and we decided to handle back presses on our own and avoided using the backstack.

pocmo avatar Dec 06 '17 15:12 pocmo

I saw this once too but couldn't repro it afterwards. I think this happens intermittently, but still, it does look like it's a high priority. I'll tentatively mark it as a release blocker, @bbinto what do you think?

nojunpark avatar Dec 06 '17 17:12 nojunpark

@npark-mozilla release blocker

bbinto avatar Dec 06 '17 18:12 bbinto

So far I am not able to reproduce this.

pocmo avatar Dec 07 '17 11:12 pocmo

Finally I'm able to see this... (Nexus 5 emulator, API 23) in my case it happened after pressing the up button from the URL autocomplete form.

@SorinaFlorean do you remember if this happened when pressing the back button that is always visible at the bottom or after pressing the one in the toolbar?

pocmo avatar Dec 07 '17 13:12 pocmo

Looking at the state with uiautomatorviewer I can see that in fact two fragments are visible at the same time.

pocmo avatar Dec 07 '17 13:12 pocmo

This is a heisenbug. I haven't been able to ever see it again.

pocmo avatar Dec 07 '17 16:12 pocmo

The problem seems to come up when a fragment transaction without backstack happens in between transactions with backstack. A good explanation of the issue is this blog posting: http://www.andreabaccega.com/blog/2015/08/16/how-to-avoid-fragments-overlapping-due-to-backstack-nightmare-in-android/

One way I can reproduce this is by piggybacking on the issue from #1924. We definitely should land the patch from #1924 to fix at least part of the problem. I'll investigate if there are other paths in our settings that execute fragment transactions without backstack.

pocmo avatar Dec 07 '17 17:12 pocmo

I haven't found any other reason than #1924. This has been merged to master now.

@npark-mozilla @SorinaFlorean Can you try to reproduce this in the latest builds?

pocmo avatar Dec 07 '17 19:12 pocmo

@pocmo I was able to reproduce this whilest working on #1923 and #1953

Edit: Actually scratch that, I was using an older build, I'll try it with the latest now

Edit # 2: Can't reproduce this anymore with the latest builds. I'd say #1924 solved this

neonpegasu5 avatar Dec 07 '17 20:12 neonpegasu5

I'm going to close this for now, and flag for QA verification.

liuche avatar Dec 07 '17 22:12 liuche

I can't repro this either, even with STRs from #1924 combined

nojunpark avatar Dec 08 '17 15:12 nojunpark