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

Crash on startup #170

Closed
OgelGames opened this issue Dec 31, 2020 · 7 comments · Fixed by #171
Closed

Crash on startup #170

OgelGames opened this issue Dec 31, 2020 · 7 comments · Fixed by #171
Labels

Comments

@OgelGames
Copy link
Contributor

After ddf8b39, mod crashes on startup:

2020-12-31 05:43:36: ERROR[Main]: ModError: Failed to load and run script from /var/lib/minetest/.minetest/worlds/world/worldmods/moreblocks/init.lua:
2020-12-31 05:43:36: ERROR[Main]: .../worlds/world/worldmods/moreblocks/redefinitions.lua:23: attempt to index field '?' (a nil value)
2020-12-31 05:43:36: ERROR[Main]: stack traceback:
2020-12-31 05:43:36: ERROR[Main]: 	.../worlds/world/worldmods/moreblocks/redefinitions.lua:23: in function 'reconstruct_internal_craft'
2020-12-31 05:43:36: ERROR[Main]: 	.../worlds/world/worldmods/moreblocks/redefinitions.lua:30: in function 'change_recipe_amount'
2020-12-31 05:43:36: ERROR[Main]: 	.../worlds/world/worldmods/moreblocks/redefinitions.lua:51: in function 'increase_craft_production'
2020-12-31 05:43:36: ERROR[Main]: 	.../worlds/world/worldmods/moreblocks/redefinitions.lua:68: in function 'increase_craft_production_table'
2020-12-31 05:43:36: ERROR[Main]: 	.../worlds/world/worldmods/moreblocks/redefinitions.lua:76: in main chunk
2020-12-31 05:43:36: ERROR[Main]: 	[C]: in function 'dofile'
2020-12-31 05:43:36: ERROR[Main]: 	....minetest/worlds/world/worldmods/moreblocks/init.lua:23: in main chunk
@OgelGames
Copy link
Contributor Author

@Oblomov

@Oblomov
Copy link
Contributor

Oblomov commented Jan 5, 2021

Hm this issue seems to be related to the interaction with a different mod. Can you please identify which mod is causing the issue?

@OgelGames
Copy link
Contributor Author

I don't know, the above is from the CI for our mod collection, specifically this one: https://github.com/pandorabox-io/pandorabox-mods/pull/1286/checks?check_run_id=1629154050

@Oblomov
Copy link
Contributor

Oblomov commented Jan 5, 2021

Jeepers that's a lot of mods. However, I cannot reproduce with my setup, so I need someone to provide me with enough information do a repro, possibly without testing all of those mods. You probably want to look at mods that redefine/enhance signs or rails.

@OgelGames
Copy link
Contributor Author

I modified the code to print out what recipes it was changing, and tested it locally with all the mods, and I found that it was this recipe that was causing it to crash: https://github.com/minetest-mirrors/ehlphabet/blob/277f31d6053a9ff6b75a76edf93e8f9cc7a492be/init.lua#L285-L289

Interestingly, this is how the recipe was dumped:

{
        width = 0,
        type = "normal",
        items = {
                "ehlphabet:block"
        },
        output = "default:paper",
        method = "normal"
}

Maybe the width should be checked, because that was the only recipe changed that had width = 0 ?

@Oblomov
Copy link
Contributor

Oblomov commented Jan 5, 2021

Ah interesting. How is the width 0 though? Shouldn't it be 1?

EDIT: oh wait, width = 0 probably means that the recipe is shapeless. That definitely needs special handling.

@Oblomov
Copy link
Contributor

Oblomov commented Jan 5, 2021

OK this should be fixed in #171. Of course the weird thing in this case is that crafting and de-crafting these blocks will basically provide infinite paper. We should probably have a mechanism to prevent some recipes from being pumped up. I'll open a separate issue about this.

@Calinou Calinou added the Bug label Feb 26, 2021
mckaygerhard added a commit to minenux/minetest-mod-moreblocks that referenced this issue Feb 19, 2022
* They can be recognized from having width == 0, and don't need the items
  list to be massaged to be transformed into the recipe field for lua api
* backported minetest-mods#171
* fixes minetest-mods#170
* backported minetest-mods@1a03b04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants