Amulet-Team / Amulet-Map-Editor

A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7.
https://www.amuletmc.com/
1.73k stars 122 forks source link

[linux/macOS] Flickering UI on canvas #127

Open gentlegiantJGC opened 3 years ago

gentlegiantJGC commented 3 years ago

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

EvilSupahFly commented 3 years ago

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

How much of it still applies to wxPython of 2020?

gentlegiantJGC commented 3 years ago

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

EvilSupahFly commented 3 years ago

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

exo-core commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Having this on Ubuntu 18.04, Python 3.8, amulet 0.8.7

EnricoMonese commented 3 years ago

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.

https://user-images.githubusercontent.com/19847464/123715404-85f47e00-d878-11eb-968c-014f52406b6c.mp4

Neubulae commented 3 years ago

Having this on Arch Linux, Python 3.9.6, Amulet 0.8.11

leucome commented 3 years ago

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

simisimis commented 3 years ago

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

giray commented 3 years ago

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

gentlegiantJGC commented 3 years ago

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 commented 3 years ago

@gentlegiantJGC The demo renders fine for me.

gentlegiantJGC commented 3 years ago

What OS are you using?

EvilSupahFly commented 3 years ago

@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 commented 3 years ago

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

Moilleadoir commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Demo runs well

processor286 commented 2 years ago

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 
lionkor commented 2 years ago

Still an unresolved issue.

EvilSupahFly commented 2 years ago

I suffered a catastrophic drive failure, and I'm waiting for my replacement to arrive. Once it's here, and I've reinstalled my core OS, I'll take this for another spin while the system is clean.

PixelRave commented 2 years ago

I have the same issue on Mint OS, no menu in the 3D editor and its flickering like crazy.

hyperstown commented 2 years ago

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

Demo works without an issue.

DE: KDE Plasma 5.23.4
QT version: 5.15.2
Kernel: 5.15
OS: Arch
polyzium commented 2 years ago

Manjaro, KDE Plasma 5.23.4, Qt 5.15.2. Works as expected. image

uiytt commented 2 years ago

Works perfectly

DE: Gnome 40.0
Kernel: 5.15.5
OS: Pop 21.10
ShockedCoder commented 2 years ago

Demo works perfectly demo image

DE: Xfce 4.16
Kernel: 5.10.131-1-MANJARO
OS: Manjaro Linux x86_64
sebastianbock17 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

Dxhs commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Works perfectly

DE: Gnome 40.0
Kernel: 5.15.5
OS: Pop 21.10

looks like amulet works for @uiytt ?

Kcraft059 commented 1 year ago

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.

https://github.com/Amulet-Team/Amulet-Map-Editor/assets/137693466/16e37f26-e97a-4253-bf9e-dda604a5d964

randoogle commented 1 year ago

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 commented 9 months ago

Any news? I have the same problem

Xalalau commented 6 months ago

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 commented 5 months ago

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 commented 5 months ago

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?

bt0rne commented 2 months ago

image

Same issue.

Debian 12.6 with DWM Python 3.11.2 Amulet Map Editor 0.10.34

Random-Penguin commented 2 days ago

Same issue

L4T Ubuntu Noble 24.04 NVidia Tegra X1 Python 3.12 Amulet 0.10.35