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

Electron apps stop redrawing #27889

Closed
3 tasks done
richvdh opened this issue Feb 24, 2021 · 9 comments
Closed
3 tasks done

Electron apps stop redrawing #27889

richvdh opened this issue Feb 24, 2021 · 9 comments
Labels
11-x-y blocked/need-info ❌ Cannot proceed without more information bug 🪲

Comments

@richvdh
Copy link

richvdh commented Feb 24, 2021

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 11.2.3
  • Operating System:
    • Ubuntu 20.04 x64
  • Last Known Working Electron version:
    • 10.4.0 (I think?)

Actual Behavior

Sometimes, when resizing a window for an electron app, it seems to get stuck in a state where it is not being redrawn. See the following screenshot, which is the result of dragging a "hello world" application around in front of an electron-fiddle window:

Screenshot_2021-02-24

To be clear: this is not a transient effect during the resize: no redraws happen to this window until I resize it again. Resizing the window a bit more wakes it up and normality is restored.

While the window is in this state, I can interact with the application as normal, if I can guess where the controls are - I just can't see them!

Some applications seem more prone to this problem than others. The electron-fiddle app is awful; VSCode and element-desktop also suffer. The "Hello world" app supplied with electron-fiddle suffers rarely, but as per the screenshot, still fails occasionally. (This leads me to speculate that the problem may be related to the amount of work being done by the app during the redraw.)

To Reproduce

While this is easy to reproduce on my system, I'm not aware of any foolproof ways of reproducing it elsewhere :/

Additional Information

I imagine my desktop environment is somehow relevant, though I've tried a few things in an attempt to pin this down:

  • both Ubuntu 18.04LTS and 20.04LTS
  • both XFCE/XFWM and GNOME3/Mutter
@thraizz
Copy link

thraizz commented Feb 24, 2021

Same for me under Arch Linux with Gnome, electron version is v10.4.0 and kernel is 5.10.16-arch1-1.
Electron 11 works for me though, so you might switch and run your app with electron /usr/lib/path/to/app.asar

EDIT: I see your issue is the opposite of mine, your version 10.4.0 works while for me that version doesn't

@ckerr
Copy link
Member

ckerr commented Feb 24, 2021

Hard to know how to move forward on this, since it's not something that happens consistently and, if it's happening in VSC and Fiddle and Hello World, probably not dependent on a particular code path in the client application.

Since you're using Fiddle already, any chance you could bisect through the Electron versions and see if there's a particular release where this behavior first appears? Maybe that would give a clearer path on how to move this issue forward.

@ckerr ckerr added the blocked/need-info ❌ Cannot proceed without more information label Feb 24, 2021
@richvdh
Copy link
Author

richvdh commented Feb 24, 2021

The difficulty I have here is that it's quite hard to reproduce with the simple "hello world" app, so it's hard to be certain that the behavior doesn't occur on any given Electron version. It's much easier to reproduce on a more complex app like VSCode or Fiddle itself.

What I could try is building Fiddle itself against a variety of Electron versions, if that would be helpful.

@richvdh
Copy link
Author

richvdh commented Mar 16, 2021

So, I built Fiddle with a range of electron versions. I found that electron@10.4.0 was fine, while electron@11.0.0-beta.1 was not - so this seems to have been introduced with Electron 11.

Is there anything I can do to narrow this down further?

@richvdh
Copy link
Author

richvdh commented Mar 16, 2021

Huh; for completeness, I tried testing with Electron 12 and 13 - I can't reproduce it there. So it may be that my bug only affects the Electron 11 series...

@nornagon
Copy link
Member

@richvdh you could use the Bisect feature of Electron Fiddle to try to narrow down where it was fixed. Be sure to enable Nightly versions in the preferences (under the Electron tab)

@richvdh
Copy link
Author

richvdh commented Mar 16, 2021

@nornagon sorry, I'm not that familiar with some of this tooling, so I could use a bit of help here.

I've been using the Fiddle app itself to test with because I can't reliably reproduce the bug with a simple "Hello World" app. Can you give me any pointers for getting Fiddle set up to build a non-trivial application, so that I can use its bisect feature?

@richvdh
Copy link
Author

richvdh commented May 10, 2021

to confirm: I've not had any problems with apps based on Electron 12, so this seems to be limited to Electron 11.

@nornagon
Copy link
Member

Great, glad to hear it's fixed in Electron 12.

Electron 11 is now accepting security fixes only, so I'm going to close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11-x-y blocked/need-info ❌ Cannot proceed without more information bug 🪲
Projects
None yet
Development

No branches or pull requests

4 participants