Andrey2470T / luxury_decor

This mod adds big amount of new furniture stuff of various sorts, decorations and exterior.
2 stars 1 forks source link

Server crash! #10

Open DrSky2007 opened 3 years ago

DrSky2007 commented 3 years ago

Server crashes, when placing a sofa on a sofa. For example in creative mode: If you have a sofa in your hand and right-click two times on the same location. -> Server crashes.

Andrey2470T commented 3 years ago

The current sofa API is just terrible mess. It has 1000+ lines, it needs urgent refactoring is what Im doing now. Ive already rewritten piano, sitting, vase and almost lights API. They should be much more flexible and readable for debugging errors like that.

superfloh247 commented 3 years ago

Hi, is this related?

2021-04-06 14:09:46: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'builtin' in callback item_OnPlace(): /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: attempt to index local 'is_attached' (a nil value) 2021-04-06 14:09:46: ERROR[Main]: stack traceback: 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: in function 'standup_player' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/living_room.lua:535: in function 'on_rightclick' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../builtin/game/item.lua:430: in function </opt/minetest/bin/../builtin/game/item.lua:423>

DrSky2007 commented 3 years ago

Hi, is this related?

2021-04-06 14:09:46: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'builtin' in callback item_OnPlace(): /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: attempt to index local 'is_attached' (a nil value) 2021-04-06 14:09:46: ERROR[Main]: stack traceback: 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: in function 'standup_player' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/living_room.lua:535: in function 'on_rightclick' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../builtin/game/item.lua:430: in function </opt/minetest/bin/../builtin/game/item.lua:423>

Yes, this seems familiar!

Andrey2470T commented 3 years ago

Hi, is this related?

2021-04-06 14:09:46: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'builtin' in callback item_OnPlace(): /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: attempt to index local 'is_attached' (a nil value) 2021-04-06 14:09:46: ERROR[Main]: stack traceback: 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: in function 'standup_player' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/living_room.lua:535: in function 'on_rightclick' 2021-04-06 14:09:46: ERROR[Main]: /opt/minetest/bin/../builtin/game/item.lua:430: in function </opt/minetest/bin/../builtin/game/item.lua:423>

Can you say in which cases does this error occur? When placing a sofa on a sofa either?

superfloh247 commented 3 years ago

I can't reproduce it anymore. I think it happened when (in creative mode) I placed a sofa, the right-click to sit on it, and then right click the sofa to stand up with a sofa in hand. I had to also deactivate mod 3d_armor_flyswim, maybe those two modules interfered and had side effects.

superfloh247 commented 3 years ago

happened again several times today. 2021-04-29 15:27:11: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'builtin' in callback item_OnPlace(): /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: attempt to index local 'is_attached' (a nil value) 2021-04-29 15:27:11: ERROR[Main]: stack traceback: 2021-04-29 15:27:11: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/api/sitting.lua:69: in function 'standup_player' 2021-04-29 15:27:11: ERROR[Main]: /opt/minetest/bin/../mods/luxury_decor/living_room.lua:535: in function 'on_rightclick' 2021-04-29 15:27:11: ERROR[Main]: /opt/minetest/bin/../builtin/game/item.lua:430: in function </opt/minetest/bin/../builtin/game/item.lua:423>

unfortunately it only happens to the kids and they are not really able (as is old enough) to precisely describe all conditions to reproduce it

superfloh247 commented 3 years ago

OK my daughter tries to explain: 1 creative mode 2 wielded luxury_decor:kitchen_wooden_chair 3 right click to place one luxury_decor:kitchen_wooden_chair 4 now three luxury_decor:kitchen_wooden_chair are in the room 5 left click to remove another luxury_decor:kitchen_wooden_chair 6 left click to remove a second luxury_decor:kitchen_wooden_chair 7 with still wielded luxury_decor:kitchen_wooden_chair right click on newly created at step 3 luxury_decor:kitchen_wooden_chair 8 crash

Andrey2470T commented 3 years ago

@DrSky2007 @superfloh247 try the 1.2.0 development version: https://github.com/Andrey2470T/luxury_decor/tree/1.2.0-dev-stuff_remake