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
An unhandled exception occurred: armor.lua:245: attempt to index a nil value #15
Comments
Sorry for the late response, I have never come across this error before and have been unable to reproduce it. If you can tell me something specific that will trigger this, I will look into it more. |
On 04.01.2015 21:25, stujones11 wrote:
Hi, I am running a dedicated Debian server, version 0.4.10. The server is sprint |
Ah, so no inventory or skin mod then? That could be a useful clue, I am not sure yet. |
On 04.01.2015 22:43, stujones11 wrote:
Thanks. I will try it out tomorrow. I once tried to use the |
No problem, another thing you might want to try is increasing the armor init time, as described in armor.conf.example. Not properly emerged players have often caused this kind of unpredictable wierdness in the past. |
I installed the latest version from master and I increased the init time but as soon as the first player joined the server I got this: 07:48:39: ACTION[ServerThread]: vanz leaves game. List of players: salvaje123~ |
This is really weird, I cannot understand why no one else is experiencing this error. This modpack is used on a number of very active servers and I have not had any significant problems reported in quite some time. I can only guess that there must be something unusual about your setup that is causing it. Is the "default" mod you listed the original one that shipped with minetest_game? It is possible that one from another sub-game might not be compatible in some way or other, grasping at straws... I have added some more error traps there that are unlikely to get it working for you but may provide me with some more clues if you are willing to give it another go. |
On 07.01.2015 22:27, stujones11 wrote:
It seems GunshipPenguin's PvE server was affected as well until he https://forum.minetest.net/viewtopic.php?f=10&t=10616 Unfortunately not everybody does report those issues. I also wonder what
Ok, I'll give it another try because I really like the mod and the game |
Sorry, I cannot help it if people don't report problems but I do agree that a server should never crash because of some lua exception. I also agree that modders should do their best to handle exceptions but do we really have to check every single result the api gives us? I generally do as it goes but then maybe I miss something. :) I am not quite sure exactly what you mean by custom armor but clothing was something I was working on a while back. There is in fact a branch (multiskin) featuring a "clothing" layer. I was working with another modder at the time who promised to create textures, it never happened... |
On Wed, 07. Jan 14:37 stujones11 notifications@github.com wrote:
|
Hi, I think the issue is gone. The server hasn't crashed for a week due to this bug. Maybe the upgrade to 0.4.11 was responsible too. I still get error messages like ERROR[ServerThread]: 3d_armor: Player inventory is nil [set_player_armor] but they are not fatal. During my testing I've found out that cornernote's inventory_plus mod is severely buggy and often crashes the server. Perhaps you might want to consider to add a note or something to your repository and recommend the fork of Zeg9 instead. |
Thank you for the update, those messages indicate that the player was not fully emerged at the time armor was initialized. As a result, players may experience some issues like armor inventory not loading, for example. The only solution (I can think of) right now is to increase the init delay time and/or the number of initialization attempts. It does not really matter how many times you do this, even if it succeeded on the first try. Re: inventory_plus, I think I already do recommend Zeg9‘s version in the forum topic but I will be sure to add a note in the readme too. |
On Fri, 23. Jan 11:37 stujones11 notifications@github.com wrote:
I have found out that zeg9's version of inventory_plus is also buggy and Zeg9/minetest-inventory_plus#2 So unfortunately both are not recommendable at the moment. I installed Being not fully emerged seems to be a regular problem but even when I Cheers |
I agree, inventory_plus is a bit outdated now and I am pretty sure more folks use unifiied_inventory nowadays, although I can't say I've had a problem with either mod but then I don't run a public server. Re: emerging players, I have requested a few times for some kind of callback or property that would allow modders to know when it is 'safe' to call certain player object methods, without getting nil index exceptions. |
* Added armor:remove_all function * Corrected README.txt * Corrected italian translation * Simplified Italian translation further * CRUSHFIX: Replaced self.function with self:function Co-authored-by: Giov4 <brancacciogiovanni1@gmail.com>
Hi,
I have installed the latest version of your mod on my server, 0.4.10, together with shields and wieldview. Unfortunately the whole server crashed at some point with the following error message
ERROR[ServerThread]: Failed to read player inventory
13:51:22: ERROR[main]: ERROR: An unhandled exception occurred: /usr/share/games/minetest/mods/3d_armor/armor.lua:245: attempt to index a nil value
13:51:22: ERROR[main]: stack traceback:
13:51:22: ERROR[main]: >/usr/share/games/minetest/mods/3d_armor/armor.lua:245: in function 'get_armor_formspec'
13:51:22: ERROR[main]: >/usr/share/games/minetest/mods/3d_armor/armor.lua:257: in function 'update_inventory'
13:51:22: ERROR[main]: >/usr/share/games/minetest/mods/3d_armor/armor.lua:402: in function 'func'
13:51:22: ERROR[main]: >/usr/share/games/minetest/builtin/game/misc.lua:17: in function </usr/share/games/minetest/builtin/game/misc.lua:9>
13:51:22: ERROR[main]: >/usr/share/games/minetest/builtin/game/register.lua:348: in function </usr/share/games/minetest/builtin/game/register.lua:336>
The text was updated successfully, but these errors were encountered: