digtron icon indicating copy to clipboard operation
digtron copied to clipboard

Builders caused an error, dont know how

Open GreenXenith opened this issue 6 years ago • 12 comments
trafficstars

This occurred on the server this morning. User isn't currently online to ask what builders are on their digtron (but it doesn't appear to be caused by normal building?).

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digtron' in callback on_playerReceiveFields(): /home/minetest/.minetest/mods/digtron/util.lua:315: attempt to index local 'inv' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: 	/home/minetest/.minetest/mods/digtron/util.lua:315: in function 'update_builder_item'
ERROR[Main]: 	...etest/.minetest/mods/digtron/nodes/node_builders.lua:131: in function '?'
ERROR[Main]: 	...e/minetest/minetest/bin/../builtin/game/register.lua:420: in function <...e/minetest/minetest/bin/../builtin/game/register.lua:400>

GreenXenith avatar Jan 16 '19 04:01 GreenXenith

Looks like a symptom of what may be an engine bug being discussed at #8067. It appears that trying to read inventory from an unloaded node may fail silently, which would produce these sorts of crashes.

I have an idea for a workaround, but it's very inefficient. I'll see if I can come up with a better one, but if I haven't by weekend I'll just bite the bullet and try whatever might work.

FaceDeer avatar Jan 16 '19 05:01 FaceDeer

Same here: https://github.com/pandorabox-io/pandorabox.io/issues/113 (no pressure though:)

thomasrudin avatar Jan 22 '19 17:01 thomasrudin

ok, got is also, just since new update this mod... arghh

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digtron' in callback on_playerReceiveFields(): /home/thomas/.minetest/mods/digtron/util.lua:315: attempt to index local 'inv' (a nil value)
2019-03-15 05:52:16: ERROR[Main]: stack traceback:
2019-03-15 05:52:16: ERROR[Main]: 	/home/thomas/.minetest/mods/digtron/util.lua:315: in function 'update_builder_item'
2019-03-15 05:52:16: ERROR[Main]: 	...homas/.minetest/mods/digtron/nodes/node_builders.lua:131: in function 'func'
2019-03-15 05:52:16: ERROR[Main]: 	.../share/minetest/builtin/profiler/instrumentation.lua:106: in function '?'
2019-03-15 05:52:16: ERROR[Main]: 	/usr/local/share/minetest/builtin/game/register.lua:419: in function </usr/local/share/minetest/builtin/game/register.lua:399>

so can we just declare the nil var inv ?

ghost avatar Mar 15 '19 01:03 ghost

Do i get you right, you just want to declare the variable, like so:?

local inv

See: https://github.com/minetest-mods/digtron/blob/master/util.lua#L314

thomasrudin avatar Mar 17 '19 17:03 thomasrudin

