godotengine / godotengine/godot

Internal Script Error: Opcode 0 (Please report) when using CACHE_MODE_IGNORE_DEEP with ResourceLoader.load()

Open
#100,985 11 comments 0 reactions 0 assignees View on GitHub
bug topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot version: 4.3.stable

### System information

Godot v4.3.stable - Windows 10.0.26100 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 (NVIDIA; 32.0.15.6636) - 12th Gen Intel(R) Core(TM) i7-12700F (20 Threads)

### Issue description

Got an internal script error Opcode 0 and it is requested that I report it so I'm reporting it. Here's the image.

![Image](https://github.com/user-attachments/assets/9bce3a17-4a14-4258-be1c-2977720e45c4)
![Image](https://github.com/user-attachments/assets/1a7c55a0-1874-41ab-be7b-f7395c907930)

### Steps to reproduce

Use ResourceLoader.load(..., CACHE_MODE_IGNORE_DEEP) to load the same Resource at least twice.

### Minimal reproduction project (MRP)

MRP attached
[opcode-0-bug.zip](https://github.com/user-attachments/files/18283798/opcode-0-bug.zip)

Update: it appears to be related to the cach_mode I was using with ResourceLoader. Loading the resource a second time causes the issue. My understanding is that my use case should be valid but correct me if I misunderstood.

Contributor guide

Open the contributing guide

Research direction

Start with the attached opcode-0-bug.zip reproduction and the ResourceLoader.load() call using CACHE_MODE_IGNORE_DEEP. Reproduce loading the same resource at least twice, then trace the cache-mode handling in the Godot engine. Done means the repeated load no longer produces the internal Opcode 0 error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.