Hemiptera Bugtracker at bugs.linux-forks.de

advtrains

Copied trains crash if immediately decoupled

Send replies to 187@bugs.linux-forks.de or using the Form below.
avatar From: OP
Sat, 13 Nov 2021 14:35:01 -0000

Trains copied with the Clipboard copy tool will crash the world if they

are immediately decoupled.

Moving/reversing the train sometimes avoids the crash.

Doesn't seem to affect trains manually coupled then decoupled.

Same effect if decoupled using Boardcom and manual punching:

(Boardcom)

2021-11-13 22:04:17: ERROR[Main]: ServerError: AsyncErr:

ServerThread::run Lua: Runtime error from mod '' in callback

on_playerReceiveFields():

/usr/share/minetest/builtin/common/misc_helpers.lua:480: table index is nil

2021-11-13 22:04:17: ERROR[Main]: stack traceback:

2021-11-13 22:04:17: ERROR[Main]:

/usr/share/minetest/builtin/common/misc_helpers.lua:480: in function 'copy'

2021-11-13 22:04:17: ERROR[Main]:

.../mt/.minetest/mods/advtrains/advtrains/trainlogic.lua:1171: in

function 'split_train_at_index'

2021-11-13 22:04:17: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/couple.lua:391: in function

'split_train_at_wagon'

2021-11-13 22:04:17: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/wagons.lua:1272: in function

'safe_decouple_wagon'

2021-11-13 22:04:17: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/wagons.lua:1056: in function

'handle_bordcom_fields'

2021-11-13 22:04:17: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/wagons.lua:1172: in function

</home/mt/.minetest/mods/advtrains/advtrains/wagons.lua:1105>

2021-11-13 22:04:17: ERROR[Main]:

/usr/share/minetest/builtin/game/register.lua:422: in function

</usr/share/minetest/builtin/game/register.lua:406>

(Punching)

2021-11-13 22:08:53: ERROR[Main]: ServerError: AsyncErr:

ServerThread::run Lua: Runtime error from mod '' in callback

luaentity_Punch():

/usr/share/minetest/builtin/common/misc_helpers.lua:480: table index is nil

2021-11-13 22:08:53: ERROR[Main]: stack traceback:

2021-11-13 22:08:53: ERROR[Main]:

/usr/share/minetest/builtin/common/misc_helpers.lua:480: in function 'copy'

2021-11-13 22:08:53: ERROR[Main]:

.../mt/.minetest/mods/advtrains/advtrains/trainlogic.lua:1171: in

function 'split_train_at_index'

2021-11-13 22:08:53: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/couple.lua:391: in function

'split_train_at_wagon'

2021-11-13 22:08:53: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/wagons.lua:1272: in function

'safe_decouple_wagon'

2021-11-13 22:08:53: ERROR[Main]:

/home/mt/.minetest/mods/advtrains/advtrains/couple.lua:421: in function

</home/mt/.minetest/mods/advtrains/advtrains/couple.lua:418>

avatar From: OP
Thu, 18 Nov 2021 12:12:01 -0000

Also found a similar error when using split_at_index() on the LF server

--> games/minetest/builtin/common/misc-helpers.lua:480: table index is nil

function in question is table.copy()

split_at_index() uses advtrains.split_train_at_index(), which has a

table.copy() function introduced in commit be2f37a

"Support different types of speed restrictions; add documentation"

Are trains given a default "speed_restrictions_t" table at all?

avatar From: Developer
Thu, 18 Nov 2021 21:16:01 -0000

187@bugs.linux-forks.de writes:

> Also found a similar error when using split_at_index() on the LF server

>

> --> games/minetest/builtin/common/misc-helpers.lua:480: table index is nil

>

> function in question is table.copy()

>

> split_at_index() uses advtrains.split_train_at_index(), which has a

> table.copy() function introduced in commit be2f37a

In which situation does this happen exactly? How can I reproduce this?

avatar From: OP
Sat, 11 Dec 2021 02:26:01 -0000

Fixed in release 2.4.1

avatar From: OP
Sat, 11 Dec 2021 02:30:01 -0000

%close

avatar Status Update
Sat, 18 Dec 2021 16:42:01 -0000
This bug was closed.
Reply