godotengine / godotengine/godot

FileSystem Does Not Behave Properly During Rescanning

Open
#89,218 1 comment 0 reactions 0 assignees View on GitHub
needs testing topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Current master at commit: 9b94c80e9aff2a4f363ae6d8e2bbe837aa5876bc

### System information

Windows 11

### Issue description

I'm in the process of implementing proposal [5633](https://github.com/godotengine/godot-proposals/issues/5633), and this error is occurring. It seems that during the rescan process, threading is not working correctly. This issue only occurs when there are more than two files being renamed.

Here is the error message, but it is not the root cause. There seems to be an issue with threading; that's all I know so far:

```
editor\editor_file_system.cpp:1710 - Condition "packed_scene.is_null()" is true. Returning: HashSet()
```

### Steps to reproduce

https://github.com/godotengine/godot/assets/53887662/c58cd837-f51d-4827-abad-2e412bcfd9d0

Look at the modified time of these files; the modification dates of the last two selected files have reverted back to several days ago.

![image](https://github.com/godotengine/godot/assets/53887662/cebba55c-27c9-4767-845d-064ced49f013)

### Minimal reproduction project (MRP)

Please test with this PR: https://github.com/godotengine/godot/pull/89063

Contributor guide

Open the contributing guide

Research direction

Reproduce the rescan behavior on Windows 11 using the minimal reproduction project from PR 89063, then inspect editor/editor_file_system.cpp around line 1710. Focus on rescanning when more than two files are renamed and compare the reported modification times. Done means the rescan no longer restores the last two files' dates or produces the observed failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.