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

Latest commit(s) causes crash at server start #544

Closed
crabctrl opened this issue Apr 27, 2020 · 13 comments · Fixed by #548
Closed

Latest commit(s) causes crash at server start #544

crabctrl opened this issue Apr 27, 2020 · 13 comments · Fixed by #548

Comments

@crabctrl
Copy link

The latest commit (I think) breaks the pack. Relevant logs:

Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ACTION[Main]: Server: Shutting down
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]: ModError: Failed to load and run script from /var/lib/minetest/.minetest/games/comtest/mods/technic_chests/init.lua:
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]: Invalid crafting recipe (output="technic:iron_locked_chest 1")
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]: stack traceback:
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]:         [C]: in function 'register_craft'
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]:         ...inetest/games/comtest/mods/technic_chests/iron_chest.lua:26: in main chunk
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]:         [C]: in function 'dofile'
Apr 26 23:56:16 loh-toronto minetestserver[3892350]: 2020-04-26 23:56:16: ERROR[Main]:         ...est/.minetest/games/comtest/mods/technic_chests/init.lua:12: in main chunk
Apr 26 23:56:16 loh-toronto systemd[1]: minetest@comtest.service: Main process exited, code=exited, status=1/FAILURE
Apr 26 23:56:16 loh-toronto systemd[1]: minetest@comtest.service: Failed with result 'exit-code'.
@crabctrl crabctrl changed the title PR #530 causes crash at server start Latest commit(s) causes crash at server start Apr 27, 2020
@crabctrl
Copy link
Author

I have confirmed that it is only the latest commit, fb4fef7, that causes this issue, introduced by #530 ; checking out to the previous commit, everything appears to work.

@auouymous
Copy link
Contributor

Recipe has a table of tables of strings.

type = "shapeless",
recipe = {
    {'basic_materials:padlock'},
    {'technic:gold_chest'},
}

It should only have a table of strings.

type = "shapeless",
recipe = {'basic_materials:padlock', 'technic:gold_chest'}

BuckarooBanzay added a commit to mt-mods/technic that referenced this issue Apr 27, 2020
@d-stephane
Copy link
Contributor

d-stephane commented Apr 27, 2020

After apply this fix, server start ok but if i try to put a gold locked chest the server crash :

ServerError: AsyncErr: ServerThread::run Lua:
Runtime error from mod 'technic_chests' in callback item_OnPlace(): Runtime error from mod 'technic_chests'
in callback node_on_construct(): ...test_5.2/bin/../mods/technic/technic_chests/register.lua:89:
attempt to index upvalue 'fs_helpers' (a nil value)

stack traceback:
	...test_5.2/bin/../mods/technic/technic_chests/register.lua:89: in function 'set_formspec'
	...test_5.2/bin/../mods/technic/technic_chests/register.lua:293: in function <...test_5.2/bin/../mods/technic/technic_chests/register.lua:290>
	[C]: in function 'add_node'
	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>
stack traceback:
	[C]: in function 'add_node'
	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>

The problem is the same with all the technic chests

My server versin : 5.3
My system : Debian Buster

@BuckarooBanzay
Copy link
Member

After apply this fix, server start ok but if i try to put a gold locked chest the server crash :

ServerError: AsyncErr: ServerThread::run Lua:
Runtime error from mod 'technic_chests' in callback item_OnPlace(): Runtime error from mod 'technic_chests'
in callback node_on_construct(): ...test_5.2/bin/../mods/technic/technic_chests/register.lua:89:
attempt to index upvalue 'fs_helpers' (a nil value)

stack traceback:
...test_5.2/bin/../mods/technic/technic_chests/register.lua:89: in function 'set_formspec'
...test_5.2/bin/../mods/technic/technic_chests/register.lua:293: in function <...test_5.2/bin/../mods/technic/technic_chests/register.lua:290>
[C]: in function 'add_node'
...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>
stack traceback:
[C]: in function 'add_node'
...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>

The problem is the same with all the technic chests

My server versin : 5.3
My system : Debian Buster

@d-stephane Are you sure it is because of that commit, this looks unrelated: the responsible part was last touched 3 years ago:
https://github.com/minetest-mods/technic/blame/fb4fef783b605dcdc73554019ef46d8354614ad4/technic_chests/register.lua#L89

