With commit 96a95cb9743e755f10fa6a14895ea099e5ac4c51, const was added to the HashMap passed into PostImportPluginSkeletonRenamer::_internal_process. This had a subtle change of behavior.
The code was using the [] operator(see here) on the HashMap which previously would insert if the item being accessed did not exist(see more here). This allowed the code to previously work.
The const version, does not insert and instead hits a CRASH_COND and crashes (see here for more).
Steps to reproduce
Create new project.
Download the GLB version of the model.
Import into Godot
From the import dialog, add a new BoneMone, selecting the humanoid profile.
Click import
Minimal reproduction project (MRP)
The only model I have on hand that reproduces currently is the one linked above. It is over the max size. Steps are sufficient to reproduce.
Tested versions
Reproducible in any version newer then: [96a95cb9743e755f10fa6a14895ea099e5ac4c51] Add const lvalue ref to container parameters
System information
Godot v4.3.dev (0a2ddaa6b) - Fedora Linux 39 (Workstation Edition) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (RADV NAVI22) () - 13th Gen Intel(R) Core(TM) i7-13700K (24 Threads)
Issue description
The editor crashes during the import of a model when a bone map has been applied but not all bones are able to be mapped.
An example model can be found here: https://skfb.ly/6AnLO
This might be related to #84371 and #83041.
With commit 96a95cb9743e755f10fa6a14895ea099e5ac4c51, const was added to the
HashMap
passed intoPostImportPluginSkeletonRenamer::_internal_process
. This had a subtle change of behavior.The code was using the
[]
operator(see here) on theHashMap
which previously would insert if the item being accessed did not exist(see more here). This allowed the code to previously work.The const version, does not insert and instead hits a
CRASH_COND
and crashes (see here for more).Steps to reproduce
Minimal reproduction project (MRP)
The only model I have on hand that reproduces currently is the one linked above. It is over the max size. Steps are sufficient to reproduce.