testserver minetest-tnt/init.lua:257: attempt to index local 'def' (a nil value) #5526

Closed
opened 2023-11-19 18:59:34 +00:00 by AliasAlreadyTaken · 8 comments

2023-11-19 18:41:25: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'wielded_light' in callback luaentity_Step(): ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:257: attempt to index local 'def' (a nil value)
2023-11-19 18:41:25: ERROR[Main]: stack traceback:
2023-11-19 18:41:25: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:257: in function 'add_effects'
2023-11-19 18:41:25: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:462: in function 'boom'
2023-11-19 18:41:25: ERROR[Main]: ....7.0/Minetest_test/bin/../mods/yl_nether_mobs/wither.lua:161: in function 'hit_node'
2023-11-19 18:41:25: ERROR[Main]: /home/mt/5.7.0/Minetest_test/bin/../mods/mobs_redo/api.lua:4230: in function 'func'
2023-11-19 18:41:25: ERROR[Main]: ...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101>

2023-11-19 18:41:25: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'wielded_light' in callback luaentity_Step(): ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:257: attempt to index local 'def' (a nil value) 2023-11-19 18:41:25: ERROR[Main]: stack traceback: 2023-11-19 18:41:25: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:257: in function 'add_effects' 2023-11-19 18:41:25: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:462: in function 'boom' 2023-11-19 18:41:25: ERROR[Main]: ....7.0/Minetest_test/bin/../mods/yl_nether_mobs/wither.lua:161: in function 'hit_node' 2023-11-19 18:41:25: ERROR[Main]: /home/mt/5.7.0/Minetest_test/bin/../mods/mobs_redo/api.lua:4230: in function 'func' 2023-11-19 18:41:25: ERROR[Main]: ...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101>
AliasAlreadyTaken added the
1. kind/bug
label 2023-11-19 18:59:40 +00:00
Author
Owner

Repro:

  1. Wield light, like a torch
  2. Let Withers shoot you
  3. Dodge, so their shots explode
  4. Turn off the light, switch to something else
    => boom
Repro: 1. Wield light, like a torch 2. Let Withers shoot you 3. Dodge, so their shots explode 4. Turn off the light, switch to something else => boom
flux added this to the flux's TODO list project 2023-11-19 21:40:47 +00:00
Member

apparently this is caused by trying to set the tnt explosion texture to the texture of the dropped node, but the dropped thing isn't a node. perhaps an anvil w/ a tool on it?

should be fixed here: f4487dd093

apparently this is caused by trying to set the tnt explosion texture to the texture of the dropped node, but the dropped thing isn't a node. perhaps an anvil w/ a tool on it? should be fixed here: https://github.com/fluxionary/minetest-tnt/commit/f4487dd0934ed75eff5e6c3c4ff98cb5e0cd1009
flux added the
4. step/ready to QA test
label 2023-11-19 23:35:38 +00:00
Author
Owner

If we're not sure, feel free to add logging to it so we can see what's actually happening. I'm fairly certain there was no anvil around.

If we're not sure, feel free to add logging to it so we can see what's actually happening. I'm fairly certain there was no anvil around.
AliasAlreadyTaken added this to the 1.1.122 milestone 2023-11-20 00:09:54 +00:00
Member

If we're not sure, feel free to add logging to it so we can see what's actually happening. I'm fairly certain there was no anvil around.

it could have been something other than an anvil, anything that drops an item when it blows up. an ore node seems likely if there was no anvil nearby, there's ore in the nether.

> If we're not sure, feel free to add logging to it so we can see what's actually happening. I'm fairly certain there was no anvil around. it could have been something other than an anvil, anything that drops an item when it blows up. an ore node seems likely if there was no anvil nearby, there's ore in the nether.
Author
Owner

Repro:

=> Bring a damaged balrog whip and an anvil

  1. go to nether
  2. get shot at by withers and blazes
  3. Place an the anvil and the balrog whip on top
    => Boom

The commit above is on the testserver where the crash happened. It crashes as soon as a wither shot hits the anvil, the anvil and the damaged weapon survives the crash.

