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

Regression caused by b46c589 #684

Open
appgurueu opened this issue Oct 16, 2024 · 3 comments · May be fixed by #685
Open

Regression caused by b46c589 #684

appgurueu opened this issue Oct 16, 2024 · 3 comments · May be fixed by #685
Labels

Comments

@appgurueu
Copy link

See https://forum.minetest.net/viewtopic.php?p=439964#p439964:

After downloading the latest update to this mod on 10/16/24, the mod is crashing the game with the following error:

ModError: Runtime error from mod 'mesecons_doors' in callback on_mods_loaded(): ...64\minetest\bin\..\mods\mesecons\mesecons_doors\init.lua:135: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
...64\minetest\bin\..\mods\mesecons\mesecons_doors\init.lua:135: in function <...64\minetest\bin\..\mods\mesecons\mesecons_doors\init.lua:134>
...t 5.4.1 -win64\minetest\bin\..\builtin\game\register.lua:431: in function <...t 5.4.1 -win64\minetest\bin\..\builtin\game\register.lua:417>

The line in question:

for k,_ in pairs(doors.registered_doors) do

Just a simple or {} should fix it. Same should be done right below. Though I do wonder what would cause doors.registered_doors to be nil despite mesecons_doors depending on doors. Maybe there is an API-incompatible mod called doors out there?

@appgurueu appgurueu changed the title Regression caused by b46c589a38c98b4fe84716922dbabb21841bca67 Regression caused by b46c589 Oct 16, 2024
@Niklp09
Copy link
Member

Niklp09 commented Oct 17, 2024

https://content.minetest.net/modnames/doors/
Tested TenPlus1's doors_redo. Their mod works fine and provides the required table.

@Niklp09 Niklp09 added the bug label Oct 17, 2024
@Niklp09 Niklp09 linked a pull request Oct 17, 2024 that will close this issue
@sfan5
Copy link
Member

sfan5 commented Oct 17, 2024

Before simply adding a nil check we should find out the cause.

@Niklp09
Copy link
Member

Niklp09 commented Oct 17, 2024

Before simply adding a nil check we should find out the cause.

That's why I asked the initial reporter in the forums for more information.

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