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

[linux/macOS] Flickering UI on canvas #127

Open
gentlegiantJGC opened this issue Nov 8, 2020 · 43 comments
Open

[linux/macOS] Flickering UI on canvas #127

gentlegiantJGC opened this issue Nov 8, 2020 · 43 comments
Labels
opengl an error from OpenGL code OS: Linux OS: MacOS priority: medium this ticket needs resolving soon type: bug Something isn't working

Comments

@gentlegiantJGC
Copy link
Member

Having potentially solved the renderer loading issue in #84 there is now a flicker from the canvas being redrawn.

This may solve the issue
http://wxpython-users.1045709.n5.nabble.com/wxPython-glcanvas-flickers-on-linux-td2275735.html

@gentlegiantJGC gentlegiantJGC added type: bug Something isn't working opengl an error from OpenGL code OS: Linux labels Nov 8, 2020
@EvilSupahFly
Copy link

This thread on Nabble was opened in July 2000...

How much of it still applies to wxPython of 2020?

@gentlegiantJGC
Copy link
Member Author

It may not. I hadn't noticed how old is was. I couldn't find anything else about it

@EvilSupahFly
Copy link

I found this. Think you can make use of some of it?

@exo-core
Copy link

exo-core commented Jan 30, 2021

Another Linux user here, having the same issue on Ubuntu 20.04. The 3D view is rendered correctly, but all buttons and other overlays are flickering, making it basically impossible to use the editor. To give some idea about the used library versions:

$ python3 -m pip install amulet-map-editor
Requirement already satisfied: amulet-map-editor in ./lib/python3.8/site-packages (0.7.2.8)
Requirement already satisfied: pymctranslate~=1.0.0 in ./lib/python3.8/site-packages (from amulet-map-editor) (1.0.0.1)
Requirement already satisfied: amulet-nbt~=1.0.3 in ./lib/python3.8/site-packages (from amulet-map-editor) (1.0.3.4)
Requirement already satisfied: pyopengl==3.1.5 in ./lib/python3.8/site-packages (from amulet-map-editor) (3.1.5)
Requirement already satisfied: minecraft-resource-pack~=1.0.0 in ./lib/python3.8/site-packages (from amulet-map-editor) (1.0.2)
Requirement already satisfied: amulet-core~=1.0.0 in ./lib/python3.8/site-packages (from amulet-map-editor) (1.0.0.2)
Requirement already satisfied: numpy==1.17.4 in ./lib/python3.8/site-packages (from amulet-map-editor) (1.17.4)
Requirement already satisfied: wxPython==4.1.0 in ./lib/python3.8/site-packages (from amulet-map-editor) (4.1.0)
Requirement already satisfied: cython>=0.29.13 in ./lib/python3.8/site-packages (from amulet-nbt~=1.0.3->amulet-map-editor) (0.29.21)
Requirement already satisfied: Pillow>=7.1.0 in ./lib/python3.8/site-packages (from minecraft-resource-pack~=1.0.0->amulet-map-editor) (8.1.0)
Requirement already satisfied: six in ./lib/python3.8/site-packages (from wxPython==4.1.0->amulet-map-editor) (1.15.0)

Since I am already posting here: I also had some difficulties getting everything to compile, as there were some dependencies missing that were not resolved by pip. Installing python3-dev, libgtk-3-dev, libwxbase3.0-dev, libwxgtk3.0-gtk3-dev and python-sip-dev solved the issue. Might be handy to mention those on the setup guide as well ;-)

@Moilleadoir
Copy link

I still get this bug. It makes Amulet very hard to use when you can’t see the toolbars.

OS: Manjaro Cinnamon
Amulet: 0.8.7

@samdejong86
Copy link

Having this on Ubuntu 18.04, Python 3.8, amulet 0.8.7

@EnricoMonese
Copy link

I think I have a similar issue but on macOS 10.13 High Sierra. The toolbars are only visible during the flickering that happens only when resizing the window.

amulet-bug.mp4

@Neubulae
Copy link

Neubulae commented Jul 7, 2021

Having this on Arch Linux, Python 3.9.6, Amulet 0.8.11

@leucome
Copy link

leucome commented Jul 10, 2021

Is there somebody who do not have this issue on linux?

@simisimis
Copy link

NixOS with mesa. python 3.8-3.9. invisible toolbox unless I am shaking cursor.

@giray
Copy link

giray commented Aug 9, 2021

Ubuntu 21.04 Python 3.9.5 Amulet 0.8.12
Menu items constantly flicker, tried both with and without virtual environment.

