BuckarooBanzay / epic

epic -- Enhanced Programmer for Ingame Control
Other
6 stars 2 forks source link

send mapblock crashes server #25

Closed MisterE123 closed 4 years ago

MisterE123 commented 4 years ago

When you place a send mapblock block and then rightclick it to set it up, the server crashes.

BuckarooBanzay commented 4 years ago

Interesting, do you have a stacktrace or some kind of error message, i couldn't find an issue in the on_construct: https://github.com/damocles-minetest/epic/blob/9e23accb9732c45211766a9bb90fa7be5474694d/blocks/send_mapblock.lua#L28-L32

Nor in the update_formspec code: https://github.com/damocles-minetest/epic/blob/9e23accb9732c45211766a9bb90fa7be5474694d/blocks/send_mapblock.lua#L2-L12 (ignore the indendation issues, my editor messed that up)

MisterE123 commented 4 years ago

ok, from singleplayer:

2020-10-13 08:06:34: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
2020-10-13 08:08:03: ACTION[Server]: singleplayer places node epic:send_mapblock at (-15,3,16)
2020-10-13 08:08:05: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_receive_fields(): ...5.3.0-win64\bin\..\mods\epic/util/punchnode_callback.lua:17: attempt to call method 'get_player_name' (a nil value)
2020-10-13 08:08:05: ERROR[Main]: stack traceback:
2020-10-13 08:08:05: ERROR[Main]:   ...5.3.0-win64\bin\..\mods\epic/util/punchnode_callback.lua:17: in function 'punchnode_callback'
2020-10-13 08:08:05: ERROR[Main]:   ...st-5.3.0-win64\bin\..\mods\epic/blocks/send_mapblock.lua:45: in function <...st-5.3.0-win64\bin\..\mods\epic/blocks/send_mapblock.lua:34>
2020-10-13 08:08:05: ACTION[Server]: singleplayer leaves game. List of players: 
2020-10-13 08:08:05: ACTION[Main]: Server: Shutting down

and on a self-hosted server with player name "MisterE":

2020-10-13 08:11:22: ACTION[Server]: MisterE [127.0.0.1] joins game. List of players: MisterE
2020-10-13 08:11:39: ACTION[Server]: MisterE places node epic:send_mapblock at (-12,3,12)
2020-10-13 08:11:43: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_receive_fields(): ...5.3.0-win64\bin\..\mods\epic/util/punchnode_callback.lua:17: attempt to call method 'get_player_name' (a nil value)
2020-10-13 08:11:43: ERROR[Main]: stack traceback:
2020-10-13 08:11:43: ERROR[Main]:   ...5.3.0-win64\bin\..\mods\epic/util/punchnode_callback.lua:17: in function 'punchnode_callback'
2020-10-13 08:11:43: ERROR[Main]:   ...st-5.3.0-win64\bin\..\mods\epic/blocks/send_mapblock.lua:45: in function <...st-5.3.0-win64\bin\..\mods\epic/blocks/send_mapblock.lua:34>
2020-10-13 08:11:43: ACTION[Server]: MisterE leaves game. List of players: 
2020-10-13 08:11:43: ACTION[Main]: Server: Shutting down

Each time, it happens exactly when I place the node, right-click it, and then click "set position" in the formspec

MisterE123 commented 4 years ago

you should be able to reproduce by downloading from github, placing a mapblock send node, and then trying to set its position.

BuckarooBanzay commented 4 years ago

Found the issue, it was a missing parameter :yum:

you should be able to reproduce by downloading from github, placing a mapblock send node, and then trying to set its position.

I can't really play right now but i can edit code ;)