godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.21k stars 21.22k forks source link

Switching fullscreen mode in Godot 4.3 crashes the entire laptop in Fedora 40 #97675

Open Caferino opened 1 month ago

Caferino commented 1 month ago

Tested versions

System information

Fedora 40

Issue description

I followed this tutorial or project in youtube, which was working completely fine in Godot 4.2 (https://www.youtube.com/watch?v=dMYv6InQgno&list=PLcZp9zrMgnmOOQXevC-2CfH67QP3mB4wv - Godot 3 Inventory Tutorial | Modular Inventory).

However, in Godot 4.3 it's an absolute mess regarding the fullscreen mode. For no reason, it's always true, the _emit_changed signal executes three times, with two of them using wrong variables, and the worst part is, when launching the game and switching fullscreen mode about 4 times, the entire laptop crashes. At first all my applications got closed, Brave and Godot, except OBS. I tried it a second time and my entire screen froze, went dark, and said "Booting Fedora 40". It's incredible.

Extra: The project is also printing 15 blank lines for no reason. I don't have any print("") or print() anywhere in the code, it makes no sense. I also get errors about animations not named "", which didn't occur in Godot 4.2 and they don't break the game, but they also make no sense, because function play() from AnimatedSprite2D can accept no name as a parameter. It's just a tiny script I use to autoplay AnimatedSprite2Ds once they are ready.

Steps to reproduce

Open the MRP, execute the game, click on the settings button and switch fullscreen mode a few times until it crashes your entire pc. I have a live stream video of me going through this whole problem from beginning to end (AT HOUR, MINUTE, SECOND 19:21:30 for the first encounter, and the last seconds of the entire stream for the full crash. The whole fullscreen problem begins at minute 18:50:00): https://www.twitch.tv/videos/2264047277

NOTE: I am working on my game, which is using the Modular Inventory as it is, I have not edited a single line in it. The MRP should suffer the same error, I will test it after posting this in case it crashes my computer again.

Minimal reproduction project (MRP)

Modular-Inventory-Part-12-main.zip

Caferino commented 1 month ago

UPDATE: Just tried the MRP and it works flawlessly. It's only happening in my project, when launching the level "Farm Too.tscn". This is insane, I haven't really modified the modular inventory code or anything. Something else probably got corrupted or is interfering, and to find what it is I think it's going to take a goooood while. I am sorry for this mess, I will see what I can find and report here.

My game is open-source: https://github.com/Caferino/Area-51

Caferino commented 1 month ago

SECOND UPDATE: Alright, this is even weirder. I decided to reopen the project and cause the crash, however, it DID NOT HAPPEN ANYMORE! My game is working as flawlessly as the MRP.

Last clue: OBS, I will try again, but while live streaming. Maybe it was OBS interfering. Possibilities: I also have some Gnome Extensions like "Hide Top Bar", which has a feature involving fullscreen applications, but I don't know if it could affect any of this the way it does.

For some reason _on_changed still executes three times unless I use a workaround I found, commenting the signal call '_on_data_changed' on settings.gd and 'emit_changed' in settings_data.gd. It's weird I have to do that, and also weirder it'd set fullscreen with "true" instead of "false" as I set it up. The 15 blank lines are still happening too, which is super weird. I will update this comment with the results of using OBS at the same time.

LAST UPDATE: It crashed again, while having OBS open and switching a lot. It'd also not work well, wouldn't switch the fullscreen sometimes. Very odd behavior, not sure what to do

Zireael07 commented 1 month ago

IIRC people have had issues running OBS with Godot.

What is your GPU?

Caferino commented 1 month ago

That's a relief to hear to be honest, thanks for that, it narrows everything by a lot; and here, my neofetch:

OS: Fedora Linux 40 (Workstation Edition) Host: HP ENVY m7 Notebook Kernel: 6.10.11-200.fc40.x86_64 Uptime: 1 day, 3 hours, 29 mins Packages: 2706 (rpm), 46 (flatpak) Shell: bash 5.2.26 Resolution: 1920x1080 DE: GNOME 46.5 WM: Mutter WM Theme: Adwaita Theme: Nordic-darker-v40 [GTK2/3] Icons: Adwaita [GTK2/3] Terminal: gnome-terminal CPU: Intel i7-7500U (4) @ 3.500GHz GPU: Intel HD Graphics 620 GPU: NVIDIA GeForce 940MX Memory: 3217MiB / 15870MiB

During testing and pretty much all day I use a 720p resolution, because 1080p overheats my laptop when playing World of Warcraft, fps drops and more. The screen also has an uncommon size of 17'', which has made me wonder if that could potentially have some involvement with bugs I have dealt with before regarding GPU/UIs/Gnome, etc, maybe not