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

Could not write to env_meta.txt on Windows #14619

Open
Laudrin opened this issue May 6, 2024 · 5 comments
Open

Could not write to env_meta.txt on Windows #14619

Laudrin opened this issue May 6, 2024 · 5 comments
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible Windows

Comments

@Laudrin
Copy link

Laudrin commented May 6, 2024

Minetest version

Minetest 5.8.0 (Windows)
Using Irrlicht 1.9.0mt13
Using LuaJIT 2.1.0-beta3
BUILD_TYPE=Release
RUN_IN_PLACE=1
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="."
STATIC_LOCALEDIR="locale"

Irrlicht device

No response

Operating system and version

Windows Version 10.0.19045 Build 19045

CPU model

Intel(R) Core(TM) i3 CPU 530 @ 2.93GHz

GPU model

NVIDIA GeForce GTX 1050 Ti

Active renderer

OpenGL 4.6.0

Summary

Minetest crashed when playing a single player game with a world I already played a lot of hours without any crashes.

The world has no other mods as the latest Mineclonia game version. I already played for months with the newest Minetest version and for weeks with the newest Mineclonia version (0.99.0) without this error or other crashes occurring. The error seems to be produced by the engine and not the game, this is why I am reporting this here.

On the SDD there is enough free space (170 GB), I did not change any permissions for the path. As virus protection, I use the internal MS Windows one, there was no report of any blocking.

2024-05-06 21:36:50: WARNING[Server]: Failed to write to file: C:\Users\Laudrin\Downloads\minetest-5.8.0-win64\bin\..\worlds\ANewBeginning\env_meta.txt
2024-05-06 21:36:50: ERROR[Server]: An unhandled exception occurred: "Couldn't save env meta"
2024-05-06 21:36:50: ERROR[Server]: In thread 10:
2024-05-06 21:36:50: ERROR[Server]: /home/stefan/mt-build/build/64/minetest/src/server.cpp:8c: virtual void* ServerThread::run(): A fatal error occurred: "Couldn't save env meta"

Maybe this is due to the hardcoded path /home/stefan/mt-build/build/64/minetest/ which does not correspond to my Minetest path at all.

Steps to reproduce

This was unexpected, as I did nothing unusual at that time.

@Laudrin Laudrin added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label May 6, 2024
@Laudrin Laudrin changed the title Could not write to due to env_meta.txt hardcoded path? Could not write to env_meta.txt due to hardcoded path? May 6, 2024
@wsor4035
Copy link
Contributor

wsor4035 commented May 6, 2024

seems like the usual corrupt env_meta.txt file, close/stop minetest, delete the file, and re start the world

@appgurueu
Copy link
Contributor

(Note that sfan5's build path has nothing to do with this; it's just used for the debug info, probably because sfan made the build.)

@appgurueu appgurueu changed the title Could not write to env_meta.txt due to hardcoded path? Could not write to env_meta.txt on Windows May 6, 2024
@Laudrin
Copy link
Author

Laudrin commented May 7, 2024

Thank you, @wsor4035 & @appgurueu!

As I understand from looking up the use of the file, env_meta.txt contains global variables. Wouldn't that possibly break something in the game if I delete the file and restart the world?

This is the content of the file in the world I encountered the game crash in:

day_count = 475
lbm_introduction_times = :mcl_itemframes:convert_old_itemframes~0;:mcl_signs:update_old_signs~0;mcl_anvils:update_formspec_0_60_0~0;mcl_brewing:update_coolsneak~0;mcl_chests:replace_old_ender_form~0;mcl_chests:update_shulker_box_formspecs_0_72_0~0;mcl_core:replace_legacy_dry_grass_0_65_0~0;mcl_dispensers:update_formspecs_0_60_0~0;mcl_droppers:update_formspecs_0_60_0~0;mcl_furnaces:update_coolsneak~0;mcl_heads:convert_old_angled_heads~0;mcl_heads:convert_old_ceiling_heads~0;mcl_hoppers:update_formspec_0_60_0~0;mcl_loom:update_coolsneak~0;mcl_mushrooms:replace_legacy_mushroom_caps~0;mcl_ocean:fix_incorrect_seagrass~0;mcl_ocean:kelp_init_83~0;mcl_smithing_table:update_coolsneak~0;mcl_trees:leaves_param2_update~0;
lbm_introduction_times_version = 1
last_clear_objects_time = 0
time_of_day = 10424
game_time = 404073
EnvArgsEnd

Today I got two more crashes with the same error message.

Is this maybe related to the second line in the file? Maybe the syntax is off? Should lbm_introduction_times = be followed by a value and then a semicolon between this variable and the next instead of a colon :mcl_itemframes:convert_old_itemframes~0. Is this something to report to the developers of the Mineclonia game instead of here or is it unrelated to MCLA?

@appgurueu
Copy link
Contributor

As I understand from looking up the use of the file, env_meta.txt contains global variables. Wouldn't that possibly break something in the game if I delete the file and restart the world?

Yes. I'd recommend backing up the world. As you can see in your example though, what it stores is quite limited (time, some LBM related info); often it's possible to delete it without issues. This depends on the game though. I don't know if this would cause any issues in Mineclonia.

I don't think the syntax is wrong. The ABMs probably are registered using names starting with a leading colon. (Probably someone assumed that the same conventions / requirements as for nodenames were enforced here, which is not quite the case.)

So indeed deleting it is a "last resort" and a dirty hack; "repairing" it would be a preferable solution, if possible.

Is this something to report to the developers of the Mineclonia game instead of here or is it unrelated to MCLA?

Most probably unrelated to Mineclonia.


I don't know what causes this, but as the error message suggests, it is most probably an issue with saving this file. I don't know what that would be caused by, but there are a plethora of possible reasons, many out of Minetest's control. Have you ensured that you're not running out of disk space, that the drive the world resides on is mounted, that Minetest has sufficient permissions, that there's no AV or similar interfering (note: I don't think AV programs will always tell you when they interfere), etc.? You could try using something like x64dbg to debug this (disclaimer: I'm not very familiar with debugging on Windows).

@sfan5
Copy link
Member

sfan5 commented May 15, 2024

It would be useful if you could go here, download the "mingw64" artifact and try to reproduce the same errors.
Then if it happens again, paste the text from debug.txt again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible Windows
Projects
None yet
Development

No branches or pull requests

4 participants