Open Gromph opened 2 years ago
CC @godotengine/rendering
The crash happens when you shoot the moon, which means to take all the point cards, it's kind of hard to do though.
I guess you could look at what kind of code runs when this specific condition is reached. Judging by the crash stacktrace, it seems to be changing the size of a viewport (Viewport::set_size
). Could it be that it tries to allocate a size which might exceed what's supported by a low end IGP such as Intel HD 3000?
It resizes the Viewport and ViewportContainer to the main window size using: $ViewportContainer/Viewport.size = get_viewport().size $ViewportContainer.set_size(get_viewport().size)
I would assume the video card should support a viewport the same size as the window. Maybe I should try to get it to initially create the Viewport and ViewportContainer the correct size and avoid resizing.
We have an existing userbase of players who aren't core gamers with high end machines, so we need to be able to detect problems and fall back gracefully. Is there a good way to detect a failure like this (running out of video memory) without crashing. So that we could retry with lower res textures, or using a smaller viewport and scaling up.
Is there a good way to detect a failure like this (running out of video memory) without crashing.
Godot doesn't expose methods to detect the amount of dedicated VRAM available, but you can check for the GPU model vendor (VisualServer.get_video_adapter_vendor()
) and check whether the string contains Intel
:
if "Intel" in VisualServer.get_video_adapter_vendor():
# Likely an Intel IGP.
pass
However, this may break on Intel's dedicated Arc GPUs once they're released. I don't know how Intel intends to tackle this, but surely they will change the vendor name not to contain Intel
due to the sheer number of games/applications detecting Intel IGPs this way :slightly_smiling_face:
Could it be that it tries to allocate a size which might exceed what's supported by a low end IGP such as Intel HD 3000?
Although it is interesting the report is coming up for 3.4 and not for 3.3.4. You would have thought that size related running out of memory would be more likely to happen in both, unless there was a leak introduced in 3.4.
If needed I can create a small project with a similar scene setup
Yes, this is usually by far the quickest way of getting a bug identified and fixed, otherwise it is often just guesswork.
Well this is a bit embarrassing. We had the size of the Viewport set to 4k(3840x2160) in the editor, then resized it to the window size when added to scene. So it is totally understandable that an older gpu wouldn't support that size. So this likely isn't a problem with Godot. We must've just got lucky that no one got this crash while running with the 3.3.4 version.
Is there a way to set the initial size of a Viewport to avoid having it sized twice? I looked into modifying the SceneState after it's loaded but before being instanced, but it only has get functions no way to set properties.
Anyways feel free to close this issue.
Is there a way to set the initial size of a Viewport to avoid having it sized twice?
Try to use a very small size for the viewport by default, then make it larger only when needed.
Bad news, it still crashes. We released a new build of our game with the initial viewport size set to 1280x720, then in this case it resized it to 1600x1160. User running Windows 10 with Intel(R) HD Graphics 2000. The callstack got cutoff:
Thread 3836 Crashed:
0 ig4icd32.dll 0x6dcd5735
Godot version
3.4 custom build
System information
Windows 10, GLES2
Issue description
We updated our games last week from godot 3.3.4 to 3.4. Since then we've had about a dozen of this crash reported by users to sentry.io, so I believe this is a new crash in 3.4 that wasn't there before. I have not been able to reproduce the crash.
This crash may be related to https://github.com/godotengine/godot/issues/55394
It is crashing instancing a scene. The scene contains a full screen ViewportContainer that contains a Viewport with a 3d Scene. It also has a label on top of everything that has a size 150 font, use Mipmaps is off.
Here is the raw call stack from sentry.io
Here is godot.log:
Steps to reproduce
I have not been able to reproduce. About 200 users have updated to the new version and about a dozen of them have crashed. The game is Hardwood Hearts and can be downloaded here: https://www.hardwoodgames.com/beta/ The crash happens when you shoot the moon, which means to take all the point cards, it's kind of hard to do though.
Minimal reproduction project
I'm hoping the problem can be tracked down with the callstack. If needed I can create a small project with a similar scene setup