@d-stephane
Copy link
Contributor

No, I'm not 100% sure. I will test with version 5.2 of the server

@d-stephane
Copy link
Contributor

WIth minetest 5.2 and with just the mods basic_materials - pipeworks - technic
After put a gold chest the server crash :

2020-04-27 20:45:51: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'technic_chests' in callback item_OnPlace(): Runtime error from mod 'technic_chests' in callback node_on_construct(): ...test_5.2/bin/../mods/technic/technic_chests/register.lua:91: attem
2020-04-27 20:45:51: ERROR[Main]: pt to index upvalue 'fs_helpers' (a nil value)
2020-04-27 20:45:51: ERROR[Main]: stack traceback:
2020-04-27 20:45:51: ERROR[Main]: 	...test_5.2/bin/../mods/technic/technic_chests/register.lua:91: in function 'set_formspec'
2020-04-27 20:45:51: ERROR[Main]: 	...test_5.2/bin/../mods/technic/technic_chests/register.lua:316: in function <...test_5.2/bin/../mods/technic/technic_chests/register.lua:313>
2020-04-27 20:45:51: ERROR[Main]: 	[C]: in function 'add_node'
2020-04-27 20:45:51: ERROR[Main]: 	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>
2020-04-27 20:45:51: ERROR[Main]: stack traceback:
2020-04-27 20:45:51: ERROR[Main]: 	[C]: in function 'add_node'
2020-04-27 20:45:51: ERROR[Main]: 	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>

This version of technic works with which version of minetest for you?

@VanessaE
Copy link
Contributor

VanessaE commented Apr 28, 2020

@auouymous's remark about the recipe format is correct, The latest commit (as of this remark) broke it.; @d-stephane you're barking up the wrong tree.

@auouymous
Copy link
Contributor

@d-stephane Both of your logs show 5.2 as version, and the second log has incorrect line numbers (local changes or old version). If you didn't make changes, actually have the latest version and use git to download technic, try git checkout 4a9ad94 to remove the broken commit.

@d-stephane
Copy link
Contributor

After loading the commit 4a9ad94 :

2020-04-28 08:06:40: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'technic_chests' in callback item_OnPlace(): Runtime error from mod 'technic_chests' in callback node_on_construct(): ...test_5.2/bin/../mods/technic/technic_chests/register.lua:89: attem
2020-04-28 08:06:40: ERROR[Main]: pt to index upvalue 'fs_helpers' (a nil value)
2020-04-28 08:06:40: ERROR[Main]: stack traceback:
2020-04-28 08:06:40: ERROR[Main]: 	...test_5.2/bin/../mods/technic/technic_chests/register.lua:89: in function 'set_formspec'
2020-04-28 08:06:40: ERROR[Main]: 	...test_5.2/bin/../mods/technic/technic_chests/register.lua:293: in function <...test_5.2/bin/../mods/technic/technic_chests/register.lua:290>
2020-04-28 08:06:40: ERROR[Main]: 	[C]: in function 'add_node'
2020-04-28 08:06:40: ERROR[Main]: 	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>
2020-04-28 08:06:40: ERROR[Main]: stack traceback:
2020-04-28 08:06:40: ERROR[Main]: 	[C]: in function 'add_node'
2020-04-28 08:06:40: ERROR[Main]: 	...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:368: in function <...games/minetest/minetest_5.2/bin/../builtin/game/item.lua:258>

which version of minetest do you use?

@auouymous
Copy link
Contributor

Your problem has nothing to do with this issue. By changing to 4a9ad94, you removed the faulty code this issue is about and that @BuckarooBanzay's patch fixes.

You should open a new issue and post the entire log there. But read the entire log first, it might reveal a missing dependency, such as no mesecons.

@d-stephane
Copy link
Contributor

d-stephane commented Apr 28, 2020

I did not have the latest version of pipeworks. After updating there is no more problem.
Without mesecon mode it's ok too

@top4ek
Copy link

top4ek commented Apr 30, 2020

Got exacly same trace as @katp32. Server version 5.2.0. Rolling back to 4a9ad94 "fixes" server boot.

@dokutan
Copy link
Contributor

dokutan commented May 1, 2020

Since i could not find a pull request to fix this bug, i made one. I have confirmed that the fix works with 5.2.0 and 5.3.0 versions of minetest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants