Closed qarmin closed 2 years ago
vector3i.h:222:42: runtime error: left shift of negative value -5
Why is this a runtime error? I used <<
and >>
for a long time as a fast way to do floored division and multiplication by a power of two, it always worked so far (https://ideone.com/sPRvtB). Is this not standard or actually UB?
Or do you mean the shift was a negative shift? (i.e x << -5
?) If so, how did that happen? I'll add asserts just in case.
[3] ProgramGraph::get_node(unsigned int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/program_graph.cpp:151 (discriminator 1))
[4] ProgramGraph::remove_node(unsigned int) (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/program_graph.cpp:58)
[5] VoxelGeneratorGraph::remove_node(unsigned int) (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/voxel_generator_graph.cpp:58)
[6] MethodBind1<unsigned int>::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/./core/method_bind.gen.inc:775 (discriminator 12))
This looks like a call to remove_node
from GDScript. I think I should use an ERR_FAIL_COND
for the exposed API, the CRASH_COND
should only get reached if a problem is in a lower-level layer, or maybe have a chain of ERR_FAIL_COND
all the way.
[3] ProgramGraph::get_node(unsigned int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/program_graph.cpp:151 (discriminator 1))
[4] ProgramGraph::is_connected(ProgramGraph::PortLocation, ProgramGraph::PortLocation) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/program_graph.cpp:100)
[5] ProgramGraph::can_connect(ProgramGraph::PortLocation, ProgramGraph::PortLocation) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/program_graph.cpp:112)
[6] VoxelGeneratorGraph::can_connect(unsigned int, unsigned int, unsigned int, unsigned int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/voxel_generator_graph.cpp:66)
[7] MethodBind4RC<bool, unsigned int, unsigned int, unsigned int, unsigned int>::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/./core/method_bind.gen.inc:3745 (discriminator 20))
Same here
[3] FixedArray<VoxelGraphNodeDB::NodeType, 42u>::operator[](unsigned int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/../../streams/../storage/../util/fixed_array.h:32 (discriminator 1))
[4] VoxelGraphNodeDB::get_type_info_dict(unsigned int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/voxel_graph_node_db.cpp:1608)
[5] VoxelGeneratorGraph::_b_get_node_type_info(int) const (/mnt/Miecz/godot3.2/modules/voxel/generators/graph/voxel_generator_graph.cpp:987)
[6] MethodBind1RC<Dictionary, int>::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/./core/method_bind.gen.inc:1333 (discriminator 9))
Same here with get_type_info_dict
Voxel version - 2b202cf07c8bc1429db7d22eb4c4e1f63318a023
When running https://github.com/qarmin/RegressionTestProject/archive/refs/heads/3.x.zip with Godot and this plugin compiled with address sanitizer, then I got this error messages:
and this crashes