-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
VideoStreamPlayer causes random crashes on a Windows export without "Export with Debug" #78788
Comments
Tested the MRP on Linux and I can't reproduce a crash with the Linux release export template or the Windows release export template (through Wine), so this may be Windows specific. With the Linux template, I get these errors raised occasionally when switching scenes, which can relate to what would be causing a crash on Windows:
|
I have just played the exported game on Windows 8.1 and didn't get any crashes, although I have switched scenes about 100 times... Then I closed the game with Alt+F4 and reopened it. I got a crash after 3 clicks... Weird...
What is causing this error? Do you know how to fix it? |
This error signals an internal engine bug, it's not something you're doing wrong and can fix, at most you can try to change how you change scenes to work it around. Lines 982 to 986 in 9a09ee5
|
I'm actually a beginner with Godot, so I don't really know another way to change the scenes. Could you, please, give me an example based on the MRP? |
You can do something like this: func _on_button_pressed():
var new_scn = load("res://scene_2.tscn").instantiate()
$/root.add_child(new_scn)
self.queue_free() And likewise for This adds the new scene to the root, and then frees the old scene after a delay, which seems to prevent the error in my test, so it might fix the crash on Windows.
|
Thanks for your reply! Sadly your workaround didn't fix random crashes, checked it on Windows 10 and Windows 8.1. |
Reopening, because #78987 is getting reverted. |
This might have been fixed by #78988. At least for me the errors reported in #78788 (comment) are no longer reproduced in 4.2-rc1. Could you test to confirm whether 4.2-rc1 (or any later version when you get to test) solves the crash you had on Windows? |
Based on my tests I'll close this as fixed by #78988, but please let us know if you still reproduce that crash in 4.2-rc1 or later. |
Godot version
4.1.beta3, 4.0.3.stable
System information
Godot v4.1.beta3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (NVIDIA; 31.0.15.3598) - Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz (6 Threads)
Issue description
The game crashes on a Windows export without "Export with Debug" when I use VideoStreamPlayer node as a background in my scene.
I have created 2 simple scenes with VideoStreamPlayer and a button in each to switch between them. When I run the game in the editor, it works fine, when I export it with debug it works fine. As soon as I untick "Export with Debug" the game crashes randomly, sometimes after a few button clicks(changing scenes), sometimes on the first click... The console gives no errors whatsoever...
Tried to do it in both: Godot 4.0.3 and 4.1 beta3, the result is the same.
I have also recreated this in Godot 3.5.2, the exported game without "Export with Debug" works fine, without crashes at all.
I have spent 4-5 hours yesterday searching internet and trying to fix it, but I couldn't. Tried different ffmpeg builds to convert the video, tried different video framerates, with audio and without audio... Looks like it's a Godot 4 issue.
Steps to reproduce
1 - create a scene, add VideoStreamPlayer node, assign your video to it.
2 - create another scene with a VideoStreamPlayer node and assign your video to it.
3 - create buttons on each scene to switch between them.
4 - export your project for windows without "Export with Debug"
5 - play the game, after switching the scenes a couple of time, the game will crash.
Minimal reproduction project
Crash_Test_3.zip
The text was updated successfully, but these errors were encountered: