Skip to content
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

Engine freeze (then crash) when loading a scene with a specific CSG layout in Ubuntu #63839

Closed
Jcodefox opened this issue Aug 2, 2022 · 3 comments

Comments

@Jcodefox
Copy link

Jcodefox commented Aug 2, 2022

Godot version

4.0 alpha 13

System information

Ubuntu 20.04, Intel(R) HD Graphics 4600

Issue description

Godot 4 locks up when loading a scene with a specific layout of CSG blocks. Checking system monitor, RAM usage increases until Godot crashes with this error:

ERROR: Condition "!_ptrnew" is true. Returning: ERR_OUT_OF_MEMORY
   at: resize (./core/templates/cowdata.h:296)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha13.official (59dcddc453ed5cde80da20cfbad92bb17953d503)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x43090) [0x7f98d0e49090] (??:0)
[2] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x49762a1] (??:0)
[3] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x19c980b] (??:0)
[4] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x19ca36d] (??:0)
[5] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x4a126d7] (??:0)
[6] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x19c7b4b] (??:0)
[7] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x19c7bbf] (??:0)
[8] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x42888d4] (??:0)
[9] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a25f39] (??:0)
[10] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a2613d] (??:0)
[11] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a27f72] (??:0)
[12] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a28121] (??:0)
[13] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a32e2b] (??:0)
[14] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x486b1f3] (??:0)
[15] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x1e69432] (??:0)
[16] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x1e69b09] (??:0)
[17] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x42edf4d] (??:0)
[18] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0xec9ae0] (??:0)
[19] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2d2cf6a] (??:0)
[20] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a07df5] (??:0)
[21] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a5094e] (??:0)
[22] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a5287c] (??:0)
[23] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a8d1b2] (??:0)
[24] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x2a7aef7] (??:0)
[25] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0xe641a4] (??:0)
[26] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x40a356e] (??:0)
[27] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0x40a43e5] (??:0)
[28] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0xe66c29] (??:0)
[29] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0xdead98] (??:0)
[30] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f98d0e2a083] (??:0)
[31] /home/jcodefox/Downloads/Godot_v4.0-alpha13_linux.64() [0xe060de] (??:0)
-- END OF BACKTRACE --
================================================================

Steps to reproduce

Simply add this to a scene file:

[node name="Terrain" type="CSGCombiner3D" parent="."]

[node name="BlockC" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 125, 0)
size = Vector3(50, 50, 50)

[node name="BlockD" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 162.5, 0)
size = Vector3(25, 25, 25)

[node name="Enter" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 107, 0)
operation = 2
size = Vector3(30, 10, 10)

[node name="Exit" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 117, 0)
operation = 2
size = Vector3(30, 10, 10)

[node name="Fall3" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7, 142, 0)
operation = 2
size = Vector3(3, 46, 10)

[node name="Tunnel" type="CSGBox3D" parent="Terrain"]
transform = Transform3D(0.5, 0.866025, 0, -0.866025, 0.5, 0, 0, 0, 1, 0, 161, 0)
operation = 2
size = Vector3(4, 34, 10)

Minimal reproduction project

csg_crash_test.zip

@Calinou
Copy link
Member

Calinou commented Aug 2, 2022

By the way, it looks like #61908 isn't working as expected. The crash handler message should say Please include this when reporting the bug on: https://github.com/godotengine/godot/issues when an editor build crashes.

@StrandedSoftwareDeveloper

I was able to reproduce this error with a debug build of alpha 13
Here's a stack trace with debug symbols:

ERROR: Condition "!_ptrnew" is true. Returning: ERR_OUT_OF_MEMORY
   at: resize (./core/templates/cowdata.h:296)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha.custom_build (59dcddc453ed5cde80da20cfbad92bb17953d503)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040) [0x7fc821675040] (??:0)
[2] CowData<CSGBrushOperation::Build2DFaces::Face2D>::size() const (??:0)
[3] CowData<CSGBrushOperation::Build2DFaces::Face2D>::insert(int, CSGBrushOperation::Build2DFaces::Face2D const&) (??:0)
[4] Vector<CSGBrushOperation::Build2DFaces::Face2D>::insert(int, CSGBrushOperation::Build2DFaces::Face2D) (??:0)
[5] CSGBrushOperation::Build2DFaces::_find_edge_intersections(Vector2 const*, Vector<int>&) (??:0)
[6] CSGBrushOperation::Build2DFaces::insert(CSGBrush const&, int) (??:0)
[7] CSGBrushOperation::update_faces(CSGBrush const&, int, CSGBrush const&, int, CSGBrushOperation::Build2DFaceCollection&, float) (??:0)
[8] CSGBrushOperation::merge_brushes(CSGBrushOperation::Operation, CSGBrush const&, CSGBrush const&, CSGBrush&, float) (??:0)
[9] CSGShape3D::_get_brush() (??:0)
[10] CSGShape3D::_update_shape() (??:0)
[11] void call_with_variant_args_helper<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (??:0)
[12] void call_with_variant_args_dv<__UnexistingClass>(__UnexistingClass*, void (__UnexistingClass::*)(), Variant const**, int, Callable::CallError&, Vector<Variant> const&) (??:0)
[13] MethodBindT<>::call(Object*, Variant const**, int, Callable::CallError&) (??:0)
[14] Object::callp(StringName const&, Variant const**, int, Callable::CallError&) (??:0)
[15] Callable::call(Variant const**, int, Variant&, Callable::CallError&) const (??:0)
[16] MessageQueue::_call_function(Callable const&, Variant const*, int, bool) (??:0)
[17] MessageQueue::flush() (??:0)
[18] SceneTree::process(double) (??:0)
[19] Main::iteration() (??:0)
[20] OS_LinuxBSD::run() (??:0)
[21] /home/ssd/Downloads/godot-4.0-alpha13/bin/godot.linuxbsd.tools.64(main+0x17b) [0x55cfd4edd3e5] (??:0)
[22] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fc821657bf7] (??:0)
[23] /home/ssd/Downloads/godot-4.0-alpha13/bin/godot.linuxbsd.tools.64(_start+0x2a) [0x55cfd4edd18a] (??:0)
-- END OF BACKTRACE --
================================================================

@akien-mga akien-mga added this to the 4.0 milestone Aug 3, 2022
@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 27, 2023
@akien-mga akien-mga changed the title Godot 4 alpha 13 locks up when loading a scene with a specific CSG layout in Ubuntu Crash when loading a scene with a specific CSG layout in Ubuntu Jun 23, 2023
@akien-mga akien-mga changed the title Crash when loading a scene with a specific CSG layout in Ubuntu Engine freeze (then crash) when loading a scene with a specific CSG layout in Ubuntu Jun 23, 2023
@akien-mga
Copy link
Member

I can reproduce in 4.0-stable to 4.0.2-stable, and it was fixed in 4.0.3-stable and (at least, probably earlier) 4.1-beta3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants