-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Godot crashes or hangs very frequently when trying to bake lightmaps #48822
Comments
Please post here minimal project, to be sure that we test same scene which crashes for you. |
Switch with the last release, i'm get the issue. Try on a desktop computer and a laptop, W10 build 19042.985. What i can do to give more debug information ? |
@akien-mga looks like we may have re-introduced #45097 with the switch to embree-aarch64? I will work on switching back to the latest Embree to see if that helps. @jocamar @stilobique Can you try running on 3.3-stable and see if that works better? It would help us narrow down if it was a regression or a previously unnoticed bug. |
Yes, it's work perfectly for me with this package. |
Damn :| That's why I always require that we have patch files that fully describe the changes we made to upstream code to make sure we reapply them on update. This change was lost in the embree-aarch64 update: |
@stilobique Cool, thanks for testing! That means something broke during our switch to embree-aarch64. @akien-mga From what I see some of our fixes to Embree were not tracked in the patches file, so they got lost during the refactor. I'm working on upgrading to the latest Embree but this time making sure to create a full diff and keep all the fixes. |
@jocamar @stilobique Could you test either of those binaries to see if they solve the issue? https://downloads.tuxfamily.org/godotengine/testing/Godot_v3.3.1-stable_win64.exe-fix48822.zip They're built from diff --git a/thirdparty/embree/common/sys/platform.h b/thirdparty/embree/common/sys/platform.h
index 737f14aa6e..e3be41a27a 100644
--- a/thirdparty/embree/common/sys/platform.h
+++ b/thirdparty/embree/common/sys/platform.h
@@ -91,7 +91,7 @@
#define dll_import
#endif
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__MINGW32__)
#if !defined(__noinline)
#define __noinline __declspec(noinline)
#endif It only affects the editor build, so if that works, feel free to use those binaries together with the official 3.3.1-stable export templates, they should work fine. |
That build seems to work, or at least it no longer crashed or hanged and is in the process of baking the shadows for my larger scene. I did get some slowdowns when navigating the scene before I began baking the shadows, but that could just be my impression or that it's a debug build or something. Regardless the main problem seems fixed. |
The slowdown is likely something that would be reproducible in the first |
Re-do of godotengine#45380 lost in godotengine#48455. Rediff patch on current embree-aarch64 upstream. Fixes godotengine#48822.
I made a test build for all platforms of #48967 which upgrades Embree to 3.13.0, and should also solve this issue: #48967 (comment) If anyone affected by this issue could give it a try to confirm that it works properly, that would be great :) |
For users affected by this issue who need a hotfix, I promoted my test builds as an official fix, uploaded here: https://downloads.tuxfamily.org/godotengine/3.3.1/Godot_v3.3.1-stable_win64.exe-fix48822.zip They're the exact same version as |
I'm test with your package and it's ok. It's work. a new official release are planned or this patch is planned with the 3.4 release ? I'm work with a small team, i need to know how to distributed the fix. |
A fix will be included in 3.3.2 soon, I'm just not sure yet whether it will be the minimal fix in the above build, or a full embree upgrade from #48888. Until then, you can use this 3.3.1 "fix48822" build in production and share it with other team members who need to bake lightmaps. |
Godot version:
3.3.1-stable
OS/device including version:
Windows 10, GeForce RTX2070 MaxQ, i7-10875h @ 2.3Ghz
Issue description:
Godot frequently crashes or hangs when trying to bake lightmaps. When it crashes it just closes the engine and doesn't print anything to the terminal, when it hangs it's always at "Preparing data structures". The scene I'm running is fairly straightforward (the scene I was trying this on at the start is very complex but I started deleting stuff to see if complexity was the issue) with just 4 meshes all marked to be used in baked lighting and with UV2s generated by Godot. I've tried to wait for a long time but the program never continues, it just stays at that state taking up 100% of the CPU.
Weirdly, I got it to a point where if I remove the "use in baked light" checkbox from one of the meshes it almost always works and gets past the "Preparing data structures" stage almost instantly, but if I set the mesh to be used again it always hangs of crashes.
Here are my settings for the baked lightmap:
Steps to reproduce:
I just run created a baked lightmap node, made it envelop my scene and set the settings as the screenshot above and try to run it on this simple scene with 4 meshes. The result is it almost always hangs or crashes.
I don't know if this is a regression or not as I had never used baked lightmaps before this, but it is certainly very annoying as I was hoping to use them to optimize the lighting in my fairly large scene.
The text was updated successfully, but these errors were encountered: