SurfaceTool.commit doesn't seem to be working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DarrionOakenbow

Godot version:
Master branch, commit a2cf1c3d049d0ca4de9d939550d1fb21c4d54297

OS/device including version:
Arch Linux. R9 270x with AMDGPU drivers, but I doubt it’s relevent here.

Issue description:
Using the mesh from SurfaceTool.commit results in a segfault. It should take the mesh and use it.
When run from the console, I get the following backtrace:

Adding fullZone
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on Issues · godotengine/godot · GitHub
[1] /usr/lib/libc.so.6(+0x378b0) [0x7f3feb0578b0] (??:0)
[2] Reference::unreference() (/home/oakenbow/Dev/Lib/godot/./core/safe_refcount.h:118)
[3] Ref::unref() (/home/oakenbow/Dev/Lib/godot/./core/reference.h:280 (discriminator 1))
[4] Ref::ref(Ref const&) (/home/oakenbow/Dev/Lib/godot/./core/reference.h:75)
[5] Ref::operator=(Ref const&) (/home/oakenbow/Dev/Lib/godot/./core/reference.h:155)
[6] MeshInstance2D::set_mesh(Ref const&) (/home/oakenbow/Dev/Lib/godot/scene/2d/mesh_instance_2d.cpp:61)
[7] MethodBind1<Ref const&>::ptrcall(Object*, void const**, void*) (/home/oakenbow/Dev/Lib/godot/./core/method_bind.gen.inc:782 (discriminator 6))
[8] godot(godot_method_bind_ptrcall+0x48) [0x17f9f7d] (/home/oakenbow/Dev/Lib/godot/modules/gdnative/gdnative/gdnative.cpp:70)
[9] godot::MeshInstance2D::set_mesh(godot::Refgodot::Mesh) (??:0)
[10] Chunk::remesh() (??:0)
[11] Chunk::update(double) (??:0)
[12] void godot::_WrappedMethod<Chunk, void, double>::apply<0>(godot::Variant*, Chunk*, godot::Variant**, godot::__Sequence<0>) (??:0)
[13] godot_variant godot::__wrapped_method<Chunk, void, double>(void*, void*, void*, int, godot_variant**) (??:0)
[14] NativeScriptInstance::call_multilevel(StringName const&, Variant const**, int) (/home/oakenbow/Dev/Lib/godot/modules/gdnative/nativescript/nativescript.cpp:905)
[15] Node::_notification(int) (/home/oakenbow/Dev/Lib/godot/scene/main/node.cpp:58)
[16] Node::_notificationv(int, bool) (/home/oakenbow/Dev/Lib/godot/./scene/main/node.h:46 (discriminator 14))
[17] CanvasItem::_notificationv(int, bool) (/home/oakenbow/Dev/Lib/godot/./scene/2d/canvas_item.h:166 (discriminator 3))
[18] Node2D::_notificationv(int, bool) (/home/oakenbow/Dev/Lib/godot/./scene/2d/node_2d.h:38 (discriminator 3))
[19] MeshInstance2D::_notificationv(int, bool) (/home/oakenbow/Dev/Lib/godot/scene/2d/mesh_instance_2d.h:37 (discriminator 3))
[20] Object::notification(int, bool) (/home/oakenbow/Dev/Lib/godot/core/object.cpp:952)
[21] SceneTree::_notify_group_pause(StringName const&, int) (/home/oakenbow/Dev/Lib/godot/scene/main/scene_tree.cpp:975)
[22] SceneTree::idle(float) (/home/oakenbow/Dev/Lib/godot/scene/main/scene_tree.cpp:522 (discriminator 3))
[23] Main::iteration() (/home/oakenbow/Dev/Lib/godot/main/main.cpp:1919)
[24] OS_X11::run() (/home/oakenbow/Dev/Lib/godot/platform/x11/os_x11.cpp:3034)
[25] godot(main+0xdc) [0x1387972] (/home/oakenbow/Dev/Lib/godot/platform/x11/godot_x11.cpp:56)
[26] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f3feb043ce3] (??:0)
[27] godot(_start+0x2e) [0x13877de] (??:?)
– END OF BACKTRACE –
[1] 26193 abort (core dumped) godot

Steps to reproduce:

Code. fullZone is a lookuptable of Vector3s (omitted for brevity).
I’ve also tried without adding any idices. No dice there either.

I would’ve put this on Github, but I’m not completely sure that I’m not the one doing something wrong here.