2023-11-30 13:02:21: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'fire' in callback luaentity_Step(): /home/mt/5.7.0/Minetest_test/bin/../mods/anvil/anvil.lua:275: attempt to call global 'remove_item' (a nil value)
2023-11-30 13:02:21: ERROR[Main]: stack traceback:
2023-11-30 13:02:21: ERROR[Main]: 	/home/mt/5.7.0/Minetest_test/bin/../mods/anvil/anvil.lua:275: in function 'on_blast'
2023-11-30 13:02:21: ERROR[Main]: 	...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:416: in function 'tnt_explode'
2023-11-30 13:02:21: ERROR[Main]: 	...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:455: in function 'boom'
2023-11-30 13:02:21: ERROR[Main]: 	....7.0/Minetest_test/bin/../mods/yl_nether_mobs/wither.lua:161: in function 'hit_node'
2023-11-30 13:02:21: ERROR[Main]: 	/home/mt/5.7.0/Minetest_test/bin/../mods/mobs_redo/api.lua:4299: in function 'func'
2023-11-30 13:02:21: ERROR[Main]: 	...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101>
Repro: => Bring a damaged balrog whip and an anvil 1. go to nether 2. get shot at by withers and blazes 3. Place an the anvil and the balrog whip on top => Boom The commit above is on the testserver where the crash happened. It crashes as soon as a wither shot hits the anvil, the anvil and the damaged weapon survives the crash. ``` 2023-11-30 13:02:21: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'fire' in callback luaentity_Step(): /home/mt/5.7.0/Minetest_test/bin/../mods/anvil/anvil.lua:275: attempt to call global 'remove_item' (a nil value) 2023-11-30 13:02:21: ERROR[Main]: stack traceback: 2023-11-30 13:02:21: ERROR[Main]: /home/mt/5.7.0/Minetest_test/bin/../mods/anvil/anvil.lua:275: in function 'on_blast' 2023-11-30 13:02:21: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:416: in function 'tnt_explode' 2023-11-30 13:02:21: ERROR[Main]: ...mt/5.7.0/Minetest_test/bin/../mods/minetest-tnt/init.lua:455: in function 'boom' 2023-11-30 13:02:21: ERROR[Main]: ....7.0/Minetest_test/bin/../mods/yl_nether_mobs/wither.lua:161: in function 'hit_node' 2023-11-30 13:02:21: ERROR[Main]: /home/mt/5.7.0/Minetest_test/bin/../mods/mobs_redo/api.lua:4299: in function 'func' 2023-11-30 13:02:21: ERROR[Main]: ...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101> ```
AliasAlreadyTaken added the
ugh/QA NOK
label 2023-11-30 13:05:54 +00:00
Member

Repro:

this is a separate bug w/ the anvil code. i apparently copied some code from "upstream" which wasn't compatible w/ our fork. i don't remember why i forked it, perhaps we should revisit that. should be fixed with this 7f43f0e8dd

either way, i should add a pre-commit check to our fork to ensure that we don't try to call undeclared globals, this was totally avoidable w/ automation.

> Repro: this is a separate bug w/ the anvil code. i apparently copied some code from "upstream" which wasn't compatible w/ our fork. i don't remember why i forked it, perhaps we should revisit that. should be fixed with this https://gitea.your-land.de/your-land/anvil/commit/7f43f0e8dd992462917057fd73f5ccd6fa9ef8b1 either way, i should add a pre-commit check to our fork to ensure that we don't try to call undeclared globals, this was totally avoidable w/ automation.
Author
Owner

QA

No more boom

QA No more boom
AliasAlreadyTaken added
ugh/QA OK
and removed
ugh/QA NOK
labels 2023-12-04 18:11:42 +00:00
Member

assuming this is live because no boom

assuming this is live because no boom
flux closed this issue 2023-12-18 22:10:15 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2023-12-18 22:10:30 +00:00
flux removed this from the flux's TODO list project 2023-12-18 22:10:33 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#5526
No description provided.