Page 1 of 1
[CRASH] AsyncErr, invalid float error
Posted: Mon Nov 06, 2017 14:06
by houlala
Hello,
I don't know if i must report this bug, because i have no idea where it come from (minetest or maybe a mod ?), I just played and I was digging clay under water and minetest has crashed.
Version :
Minetest 0.5.0-dev-166ded4a (Linux)
Using Irrlicht 1.8.1
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_GETTEXT=1
USE_SOUND=1
USE_CURL=0
USE_FREETYPE=1
USE_LUAJIT=0
STATIC_SHAREDIR="/usr/local/share/minetest"
My os is Debian jessie.
Last actions in the logfile :
2017-11-06 13:45:05: ACTION[Server]: singleplayer digs default:clay at (175,-6,1345)
2017-11-06 13:45:05: WARNING[Main]: Irrlicht: Could not open file of texture: character.png
2017-11-06 13:45:05: ACTION[Server]: singleplayer digs default:clay at (176,-6,1345)
2017-11-06 13:45:06: ACTION[Server]: singleplayer digs default:clay at (176,-6,1346)
2017-11-06 13:45:07: ACTION[Server]: singleplayer digs default:clay at (175,-7,1346)
2017-11-06 13:45:07: ACTION[Server]: singleplayer digs default:clay at (174,-6,1346)
2017-11-06 13:45:09: ACTION[Server]: singleplayer digs default:clay at (176,-6,1347)
2017-11-06 13:45:10: ACTION[Server]: singleplayer digs default:clay at (175,-6,1347)
2017-11-06 13:45:10: WARNING[Main]: Irrlicht: Could not open file of texture: character.png
2017-11-06 13:45:10: ACTION[Server]: singleplayer digs default:clay at (176,-7,1346)
2017-11-06 13:45:11: ACTION[Server]: singleplayer digs default:clay at (176,-7,1345)
2017-11-06 13:45:11: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Invalid float vector dimension range 'x' (expected -2.14748e+06 < x < 2.14748e+06 got -nan).
2017-11-06 13:45:11: ACTION[Server]: singleplayer leaves game. List of players:
This is my third crash with different action before in the game, so I don't know how reproduce this crash.
I have another problem with minetest, my numpad doesn't work, and numerics keys don't work
correctly, 7 key (é, `) doesn't work, if I need to enter a map seed, I can't, I have not other choice what to edit map_meta file.
Re: [CRASH] AsyncErr, invalid float error
Posted: Mon Nov 06, 2017 17:17
by Krock
Are you using the most recent minetest_game version?
Which mods are you using in your world, aside those from minetest_game?
Key input issue. It's already known:
https://github.com/minetest/minetest/issues/6573
Re: [CRASH] AsyncErr, invalid float error
Posted: Tue Nov 07, 2017 15:37
by houlala
Yes, i'm using the last version.
And i'm using a plethora of mods.
load_mod_abriglass = true
load_mod_anvil = true
load_mod_bakedclay = true
load_mod_bees = true
load_mod_biome_lib = true
load_mod_blox = true
load_mod_bobblocks = true
load_mod_building_blocks = true
load_mod_campfire = true
load_mod_carbone_mobs = true
load_mod_castle_farming = true
load_mod_castle_gates = true
load_mod_castle_lighting = true
load_mod_castle_masonry = true
load_mod_castle_shields = true
load_mod_castle_storage = true
load_mod_castle_tapestries = true
load_mod_castle_weapons = true
load_mod_chicken = true
load_mod_coloredwood = true
load_mod_cottages = true
load_mod_craft_guide = true
load_mod_creatures = true
load_mod_dreambuilder_mp_extras = true
load_mod_drops = true
load_mod_farming = true
load_mod_flowerpot = true
load_mod_flowers_plus = true
load_mod_ghost = true
load_mod_gloopblocks = true
load_mod_glooptest = true
load_mod_homedecor = true
load_mod_homedecor_3d_extras = true
load_mod_homedecor_i18n = true
load_mod_hopper = true
load_mod_ilights = true
load_mod_intllib = true
load_mod_itemframes = true
load_mod_lavalamp = true
load_mod_lpanes = true
load_mod_mesecons = true
load_mod_mesecons_alias = true
load_mod_mesecons_blinkyplant = true
load_mod_mesecons_button = true
load_mod_mesecons_commandblock = true
load_mod_mesecons_delayer = true
load_mod_mesecons_detector = true
load_mod_mesecons_doors = true
load_mod_mesecons_extrawires = true
load_mod_mesecons_fpga = true
load_mod_mesecons_gates = true
load_mod_mesecons_hydroturbine = true
load_mod_mesecons_insulated = true
load_mod_mesecons_lamp = true
load_mod_mesecons_lightstone = true
load_mod_mesecons_luacontroller = true
load_mod_mesecons_materials = true
load_mod_mesecons_microcontroller = true
load_mod_mesecons_movestones = true
load_mod_mesecons_mvps = true
load_mod_mesecons_noteblock = true
load_mod_mesecons_pistons = true
load_mod_mesecons_powerplant = true
load_mod_mesecons_pressureplates = true
load_mod_mesecons_random = true
load_mod_mesecons_receiver = true
load_mod_mesecons_solarpanel = true
load_mod_mesecons_stickyblocks = true
load_mod_mesecons_switch = true
load_mod_mesecons_torch = true
load_mod_mesecons_walllever = true
load_mod_mesecons_wires = true
load_mod_mobs = true
load_mod_mobs_animal = true
load_mod_mobs_monster = true
load_mod_moreblocks = true
load_mod_moreores = true
load_mod_oerrki = true
load_mod_plantlife_i18n = true
load_mod_pmobs = true
load_mod_quartz = true
load_mod_ropes = true
load_mod_sheep = true
load_mod_signs_lib = true
load_mod_stained_glass = true
load_mod_unifiedbricks = true
load_mod_unifieddyes = true
load_mod_unifiedmesecons = true
load_mod_vines = true
load_mod_woodcutting = true
load_mod_xdecor = true
load_mod_zombie = true
Re: [CRASH] AsyncErr, invalid float error
Posted: Tue Nov 07, 2017 17:51
by Krock
Well, great. Any mod containing `mobs`, `sheep`, `zombie`, `creature`, `drops`, `chicken` and `oerkki` use entities, which appear more or less randomly in-game. Any of these could've caused this bug.
You'd have to recompile your server with some additional code in order to detect the source of this problem.
`CHECK_FLOAT_RANGE` macro needs another parameter to call `script_get_backtrace(L);` if the float wasn't in an acceptable range here:
https://github.com/minetest/minetest/bl ... r.cpp#L213
Optionally here too:
https://github.com/minetest/minetest/bl ... r.cpp#L175
Re: [CRASH] AsyncErr, invalid float error
Posted: Tue Nov 07, 2017 23:27
by houlala
Hum, I think I don't understood what you ask me to do.
At the moment, I have recompiled from the sources code after modifications of the c_converter.cpp like that :
Code: Select all
#define CHECK_FLOAT_RANGE(value, name, L) \
if (value < F1000_MIN || value > F1000_MAX) { \
script_get_backtrace(L); \
std::ostringstream error_text; \
error_text << "Invalid float vector dimension range '" name "' " << \
"(expected " << F1000_MIN << " < " name " < " << F1000_MAX << \
" got " << value << ")." << std::endl; \
throw LuaError(error_text.str()); \
}
Code: Select all
v2f check_v2f(lua_State *L, int index)
{
v2f p;
CHECK_POS_TAB(index);
lua_getfield(L, index, "x");
CHECK_POS_COORD("x");
p.X = lua_tonumber(L, -1);
CHECK_FLOAT_RANGE(p.X, "x", L)
lua_pop(L, 1);
lua_getfield(L, index, "y");
CHECK_POS_COORD("y");
p.Y = lua_tonumber(L, -1);
CHECK_FLOAT_RANGE(p.Y, "y", L)
lua_pop(L, 1);
return p;
}
and
Code: Select all
v3f check_v3f(lua_State *L, int index)
{
v3f pos;
CHECK_POS_TAB(index);
lua_getfield(L, index, "x");
CHECK_POS_COORD("x");
pos.X = lua_tonumber(L, -1);
CHECK_FLOAT_RANGE(pos.X, "x", L)
lua_pop(L, 1);
lua_getfield(L, index, "y");
CHECK_POS_COORD("y");
pos.Y = lua_tonumber(L, -1);
CHECK_FLOAT_RANGE(pos.Y, "y", L)
lua_pop(L, 1);
lua_getfield(L, index, "z");
CHECK_POS_COORD("z");
pos.Z = lua_tonumber(L, -1);
CHECK_FLOAT_RANGE(pos.Z, "z", L)
lua_pop(L, 1);
return pos;
}
But there are not more informations in the logfile after crashing.
I'm not a C developper not same a developper =D
Re: [CRASH] AsyncErr, invalid float error
Posted: Wed Nov 08, 2017 06:29
by duane
I get that error sometimes with nmobs when a mob is attempting to determine the range and direction from itself to me. One of the components of the vector goes undefined. It's so hard to duplicate that I haven't tried to fix it, but it happens most often when I /spawnentity in the air, as the creature is falling.
Re: [CRASH] AsyncErr, invalid float error
Posted: Wed Nov 08, 2017 17:20
by IhrFussel
Same fix as in the other thread: Apply position checks to the functions inside the mods to make sure the pos is valid..like
if pos.x <= -31000 or pos.x >= 31000 then
return
end
Re: [CRASH] AsyncErr, invalid float error
Posted: Wed Nov 08, 2017 17:42
by Fixer
IhrFussel wrote:Same fix as in the other thread: Apply position checks to the functions inside the mods to make sure the pos is valid..like
if pos.x <= -31000 or pos.x >= 31000 then
return
end
Why mod authors still not fixed it with this? It is more complicated?
Re: [CRASH] AsyncErr, invalid float error
Posted: Wed Nov 08, 2017 22:06
by IhrFussel
Fixerol wrote:IhrFussel wrote:Same fix as in the other thread: Apply position checks to the functions inside the mods to make sure the pos is valid..like
if pos.x <= -31000 or pos.x >= 31000 then
return
end
Why mod authors still not fixed it with this? It is more complicated?
Most mod creators don't even know about that bug.
But yes I agree, mods should have validation checks by default and not that the server owner has to implement those.
Re: [CRASH] AsyncErr, invalid float error
Posted: Thu Nov 09, 2017 02:17
by duane
IhrFussel wrote:Most mod creators don't even know about that bug.
But yes I agree, mods should have validation checks by default and not that the server owner has to implement those.
Of course, you could argue that a game lua function that's supposed to return a legitimate vector shouldn't return NaN as a component.
Oops. Turns out I had a division by zero error. ::hangs head in shame::
Re: [CRASH] AsyncErr, invalid float error
Posted: Sat Nov 11, 2017 17:25
by houlala
Ok, I tested by disabling the differents mods with entities, for me the problem comes from mobs or carbonmobs, so I think this crash is due to a conflict between these 2 mods because I disabled carbonmobs and since i didn't have another crash.
Now, i can't tell where the problem is, filename conflict, function conflict, variables conflict in lua files, i don't know really, my competence in lua script is for the moment much too much poor.
Solved for me.
Thanks all.
Re: [CRASH] AsyncErr, invalid float error
Posted: Sun Nov 26, 2017 22:51
by Fixer
Probably authors of those mobs should implement the checks for invalid float.