Closed fluxionary closed 1 year ago
I got same error when trying to use //set
in a //multi
command (I'm running Minetest 5.4.1 for compatibility reasons so some parts of the error have different numbers)
2023-01-10 08:35:05: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'worldeditadditions_commands' in callback on_chat_message(): ...ons\worldeditadditions_core/core/entities/pos_marker.lua:58: attempt to index a nil value
2023-01-10 08:35:05: ERROR[Main]: stack traceback:
2023-01-10 08:35:05: ERROR[Main]: ...ons\worldeditadditions_core/core/entities/pos_marker.lua:58: in function 'delete'
2023-01-10 08:35:05: ERROR[Main]: ...tions\worldeditadditions_core/core/pos_marker_manage.lua:64: in function 'next_func'
2023-01-10 08:35:05: ERROR[Main]: ...Additions\worldeditadditions_core/utils/EventEmitter.lua:65: in function 'emit'
2023-01-10 08:35:05: ERROR[Main]: ...\WorldEditAdditions\worldeditadditions_core/core/pos.lua:37: in function 'compat_worldedit_pos1_get'
2023-01-10 08:35:05: ERROR[Main]: ...\WorldEditAdditions\worldeditadditions_core/core/pos.lua:137: in function 'count'
2023-01-10 08:35:05: ERROR[Main]: ...itAdditions\worldeditadditions_core/core/run_command.lua:25: in function 'run_command'
2023-01-10 08:35:05: ERROR[Main]: ...itions\worldeditadditions_core/core/register_command.lua:57: in function 'func'
2023-01-10 08:35:05: ERROR[Main]: ...nloads\Media\minetest-win64\bin\..\builtin\game\chat.lua:74: in function <...nloads\Media\minetest-win64\bin\..\builtin\game\chat.lua:48>
2023-01-10 08:35:05: ERROR[Main]: ...ds\Media\minetest-win64\bin\..\builtin\game\register.lua:422: in function <...ds\Media\minetest-win64\bin\..\builtin\game\register.lua:406>
This is not a consistent failure as a command that will crash one time will work most of the time.
The exact command I used when the crash occurred was //multi //outset h 1 //set ocean_stone //inset h 1 //set sea_lantern //shift z 4
Actually I think I may have used //many
too... here's the command history leading up to the crash
2023-01-10 08:31:04: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [node under=158,2,481 above=158,3,481]
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs /multi //outset h 1 //set ocean_stone //inset h 1 //set sea_lantern //shift z 4 (time 0 of 4)
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //outset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set ocean_stone
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //inset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set sea_lantern
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //shift z 4
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs /multi //outset h 1 //set ocean_stone //inset h 1 //set sea_lantern //shift z 4 (time 1 of 4)
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //outset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set ocean_stone
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //inset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set sea_lantern
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //shift z 4
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs /multi //outset h 1 //set ocean_stone //inset h 1 //set sea_lantern //shift z 4 (time 2 of 4)
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //outset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set ocean_stone
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //inset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set sea_lantern
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //shift z 4
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs /multi //outset h 1 //set ocean_stone //inset h 1 //set sea_lantern //shift z 4 (time 3 of 4)
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //outset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set ocean_stone
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //inset h 1
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //set sea_lantern
2023-01-10 08:31:05: ACTION[Server]: singleplayer runs //shift z 4
2023-01-10 08:34:41: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [node under=146,2,479 above=146,3,479]
2023-01-10 08:34:42: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [nothing]
2023-01-10 08:34:43: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [nothing]
2023-01-10 08:34:43: ACTION[Server]: [Creatura] [ABM Spawning] Spawned 2 animalia:frog at (151,2,433)
2023-01-10 08:34:45: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [nothing]
2023-01-10 08:34:49: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [node under=146,2,479 above=146,3,479]
2023-01-10 08:34:50: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [nothing]
2023-01-10 08:34:52: ACTION[Server]: singleplayer uses worldeditadditions:cloudwand, pointing at [nothing]
2023-01-10 08:35:05: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'worldeditadditions_commands' in callback on_chat_message(): ...ons\worldeditadditions_core/core/entities/pos_marker.lua:58: attempt to index a nil value
@fluxionary can you provide your action log from before the crash? It would help a lot to give context.
@VorTechnix unfortunately i don't have that anymore, i'll spend a few minutes to see if i can't re-create it.
@fluxionary thank you very much. This will help a lot in troubleshooting the bug.
I've now figured out how to make a repeatable crash as well:
//scloud 2
(then punch 2 nodes to create selection area)
//scloud 0
(makes WE selection area disappear and WEA selectors to appear)
//reset
(resets selection area)
Destroy the 2 WEA markers by punching them with a pickaxe
//scloud 2
(then punch 2 nodes to create selection area)
//scloud 0
-- Crash
2023-01-10 17:41:18: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'worldeditadditions_commands' in callback on_chat_message(): ...ons\worldeditadditions_core/core/entities/pos_marker.lua:58: attempt to index a nil value
2023-01-10 17:41:18: ERROR[Main]: stack traceback:
2023-01-10 17:41:18: ERROR[Main]: ...ons\worldeditadditions_core/core/entities/pos_marker.lua:58: in function 'delete'
2023-01-10 17:41:18: ERROR[Main]: ...tions\worldeditadditions_core/core/pos_marker_manage.lua:64: in function 'next_func'
2023-01-10 17:41:18: ERROR[Main]: ...Additions\worldeditadditions_core/utils/EventEmitter.lua:65: in function 'emit'
2023-01-10 17:41:18: ERROR[Main]: ...\WorldEditAdditions\worldeditadditions_core/core/pos.lua:37: in function 'compat_worldedit_pos1_get'
2023-01-10 17:41:18: ERROR[Main]: ...\WorldEditAdditions\worldeditadditions_core/core/pos.lua:137: in function 'count'
2023-01-10 17:41:18: ERROR[Main]: ...itAdditions\worldeditadditions_core/core/run_command.lua:25: in function 'run_command'
2023-01-10 17:41:18: ERROR[Main]: ...itions\worldeditadditions_core/core/register_command.lua:57: in function 'func'
2023-01-10 17:41:18: ERROR[Main]: ...nloads\Media\minetest-win64\bin\..\builtin\game\chat.lua:74: in function <...nloads\Media\minetest-win64\bin\..\builtin\game\chat.lua:48>
2023-01-10 17:41:18: ERROR[Main]: ...ds\Media\minetest-win64\bin\..\builtin\game\register.lua:422: in function <...ds\Media\minetest-win64\bin\..\builtin\game\register.lua:406>
Found a bug! I pushed a fix - does this fix it for you? If not, I'll take a deeper look.
Dealing with entities is quite fiddly, as it turns out.
Sorry this has taken so long to address, gonna update my notification system.
Really fixed it this time :P
If this is still an issue, comment and we'll reopen.
@sbrl it's alright to leave things open until you've give the person who opened the issue a chance to test it. i will test it now, probably you fixed it, but it's always good to get verification.
tested, and it seems to not crash when doing simple things :+1:
i think this was due to removing the worldedit additions entities (
//clearobjects
) and then trying to run another command.