Fix editor_doc_cache
locked by adb
process on editor startup
#97000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was able to reproduce the problem consistently under the following conditions:
editor_doc_cache-4.4.res
in the cache folder:C:\Users\[user]\AppData\Local\Godot
[editorpath]\editor_data\cache
editor_doc_cache-4.4.res
on disk and fails.I tried reproducing the problem by starting adb in a loop in PowerShell and writing to
editor_doc_cache-4.4.res
in another PowerShell script but was never able to trigger the issue. I also changed the working directory when startingadb.exe
inOS_Windows::execute
without success. I still don't understand why adb locks this particular file only when started from Godot.The fix was to postpone the first adb call until after the first scan is completed by adding a check for
EditorNode::get_singleton()->is_editor_ready()
inEditorExportPlatformAndroid::_check_for_changes_poll_thread
. In any case, it wasn't particularly useful to call adb so early, even before the editor is ready.Here is a small MRP project I used to reproduce the issue:
test-godot-export-android.zip