@gentlegiantJGC gentlegiantJGC changed the title [linux] Flickering UI on canvas [linux/macOS] Flickering UI on canvas Aug 26, 2021
@gentlegiantJGC
Copy link
Member Author

gentlegiantJGC commented Aug 29, 2021

I am looking to make the switch to Qt which will hopefully solve this issue and remove some other restrictions. Before I do I want to make sure that it is actually going to solve the issue. Please can all of you try running this demo that adds a button on top of the Qt opengl demo and let me know if it works or not.
Before running you will need to install PySide6, PyOpenGL and numpy
https://gist.github.com/gentlegiantJGC/3681c8eaa5e9707bf60d4c5ab0613595
image

@cebtenzzre
Copy link

@gentlegiantJGC The demo renders fine for me.

@gentlegiantJGC
Copy link
Member Author

What OS are you using?

@EvilSupahFly
Copy link

@gentlegiantJGC The demo renders fine for me.

What OS are you using?

I'm curious as well. I'm using Cinnamon 5.0.5 with muffin and LightDM on Linux Mint 20.2, which is based on Ubuntu 20.04 focal and I'm running Kernel 5.13-051300-generic (x64). My GPU is an NVIDIA GeForce GTX 1660 and I'm running the official driver: nvidia 470.57.02

@cebtenzzre
Copy link

@gentlegiantJGC Arch Linux, linux-ck 5.12.19, GTX 970 with nvidia 470.63.01, Qt 6.1.2.

@Moilleadoir
Copy link

Runs fine for me in a virtual env with those prereqs.

Manjaro + Cinnamon desktop 5.0.5
Kernel 5.10.60-1 (LTS)
NVIDIA GeForce GTX 1070 + driver 470.63.01

@uiytt
Copy link

uiytt commented Aug 31, 2021

I had the problem on Amulet, but the demo you gave works fine in env.

PopOs (=> Ubuntu) + Kde : Qt : 5.15.2
Kernel Linux 5.11.0-7620-generic x86_64
NVIDIA GTX 1050 + driver 470.57.02 from PopOs

@EvilSupahFly
Copy link

As you can see in my dual-monitor screenshot below, the demo runs fine on my Manjaro KDE VM, but not my Mint Gnome host, and I suspect my problem lies in there somewhere, as KDE is built using QT while my host is GTK+. I haven't had the time to really dig in to it to find out what's going on.

Screenshot from 2021-08-31 14-02-20

@exo-core
Copy link

exo-core commented Sep 1, 2021

Tested it on Ubuntu 20.4 and it works fine with both, Ubuntu's native Gnome desktop as well as Cinnamon.
Hardware info below.

