godotengine / godotengine/godot
.import files losing their resource references crashes
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in https://github.com/godotengine/godot/commit/810f127022ec2cbfb288e436151d1a777c7b5da7
As far as we know it has always been like this.
### System information
Mac Mini, Apple Silicon
### Issue description
.import files lose their resource references. @lyuma wanted to store references embedded but concerned that resource references cause crashes.
Also if the resource is missing it crashes. Probably want to use the missing dependency manager.
The resource paths also do not follow renames
### Steps to reproduce
Write some core C++ code to write a resource.
```c++
r_options->push_back(ImportOption(PropertyInfo(Variant::OBJECT, "import/bindpose_data", PROPERTY_HINT_RESOURCE_TYPE, "BindposeData", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Variant()));
```
### Minimal reproduction project (MRP)
This is not project specific, but needs a .import with an invalid path as a property.
Contributor guide
Research direction
Start with the core C++ code that writes the resource and the ImportOption for "import/bindpose_data". Reproduce the issue using a .import file containing an invalid resource path, then inspect the missing dependency manager and resource-reference handling. Done means missing or renamed references no longer crash and are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100