testserver chat_formspec misc_helpers.lua:178: attempt to get length of local 'str' (a nil value) #6300

Open
opened 2024-02-16 08:47:39 +00:00 by AliasAlreadyTaken · 1 comment

I tried sending a - probably empty? - formspec to Boris

2024-02-16 08:44:47: ACTION[Server]: [yl_commons] formspec "chat_formspec:sender_fs": Administrator submitted {"easy_syntax":"The public farm is meant for all players. Therefore it is needed that everyone replants what he takes. Please do so too! Otherwise we will unfortunately have to resort to other means.#I will do#I won't do#How to replant?","select":"replant_farm","send":"Send","target":"Boris"}
2024-02-16 08:44:47: ACTION[Main]: Server: Shutting down
2024-02-16 08:44:47: ACTION[Server]: Administrator leaves game. List of players: 
2024-02-16 08:44:49: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'chat_formspec' in callback on_playerReceiveFields(): ...8.0/Minetest_test/bin/../builtin/common/misc_helpers.lua:178: attempt to get length of local 'str' (a nil value)
2024-02-16 08:44:49: ERROR[Main]: stack traceback:
2024-02-16 08:44:49: ERROR[Main]: 	...8.0/Minetest_test/bin/../builtin/common/misc_helpers.lua:178: in function 'split'
2024-02-16 08:44:49: ERROR[Main]: 	...lds/Minetest_test/worldmods/chat_formspec-redo/specs.lua:4: in function 'easy_syntax_to_formspec'
2024-02-16 08:44:49: ERROR[Main]: 	...lds/Minetest_test/worldmods/chat_formspec-redo/specs.lua:65: in function 'create_target_fs'
2024-02-16 08:44:49: ERROR[Main]: 	...etest_test/worldmods/chat_formspec-redo/show_receive.lua:65: in function 'func'
2024-02-16 08:44:49: ERROR[Main]: 	...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101>
2024-02-16 08:44:49: ERROR[Main]: 	...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12>
I tried sending a - probably empty? - formspec to Boris ``` 2024-02-16 08:44:47: ACTION[Server]: [yl_commons] formspec "chat_formspec:sender_fs": Administrator submitted {"easy_syntax":"The public farm is meant for all players. Therefore it is needed that everyone replants what he takes. Please do so too! Otherwise we will unfortunately have to resort to other means.#I will do#I won't do#How to replant?","select":"replant_farm","send":"Send","target":"Boris"} 2024-02-16 08:44:47: ACTION[Main]: Server: Shutting down 2024-02-16 08:44:47: ACTION[Server]: Administrator leaves game. List of players: 2024-02-16 08:44:49: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'chat_formspec' in callback on_playerReceiveFields(): ...8.0/Minetest_test/bin/../builtin/common/misc_helpers.lua:178: attempt to get length of local 'str' (a nil value) 2024-02-16 08:44:49: ERROR[Main]: stack traceback: 2024-02-16 08:44:49: ERROR[Main]: ...8.0/Minetest_test/bin/../builtin/common/misc_helpers.lua:178: in function 'split' 2024-02-16 08:44:49: ERROR[Main]: ...lds/Minetest_test/worldmods/chat_formspec-redo/specs.lua:4: in function 'easy_syntax_to_formspec' 2024-02-16 08:44:49: ERROR[Main]: ...lds/Minetest_test/worldmods/chat_formspec-redo/specs.lua:65: in function 'create_target_fs' 2024-02-16 08:44:49: ERROR[Main]: ...etest_test/worldmods/chat_formspec-redo/show_receive.lua:65: in function 'func' 2024-02-16 08:44:49: ERROR[Main]: ...inetest_test/bin/../builtin/profiler/instrumentation.lua:108: in function <...inetest_test/bin/../builtin/profiler/instrumentation.lua:101> 2024-02-16 08:44:49: ERROR[Main]: ...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12> ```
AliasAlreadyTaken added this to the 1.1.123 milestone 2024-02-16 08:47:39 +00:00
AliasAlreadyTaken added the
1. kind/bug
label 2024-02-16 08:47:44 +00:00

There was definitely some weirdness with eampty strings I didn't observe during testing (e7b45e1e97). But that resulted in a somewhat broken formspec, not in a crash...

What makes things even worse: The function which crashed was already called with the same values when building the preview - and did not crash...

I've no idea how to reproduce or test this theory, but I guess you somehow managed to quit the form (fields.quit = true and therby deleted your context) but submitted the form later again...

Implemented some stuff to catch this and handle the problem: 0051a7fbae (through I can't test since I can't reproduce the crash...).

There was definitely some weirdness with eampty strings I didn't observe during testing (https://gitea.your-land.de/tour/chat_formspec-redo/commit/e7b45e1e975cad0aa1e041b58fee808013a153fc). But that resulted in a somewhat broken formspec, not in a crash... What makes things even worse: The function which crashed was already called with the same values when building the preview - and did not crash... I've no idea how to reproduce or test this theory, but I guess you somehow managed to quit the form (`fields.quit = true` and therby deleted your context) but submitted the form later again... Implemented some stuff to catch this and handle the problem: https://gitea.your-land.de/tour/chat_formspec-redo/commit/0051a7fbae722afe95a975cb3bc8e82006dd9cd3 (through I can't test since I can't reproduce the crash...).
AliasAlreadyTaken modified the milestone from 1.1.123 to 1.1.124 2024-02-23 14:18:43 +00:00
AliasAlreadyTaken modified the milestone from 1.1.124 to Next 2024-04-22 11:17:35 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#6300
No description provided.