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

Switching between sources causes a small popup to appear and disappear sometimes #352

Open
heartsucker opened this issue May 3, 2019 · 27 comments · Fixed by #893
Open
Labels
bug Something isn't working

Comments

@heartsucker
Copy link
Contributor

heartsucker commented May 3, 2019

STR

  1. run rm -r ~/.securedrop_client in sd-app
  2. run the qubes-installed client against a staging server with 100 sources (you probably don't need this much but this is what i tested with)
  3. during the first sync, click on the first source in the sourcelist and hold the down arrow key until you get down to the bottom of the list

Expected

Smooth scrolling with a bit of a delay the longer the source list is

Actual

A small popup quickly appears and disappears (you might miss it so keep those eyes peeled).

Notes

This might have been introduced in #345, which removed changes that were put in to fix #185, because no one was able to see a reproduction of the issue and thought it had to do with using a tiling window manager. We could reapply the #185 fix to see if that resolves the issue now that we have an STR.

@heartsucker heartsucker added the bug Something isn't working label May 3, 2019
@redshiftzero
Copy link
Contributor

redshiftzero commented May 7, 2019

no flicker is happening for me on sync or when switching conversations on master

@heartsucker
Copy link
Contributor Author

I think the root cause is that I'm using a tiling window manager, so that when a widget disappears the WM tries to resize the window. This causes the flicker. This probably isn't a bug on normal WM's because they do not attempt to resize the window, and any manual resize done by the user would not occur in the split second where the widgets are being switched.

Given that no Qt / GTK apps I use with a tiling WM ever have this problem, it leads me to believe that we may be doing something wrong in our code. As we continue to write more code and do more complex things, potentially with very long conversations, these lags may become apparent to the user (or maybe not, I really don't know).

@emkll
Copy link
Contributor

emkll commented Dec 10, 2019

Confirming that this can also be reproduced (though is much less noticeable) in XFCE. when this occurs, there's a corresponding set of log messages in syslog:

Dec 10 13:54:45 localhost qubes-gui[500]: ERROR reading WM_HINTS
Dec 10 13:54:45 localhost qubes-gui[500]: got num_mfn=0x0 for window 0xc0001e (30797x-17260554)
Dec 10 13:54:45 localhost qubes-gui[500]: ERROR reading WM_HINTS

@eloquence eloquence added this to the 0.2.0beta milestone Dec 17, 2019
@eloquence
Copy link
Member

Since Jen's comment in May I think many of us have seen the brief flicker of a window sometimes rapidly popping up and closing when switching between conversations, which may or may not be the same issue heartsucker originally reported. Either way, let's use this issue to track.

I've only been able to repro this in Qubes, and it's easiest to see by rapidly switching between a lot of sources.

I've not seen any similar issue with sync so added "needs repro" for that portion.

@eloquence
Copy link
Member

This camera shot shows a small window being visible for a fraction of a second as I switch between sources in Qubes:

flicker

You can see it in real-time in this video):
https://youtu.be/UMBDIPFf5xY?t=5

@redshiftzero
Copy link
Contributor

this is caused by deleting the entire conversation view and redrawing it on sync or source changed, see #473

@eloquence
Copy link
Member

Thanks, #473 is in the backlog so removing this, but keeping it open until we confirm that the bug is indeed resolved by the implementation proposed there.

@eloquence
Copy link
Member

Maybe because syncs are faster now, I am seeing this a lot more frequently.

@eloquence
Copy link
Member

eloquence commented Feb 13, 2020

I still see this window flicker in Qubes even with #688 merged. I can most reliably reproduce it on the NY test instance by cursor-selecting through the source list while messages/replies are being downloaded. It now seems uncommon during normal use.

@eloquence
Copy link
Member

eloquence commented Feb 26, 2020

Observed once today in 20200225-060103 nightly when cursor-selecting over sources.

@eloquence
Copy link
Member

eloquence commented Mar 19, 2020

Sadly we're not completely rid of this issue yet.

STR that work for me reliably in 0.2.3-deb/0.2.3-rpm prod build:

  1. Clear out data directory and DB in sd-app
  2. Run the client
  3. Switch between conversations during first sync

It is much less frequent now; I'm not seeing it during subsequent syncs without updates, or in normal conversation switching.

@eloquence eloquence reopened this Mar 19, 2020
@eloquence
Copy link
Member

Correction, after having the client up for a while, I was also able to see the flicker again intermittently, so it's not just on first sync.

@eloquence
Copy link
Member

Also just saw flickering once in offline mode (switched to a source with a lot of widgets in the conversation view, if that makes a difference), though it's very elusive.

@sssoleileraaa
Copy link
Contributor

I'll try to repro today. I thought by no longer deleting and adding widgets every time there is a sync or a source selection change we had fixed this. As far as the speech bubble widget flicker goes, that'll probably take a separate PR to fix since it's in a different area of the code, but I'll have to repro to get a better idea.

@eloquence
Copy link
Member

Why does the creation of the ConversationView result in a full WM-decorated window popping up? Is there any way that we can reduce flicker by adjusting initial draw size, or otherwise suppress it?

If it's just on first load it's far less significant, of course. I'll see if I can still get the flicker after the first load on current builds.

@eloquence
Copy link
Member

On re-reading your comment, the behavior I see in 0.2.5-deb prod build is consistent with what you're describing. I can see the flicker when viewing a source for the first time in a given session, but not on subsequent views of the same source.

That still translates to fairly frequent flickering during initial use of the client.

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Jun 26, 2020

STR that work for me reliably in 0.2.3-deb/0.2.3-rpm prod build:

  1. Clear out data directory and DB in sd-app
  2. Run the client
  3. Switch between conversations during first sync

I am not seeing this on the client 0.2.0-dev-20200626-060133. Here's exactly what I did:

  1. ran rm -r ~/.securedrop_client in sd-app
  2. ran the qubes-installed client
  3. during the first sync, clicked on different sources to view their conversations (on my staging instance i have about 5 sources)

@sssoleileraaa
Copy link
Contributor

Also just tested with 100 sources and still can't repro. I have seen this in the past, so either it's been fixed or there is something not mentioned in the STR or our Qubes workstations are configured differently so that this issue shows up with your configuration but not mine. I think we should screen share if this does happen to you in a reproducible way.

@eloquence
Copy link
Member

Yeah, it happens very reproducibly to me in a Qubes prod environment -- I just have to click on anywhere around ~1-20 sources after loading the client to see it. Happy to screen-share to figure out what might be causing the difference.

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Jun 26, 2020

After my screenshare with @eloquence he showed me a way to see the issue every time:

  1. run rm -r ~/.securedrop_client in sd-app
  2. run the qubes-installed client against a staging server with 100 sources (you probably don't need this much but this is what i tested with)
  3. during the first sync, clicked on the first source in the sourcelist and hold the down arrow key until you get down to the bottom of the list and you should see a small popup quickly appear and disappear (you might miss it so keep those eyes peeled)

@emkll
Copy link
Contributor

emkll commented Jul 23, 2020

This issue seems to reliably occur for me when the source I am switching to has a large number (10?) files.

@eloquence
Copy link
Member

eloquence commented Jul 23, 2020

Deferring again for now in favor of the slightly more troubling #1121 but will pick this up again soon.

@eloquence
Copy link
Member

One day we will get back to you, bug #352! 👀

@sssoleileraaa
Copy link
Contributor

Looks like only STR so far is still: #352 (comment)

@eloquence
Copy link
Member

Anecdotally, it somewhat seems to correlate with the number of download widgets for a given source as well.

@sssoleileraaa
Copy link
Contributor

Updated issue description to include an STR and notes

@sssoleileraaa sssoleileraaa changed the title UI flicker when switching conversations and on sync Switching between sources causes a small popup to appear and disappear sometimes Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants