You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Overlay items flicker when near the edge of the window #8295
This happens frequently when using the Hydrogen package, which displays the return values from evaluated code as overlays on the window. It seems to be exacerbated when there are more overlays. It looks like the layout engine is trying to figure out where to render them but the act of rendering changes the location solution, so they start flickering like crazy.
Originally filed as an issue on Hydrogen: nteract/hydrogen#93, but it seems this is an issue with the Atom rendering.
@ssfrr Just to make sure we have all the relevant information -- can you please record a short GIF which clearly demonstrates the problem, and also provide the exact steps which reproduce this for you (+ version of Atom and OS)?
This gif doesn't really capture the speed of the flicker (it's very fast). Video is here (and even that seems slower then it looks on my screen).
I'm on OSX, using Atom 1.0.5.
It seems to take a while to reproduce, and seems to be exacerbated when I have a lot of overlay items, which happens commonly after working in Hydrogen for a while. Unfortunately I don't have a specific sequence of steps, but if I start to see some commonalities I'll post back.
I couldn't get the Hydrogen package to install, but based on the video, it looks like some GPU layer issue.
If you're familiar with the DevTools, you could try to "Inspect Elements" and see what class that overlay has. It might be .hydrogen.output-bubble. If so, here some random things you can add to your styles.less and see if it helps.
// uncomment only one line at the time, not all together.hydrogen.output-bubble,
atom-text-editor::shadow.hydrogen.output-bubble {
//backface-visibility: hidden;//z-index: 0; // also try increasing the number by one: 1, 2, 3 etc.//will-change: transform;
}
atom-text-editor {
//overflow: hidden; // this might cause autocomplete to be cut off
}
@simurai the hydrogen output-bubble div is a child of the atom-overlay element, which is what seems to be flickering. I did try your suggestions though and did not see any change. After I made the changes I just saved my styles.less file and switched tabs back to the document with the flickering.
I also tried applying the styles to the atom-overlay element type as in:
atom-overlay {
// backface-visibility: hidden;z-index: 1; // also try increasing the number by one: 1, 2, 3 etc.// will-change: transform;
}
will-change had no effect. z-index had no effect for z-index > 0, if z-index == 0 the bubbles disappear entirely.
backface-visibility had no effect.
Ok, based on the gif of the DevTools, it's not a GPU rendering issue, but rather the top position of the atom-overlay keeps getting updated for no reason.
Just to add that this is also a problem with the atom-julia-client package, where both results (Arrays resulting from computations) and autocomplete suggestions display this issue.
Could you tell whether this was fixed in the recent versions? We have made a couple of changes in the way we position elements since this was first opened and I wonder if they have had any positive impact on this bug. If not, could you provide some reproduction steps so that I can jump on this?
I can reproduce this in ac+ when it's near the left of the window. This might be an issue with ac+ as it uses margin to adjust the left to line up the beginning of the words:
It's hard to capture with the gif as it's skipping frames...
close treeview and anything in the left panel
type atom. and type some atom global that would complete like clip
So, I can reproduce the above issue and have successfully debugged it. 🔎 It's caused by autocomplete-plus changing SuggestionListElement after reading UI properties, as you suggested. So, basically here's what's happening under the hood:
The user presses a keystroke, causing SuggestionListElement to render new elements.
A "poll after next update" is scheduled. (Poll 1)
A document update is scheduled. (Update 1)
A document read is scheduled. (Read 1)
Update 1 is served and the overlay contents changed.
Read 1 is served
a) Some DOM properties are read
b) A new document update is scheduled (Update 2)
Poll 1 is served and overlays are measured. This causes a new update to TextEditorComponent be scheduled (Update 3)
Update 2 is served and overlays are changed to adjust the margin.
Update 3 is served, but overlays won't have the latest changes caused by Update 2 because they won't be measured until the next document poll or read, which will happen on the next frame. (Flicker!)
A PR is on the way to atom/autocomplete-plus, but I am curious if the other packages mentioned on this issue are experiencing the same problem.
@ssfrr@nilshg: is there a way I can consistently trigger that behavior on your packages? I am trying to find commonalities between the AC+ flicker and the ones you're experiencing so that we could (maybe) provide a more holistic solution.
Having the same issue on atom 1.8.0, on OS X El Capitan. The issue occurs with autocomplete-plus, but also any cursor marker decoration of overlay type: atom/autocomplete-plus#738
The flickering issue is still happening on atom 1.9.6. I am not sure if what @ypresto fixed is the problem mentioned here initially. It seems that the problem he had (seeing his capture) is not the flickering issue described by @ssfrr .
On my side, I have the exact same problem as @ssfrr as he described here one year ago.
Please tell me if there is any other information I can provide to help get this fixed, as this is a rather annoying bug (like anything flickering on the screen when calmly writing code :( )
I experienced similar behavior to this (position of overlay continuously being changed in inspector) #8295 (comment)
So I thought this is same issue of mine, but it can be separated issue if it is not solved.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
izuzak commentedon Aug 10, 2015
@ssfrr Just to make sure we have all the relevant information -- can you please record a short GIF which clearly demonstrates the problem, and also provide the exact steps which reproduce this for you (+ version of Atom and OS)?
ssfrr commentedon Aug 12, 2015
This gif doesn't really capture the speed of the flicker (it's very fast). Video is here (and even that seems slower then it looks on my screen).
I'm on OSX, using Atom 1.0.5.
It seems to take a while to reproduce, and seems to be exacerbated when I have a lot of overlay items, which happens commonly after working in Hydrogen for a while. Unfortunately I don't have a specific sequence of steps, but if I start to see some commonalities I'll post back.
simurai commentedon Aug 12, 2015
I couldn't get the Hydrogen package to install, but based on the video, it looks like some GPU layer issue.
If you're familiar with the DevTools, you could try to "Inspect Elements" and see what class that overlay has. It might be .hydrogen.output-bubble. If so, here some random things you can add to your
styles.lessand see if it helps.izuzak commentedon Aug 12, 2015
Thanks, @ssfrr.
@nathansobo Does the behavior shown in the GIF above ring any 🔔 for you? EDIT: just noticed that @benogle added the
atomlabel to this, sorry!ssfrr commentedon Aug 12, 2015
Here's what I see in the inspector. This was without any visible flickering on the screen, and no motion (scrolling or cursor movements) happening.