no, I I thnk it need most to be declared about single (= nil) or group (= {}) and I posted my guesses ([url=https://forum.minetest.net/viewtopic.php?f=10&t=22041&start=25#p346141]Thailand Server(url))

`tried to fix as most other "attempt to index local '***' (a nil value)" with add before

  • local inv = nil -- failed in running
  • local inv = {} -- works for start opps, might be better like this after reading ...
  • local inv = meta:get_inventory() failed to start
  • local inv = player:get_inventory() failed to start as I see from different sources.`

so using some up in the code, before it is used for fail, add local inv = {} is working until now ..., but not sure if digtron not used yet ...

ghost avatar Mar 17 '19 21:03 ghost

after got original digtron files a view days ago ... happen again attempt to index local 'inv' (a nil value) 2019-04-01 04:35:07: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digtron' in callback on_playerReceiveFields(): /home/thomas/.minetest/mods/digtron/util.lua:315: attempt to index local 'inv' (a nil value) 2019-04-01 04:35:07: ERROR[Main]: stack traceback: 2019-04-01 04:35:07: ERROR[Main]: /home/thomas/.minetest/mods/digtron/util.lua:315: in function 'update_builder_item' 2019-04-01 04:35:07: ERROR[Main]: /home/thomas/.minetest/mods/digtron/nodes/node_builders.lua:131: in function 'func' 2019-04-01 04:35:07: ERROR[Main]: ...ocal/share/minetest/builtin/profiler/instrumentation.lua:106: in function <...ocal/share/minetest/builtin/profiler/instrumentation.lua:100> 2019-04-01 04:35:07: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:419: in function </usr/local/share/minetest/builtin/game/register.lua:399>

I didn't use the upper solution now again local inv = {}

edit, it also crashes, as there must be some data, ... so is it a new issue, not in an older version ?

ghost avatar Mar 31 '19 22:03 ghost

edit, it also crashes, as there must be some data

:D That’s easy to lose data with such “fixes.”

so is it a new issue, not in an older version ?

See #5 #16 #17 #22 #30 minetest/minetest#8067

Ideally compile MT with minetest/minetest#8296, reproduce and dump log. Either it will report what exactly goes wrong, or there is something mysterious.

numberZero avatar Apr 11 '19 21:04 numberZero

lol, after GreenXenith commented on Jan 16 2019 !!! Minetest-One commented 28 days ago, and even tried to get a bit closer with maybe see if it is just complain about not set var reporting that is not the issues, and telling that I used the last commit version after got original digtron files a view days ago() and also asking the users what they remember they did ? (most it happen when build up again, )

the last post is nice, but I will not build with dump option when so less others have this problem, it might be a very spacial option, as one of my player build it not on floor, he build it up at the wall (mean put crater like at wall to unpack it)

and newest the digtron disapear, but is back when relog ... mhh,

I reported, I used last upgrade and maybe I got better back to old not issues version keeps somewhere as restart server happen, lost digtron is not lost, and gamer learn also what not to do when they get a crash

let me say it clear: I have much bigger other issues then this !

ghost avatar Apr 12 '19 00:04 ghost

Er... sorry but the issue is much older than GreenXenith’s comment, more like 2017 (#5). And it annoys me personally but I couldn’t reproduce it, so had no chance to actually debug it. Moreover, that’s probably not a digtron bug but core bug so fixing it is important; related bugs are reported from time to time over and over again.

If you can’t help, that’s sad but not even a reason to comment. Would you read everything, you could find the patch even before commenting, and certainly would find out this issue is much deeper than your naive suggestion.

numberZero avatar Apr 12 '19 19:04 numberZero

I would like to note that Digtrons are getting worse and worse on my server; There are somewhat regular crashes due to this, and now metadata has started shifting without crashing. Digtron meta will get shifted forwards, or parts will get misaligned. Its becoming really annoying to deal with.

GreenXenith avatar Apr 12 '19 19:04 GreenXenith

I got a few of those again, but this time with the warning from https://github.com/minetest/minetest/pull/8296 preceeding the actual error:

minetest_1           | 2019-05-20 06:20:12: ERROR[Server]: Can't get node inventory at (-3406,34,-351): meta doesn't exist
minetest_1           | 2019-05-20 06:20:18: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digtron' in callback on_playerReceiveFields(): /data/world//worldmods/digtron/util.lua:315: attempt to index local 'inv' (a nil value)
minetest_1           | 2019-05-20 06:20:18: ERROR[Main]: stack traceback:
minetest_1           | 2019-05-20 06:20:18: ERROR[Main]: 	/data/world//worldmods/digtron/util.lua:315: in function 'update_builder_item'
minetest_1           | 2019-05-20 06:20:18: ERROR[Main]: 	/data/world//worldmods/digtron/nodes/node_builders.lua:131: in function </data/world//worldmods/digtron/nodes/node_builders.lua:70>
minetest_1           | 2019-05-20 06:20:18: ERROR[Main]: 	/usr/local/bin/../builtin/game/register.lua:419: in function </usr/local/bin/../builtin/game/register.lua:399>

EDIT: @FaceDeer don't let this discourage you in any way. your mod is awesome :D

thomasrudin avatar May 20 '19 08:05 thomasrudin

Using the current git HEAD commit , aa927fe26a2ecb8f07d067642cbaeab1070238c8

I believe I pressed escape while it was building. Here is the tail of the output

WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
ACTION[Server]: singleplayer uses Digtron to build pipeworks:tube_1 at (47, -677, 499), displacing air
ACTION[Server]: singleplayer uses Digtron to build default:ladder_wood at (48, -676, 500), displacing air
ACTION[Server]: singleplayer uses Digtron to build pipeworks:tube_1 at (47, -678, 501), displacing air
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory list "main" @ "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
WARNING[Main]: GUIFormSpecMenu::drawList(): The inventory location "nodemeta:48,-677,499" doesn't exist
ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digtron' in callback on_playerReceiveFields(): ~/.minetest/mods/digtron/util.lua:315: attempt to index local 'inv' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]:       ~/.minetest/mods/digtron/util.lua:315: in function 'update_builder_item'
ERROR[Main]:       ~/.minetest/mods/digtron/nodes/node_builders.lua:131: in function <~/.minetest/mods/digtron/nodes/node_builders.lua:70>
ERROR[Main]:       /usr/local/share/minetest/builtin/game/register.lua:419: in function </usr/local/share/minetest/builtin/game/register.lua:399>

Golutazem avatar Jun 21 '19 08:06 Golutazem