arne@T420:~$ neofetch
            .-/+oossssoo+/-.               arne@T420 
        `:+ssssssssssssssssss+:`           --------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.3 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 4180PH3 ThinkPad T420 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.11.0-27-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 3 days, 7 hours, 54 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 3613 (dpkg), 11 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 2560x1440 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Cinnamon 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter (Muffin) 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: (Default) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Adwaita-dark [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Faenza-Darker [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-2720QM (8) @ 3.300GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA Quadro NVS 4200M 
      -+sssssssssssssssssyyyssss+-         Memory: 2528MiB / 15963MiB 
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.                                       
                                                                   

@Dracon23
Copy link

Dracon23 commented Sep 6, 2021

Same issue here, using Manjaro Linux (sysinfo - Python 3.9 (VEnv packages).

Demo runs well

@processor286
Copy link

Overlays are all wrong on my Manjaro installation, the demo works fine. Specs:


██████████████████  ████████   
██████████████████  ████████   ---------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Host: MS-7C56 1.0 
████████            ████████   Kernel: 5.10.61-1-MANJARO 
████████  ████████  ████████   Uptime: 1 day, 13 hours, 55 mins 
████████  ████████  ████████   Packages: 1588 (pacman), 19 (flatpak), 9 (snap) 
████████  ████████  ████████   Shell: zsh 5.8 
████████  ████████  ████████   Resolution: 3840x2160 
████████  ████████  ████████   DE: GNOME 40.4 
████████  ████████  ████████   WM: Mutter 
████████  ████████  ████████   WM Theme: Adwaita-maia-compact-dark 
████████  ████████  ████████   Theme: Adwaita-maia-compact [GTK2/3] 
████████  ████████  ████████   Icons: Papirus-Dark-Maia [GTK2/3] 
                               Terminal: gnome-terminal 
                               CPU: AMD Ryzen 5 3600X (12) @ 3.800GHz 
                               GPU: AMD ATI Radeon R9 285/380 
                               Memory: 4506MiB / 32094MiB 

@gentlegiantJGC gentlegiantJGC added this to the future-version milestone Feb 13, 2022
@gentlegiantJGC gentlegiantJGC added state: triage the severity of this ticket needs evaluating priority: medium this ticket needs resolving soon and removed state: triage the severity of this ticket needs evaluating labels Apr 26, 2022
@ShockedCoder
Copy link

Demo works perfectly
demo image

DE: Xfce 4.16
Kernel: 5.10.131-1-MANJARO
OS: Manjaro Linux x86_64

@sebastianbock17
Copy link

Hello same issue with amulet running Arch Linux, has there been any success with arch-based distro so far / are there working workarounds for anyone?

Kind regards

@Avakining
Copy link

Demo works mostly correctly on macOS 13.1 (arm64)

As shown in this screen recording, it renders correctly when moving the object, but flickers slightly when changing the window size. This shouldn't be too much of an issue, however

@yri066
Copy link

yri066 commented Feb 4, 2023

Demo runs well
Снимок экрана 2023-02-04 в 12 54 53

@Dxhs
Copy link

Dxhs commented May 21, 2023

Having this issue right now. UI only flickers/shows when resizing the window.

Every time the UI shows, the following is printed to the terminal running the application.

(__main__.py:223125): Gtk-WARNING **: 18:22:37.754: Negative content width -10 (allocation 4, extents 7x7) while allocating gadget (node button, owner GtkButton)

(__main__.py:223125): Gtk-WARNING **: 18:24:05.364: Negative content width -4 (allocation 10, extents 7x7) while allocating gadget (node button, owner GtkButton)

(__main__.py:223125): Gtk-WARNING **: 18:24:13.394: Negative content width -6 (allocation 8, extents 7x7) while allocating gadget (node button, owner GtkButton)

(__main__.py:223125): Gtk-WARNING **: 18:24:14.165: Negative content width -11 (allocation 3, extents 7x7) while allocating gadget (node button, owner GtkButton)

(__main__.py:223125): Gtk-WARNING **: 18:24:14.712: Negative content width -4 (allocation 10, extents 7x7) while allocating gadget (node button, owner GtkButton)

My computer specs

OS: Manjaro Linux x86_64
Kernel: 6.1.29-1-MANJARO
Resolution: 3840x2160
DE: Plasma 5.27.4
WM: KWin
CPU: Intel i7-6700K (8) @ 4.200GHz
GPU: NVIDIA GeForce GTX 980 Ti
Memory: 6123MiB / 11880MiB

@ShockedCoder
Copy link

Is this bug present on all Linux OSes or does it work just fine for some people?

If there's anyone who's using Linux and has no problems with Amulet, please leave a reply and tell us your distro.

@lionkor
Copy link

lionkor commented Jun 1, 2023

Works perfectly

DE: Gnome 40.0
Kernel: 5.15.5
OS: Pop 21.10

looks like amulet works for @uiytt ?

@Kcraft059
Copy link

Also Having the same issue on MacOs 10.14 Mojave the Tool bar only show when re-sizing the window it's like an overlapping issue maybe it can be resolved by showing the menu in a separate window.

Enregistrement.de.l.ecran.2023-06-25.a.10.30.04.mov

@randoogle
Copy link

Not sure if it's worth mentioning, but the symptoms of this using Wayland are a bit different. Instead of a flickering UI, it seems as though the UI is behind the render screen. You can only catch glimpses of it when doing selections on nearby objects:
Screenshot from 2023-07-03 23-45-13
When I switch from wayland to xorg, I see the same flickering during resizing behavior that everyone else is reporting.

@Endersirio
Copy link

Any news?
I have the same problem

@Xalalau
Copy link

Xalalau commented Mar 10, 2024

2024, same issue. Linux Mint 21.3.

And I needed to install a missing dependency to be able to open the maps: sudo apt-get install freeglut3-dev

@EvelynMakesThings
Copy link

I share a similar issue, kali linux.
Screenshot_2024-03-27_09_56_17
UI flickers into existence as I move the camera, otherwise the UI is invisible. Appears like z-fighting. Note, the ui can still be interacted with even if it is not visible.

@Sharparam
Copy link

As a workaround, is it possible to just make the 3D viewport smaller so that the UI controls no longer overlay it and become usable?

@ghost
Copy link

ghost commented Jul 7, 2024

image

Same issue.

Debian 12.6 with DWM
Python 3.11.2
Amulet Map Editor 0.10.34

@Random-Penguin
Copy link

Same issue

L4T Ubuntu Noble 24.04
NVidia Tegra X1
Python 3.12
Amulet 0.10.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opengl an error from OpenGL code OS: Linux OS: MacOS priority: medium this ticket needs resolving soon type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests