Archtec-io / bugtracker

0 stars 0 forks source link

Runtime error from mod '??' in callback on_joinplayer(): ...minetest/minetest-5.7.0/bin/../mods/customskins/init.lua:63: attempt to index local 'skin' (a nil value) #131

Closed Niklp09 closed 1 year ago

Niklp09 commented 1 year ago

Introduced in https://github.com/minetest-mods/3d_armor/commit/3660e503122b75c77edc0f048320a11e8dccc174

2023-10-30 17:08:52: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback on_joinplayer(): ...minetest/minetest-5.7.0/bin/../mods/customskins/init.lua:63: attempt to index local 'skin' (a nil value)
2023-10-30 17:08:52: ERROR[Main]: stack traceback:
2023-10-30 17:08:52: ERROR[Main]:   ...minetest/minetest-5.7.0/bin/../mods/customskins/init.lua:63: in function 'get_player_skin'
2023-10-30 17:08:52: ERROR[Main]:   ...st/minetest-5.7.0/bin/../mods/3d_armor/3d_armor/init.lua:268: in function 'init_player_armor'
2023-10-30 17:08:52: ERROR[Main]:   ...st/minetest-5.7.0/bin/../mods/3d_armor/3d_armor/init.lua:326: in function 'func'
2023-10-30 17:08:52: ERROR[Main]:   ...netest-5.7.0/bin/../builtin/profiler/instrumentation.lua:108: in function 'fn'
2023-10-30 17:08:52: ERROR[Main]:   ...ods/archtec/archtec_monitoring/builtin/on_joinplayer.lua:12: in function <...ods/archtec/archtec_monitoring/builtin/on_joinplayer.lua:10>
2023-10-30 17:08:52: ERROR[Main]:   ...minetest/minetest-5.7.0/bin/../builtin/game/register.lua:446: in function <...minetest/minetest-5.7.0/bin/../builtin/game/register.lua:432>

cc @BuckarooBanzay (I haven't investigated this further, not sure if it's a bug in my mod)

Niklp09 commented 1 year ago

Fixed in https://github.com/Archtec-io/customskins/commit/5bc0ee01f7cd16c882dfbacd332201271d9c2696

BuckarooBanzay commented 1 year ago

was this an issue after my "init-cleanup" commit in the 3d-armor repo?

Niklp09 commented 1 year ago

was this an issue after my "init-cleanup" commit in the 3d-armor repo?

yes, 3d_armor requests Skin data now a bit earlier, while my mods on_joinplayer wasn‘t executed yet. Fixed w/ a simple nil check.