inkandswitch / inkandswitch/backstitch

Crash + corrupted scene after duplicating scene & adjusting embedded SpriteFrames resource

Open
#57 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
250
Forks
8
Avg merge
46m
Merged PRs (30d)
1

Description

Testing with alpha17. Steps (probably these can be cut down but this is what I did):

- Branch "spiky enemy"
- Branch "1. SpriteFrames Exported Texture addon"
- Install & enable this addon from AssetLib - this comes from Threadbar, it lets you replace a texture in all animations in a SpriteFrames resource. It's really handy for dropping in an alternative spritesheet for an in-game entity
- Merge this branch
- Branch "2. Create spiky enemy scene"
- Add this file to the `assets/` folder
Image
- Duplicate `enemy.tscn` to `spiky-enemy.tscn`
- Open `spiky-enemy.tscn`
- Rename root node to `SpikyEnemy`
- Click the AnimatedSprite2D node
- In the Inspector, click the SpriteFrames
- In the SpriteFrames' texture field in the inspector, replace its texture with the `enemy-spiky.png` file added above
- Change a couple of properties on `SpikyEnemy`: raise speed, disable squashable and fall off edge
- Open `main.tscn`
- Instantiate `spiky-enemy.tscn`
- Run the game

At this point the editor showed some errors, then crashed before I could take a screenshot:

On restarting the editor I see the following in the Output tab, along with some related error dialogs:

```
Godot Engine v4.4.2.rc.gh (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started on port 6006 ---
--- GDScript language server started on port 6005 ---
Entered tree
Sidebar: ready!
Initialized, hiding init button
ERROR: scene\resources\resource_format_text.cpp:39 - res://components/enemy/spiky-enemy.tscn:7 - Parse Error: Can't load cached ext-resource id: 2_gk2h2.
ERROR: Failed loading resource: res://components/enemy/spiky-enemy.tscn. Make sure resources have been imported by opening the project in the editor at least once.
ERROR: scene\resources\resource_format_text.cpp:39 - res://components/enemy/spiky-enemy.tscn:7 - Parse Error: Can't load cached ext-resource id: 2_gk2h2.
ERROR: Failed loading resource: res://components/enemy/spiky-enemy.tscn. Make sure resources have been imported by opening the project in the editor at least once.
ERROR: scene\resources\resource_format_text.cpp:282 - Parse Error: Parse error. [Resource file res://main.tscn:283]
ERROR: Failed loading resource: res://main.tscn. Make sure resources have been imported by opening the project in the editor at least once.
ERROR: scene\main\window.cpp:992 - Attempting to make child window exclusive, but the parent window already has another exclusive child. This window: /root/@EditorNode@21274/@Panel@14/@DependencyErrorDialog@862, parent window: /root, current exclusive child window: /root/@AcceptDialog@21798
ERROR: Failed loading resource: res://.patchwork/temp_2b068fd/assets/enemy-spiky.png. Make sure resources have been imported by opening the project in the editor at least once.
ERROR: Error loading resource: 'res://.patchwork/temp_2b068fd/assets/enemy-spiky.png'.
ERROR: res://.patchwork/temp_f1929c1/components/enemy/enemy.gd:1 - Parse Error: Class "Enemy" hides a global script class.
ERROR: modules\gdscript\gdscript.cpp:3022 - Failed to load script "res://.patchwork/temp_f1929c1/components/enemy/enemy.gd" with error "Parse error".
on_initial_checked_out_branch
Sidebar initialized!
update_ui_on_branches_changed
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the branch, scene duplication, and embedded SpriteFrames change described in the report, then inspect components/enemy/spiky-enemy.tscn and main.tscn alongside the listed resource_format_text.cpp errors. Trace the cached ext-resource and imported asset failures first; done means the duplicated scene and main scene load without corruption, editor errors, or a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
game-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.