Also my CPU was pegged at 100% while I had the inspector open.
ssfrr commentedon Aug 12, 2015
@simurai the
hydrogen output-bubblediv is a child of theatom-overlayelement, which is what seems to be flickering. I did try your suggestions though and did not see any change. After I made the changes I just saved my styles.less file and switched tabs back to the document with the flickering.I also tried applying the styles to the atom-overlay element type as in:
will-changehad no effect.z-indexhad no effect for z-index > 0, if z-index == 0 the bubbles disappear entirely.backface-visibility had no effect.
simurai commentedon Aug 13, 2015
@ssfrr Thanks for testing.
Ok, based on the gif of the DevTools, it's not a GPU rendering issue, but rather the
topposition of theatom-overlaykeeps getting updated for no reason.ssfrr commentedon Aug 14, 2015
Sounds like a good clue 🔍. Let me know if there's anything else I can test to get you more info.
nilshg commentedon Aug 26, 2015
Just to add that this is also a problem with the atom-julia-client package, where both results (Arrays resulting from computations) and autocomplete suggestions display this issue.
as-cii commentedon Dec 15, 2015
Could you tell whether this was fixed in the recent versions? We have made a couple of changes in the way we position elements since this was first opened and I wonder if they have had any positive impact on this bug. If not, could you provide some reproduction steps so that I can jump on this?
Thanks!
benogle commentedon Dec 15, 2015
I can reproduce this in ac+ when it's near the left of the window. This might be an issue with ac+ as it uses margin to adjust the left to line up the beginning of the words:
It's hard to capture with the gif as it's skipping frames...
atom.and type some atom global that would complete likeclipas-cii commentedon Dec 16, 2015
So, I can reproduce the above issue and have successfully debugged it. 🔎 It's caused by autocomplete-plus changing
SuggestionListElementafter reading UI properties, as you suggested. So, basically here's what's happening under the hood:SuggestionListElementto render new elements.Poll 1)Update 1)Read 1)Update 1is served and the overlay contents changed.Read 1is serveda) Some DOM properties are read
b) A new document update is scheduled (
Update 2)Poll 1is served and overlays are measured. This causes a new update toTextEditorComponentbe scheduled (Update 3)Update 2is served and overlays are changed to adjust the margin.Update 3is served, but overlays won't have the latest changes caused byUpdate 2because they won't be measured until the next document poll or read, which will happen on the next frame. (Flicker!)A PR is on the way to atom/autocomplete-plus, but I am curious if the other packages mentioned on this issue are experiencing the same problem.
@ssfrr @nilshg: is there a way I can consistently trigger that behavior on your packages? I am trying to find commonalities between the AC+ flicker and the ones you're experiencing so that we could (maybe) provide a more holistic solution.
Thanks! ✨
6 remaining items
jeremyfa commentedon Jul 1, 2016
Having the same issue on atom 1.8.0, on OS X El Capitan. The issue occurs with autocomplete-plus, but also any cursor marker decoration of overlay type: atom/autocomplete-plus#738
Any update on this issue?
ypresto commentedon Aug 5, 2016
PR is here..! #11388
nathansobo commentedon Aug 6, 2016
This will be fixed in 1.9.6 thanks to @ypresto! ❤️ ⚡
jeremyfa commentedon Aug 7, 2016
The flickering issue is still happening on atom 1.9.6. I am not sure if what @ypresto fixed is the problem mentioned here initially. It seems that the problem he had (seeing his capture) is not the flickering issue described by @ssfrr .
On my side, I have the exact same problem as @ssfrr as he described here one year ago.
Please tell me if there is any other information I can provide to help get this fixed, as this is a rather annoying bug (like anything flickering on the screen when calmly writing code :( )
ypresto commentedon Aug 7, 2016
I experienced similar behavior to this (position of overlay continuously being changed in inspector) #8295 (comment)
So I thought this is same issue of mine, but it can be separated issue if it is not solved.
ypresto commentedon Sep 9, 2016
Still experiencing related issue:
(Show tree-view before step 3 for easy reproduction)
ypresto commentedon Sep 13, 2016
While I could not reproduce, flickering issue similar to one @ssfrr reported happened (in 1.10.1, probably).
Only happened on bottom of window.
(Low fps; it was much more faster than this gif.)
nathansobo commentedon Sep 22, 2016
@ypresto @jeremyfa Could you let us know what themes you are using? We're having trouble reproducing.
Ben3eeE commentedon Oct 12, 2016
I can get the autocomplete box to flicker when resizing panes but not without doing anything.
nathansobo commentedon Oct 14, 2016
Closed via #12977.
lock commentedon Apr 4, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!