Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VoxelStreamRegionFiles does not load the saved data #596

Open
matthewhilton opened this issue Feb 4, 2024 · 2 comments
Open

VoxelStreamRegionFiles does not load the saved data #596

matthewhilton opened this issue Feb 4, 2024 · 2 comments
Labels
Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided

Comments

@matthewhilton
Copy link

matthewhilton commented Feb 4, 2024

Describe the bug

  • A blocky terrain is set up with a VoxelStreamRegionFiles pointing at a directory
  • Some edits are made to the terrain
  • save_modified_blocks is called, and the region files are successfully saved (visible in file browser)
  • Upon game reload, the edits made are not loaded

To Reproduce
See above or use this test project
In the test project, press E to make an edit, and then R to save.
VoxelSaveLoadTest.zip

Expected behavior
I assume since there are no load methods, that the region loads the data automatically. However, the saved edits do not appear to load.

Debugging
I did some prodding around in the source and believe this is being hit, indicating the region cache is not loading correctly

case ERR_DOES_NOT_EXIST:
return EMERGE_OK_FALLBACK;

Environment

@Zylann
Copy link
Owner

Zylann commented Feb 4, 2024

Is this happening too if you reproduce this without the editor being open too? Haven't looked into it yet but my first suspicion is that if your scene is open in the editor, some files might be locked by it and the running game might be prevented from opening them by the OS (same with #597).
Another way to test that is by setting up the stream by script instead of having it in the editor, or turning off run_stream_in_editor.

Another possibility depending on how big your cube actually is, is that it simply didnt finish saving when you quit. Using graceful closing with the window's Close button should normally work fine, but if you use Godot's Stop button in the editor, that kills the game's process, leading to incomplete saving.

@Zylann
Copy link
Owner

Zylann commented Feb 4, 2024

I just tested a first time in my dev branch, the map loaded correctly.
image

Tested 3 more times, each time the game loads fine.
Tested 3 more times using the 4.1.1 build. Still loaded fine. And I'm on Windows 10 too so that setup is exactly the same.
I can't reproduce your issue.

issue596_cant_repro.mp4

@Zylann Zylann added the Needs more info Couldn't repro / more info needed label Feb 4, 2024
@Zylann Zylann added Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided and removed Needs more info Couldn't repro / more info needed labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided
Projects
None yet
Development

No branches or pull requests

2 participants