[Rseding91] [16.0] Remote calls mangle tables

This subforum contains all the issues which we already resolved.
Post Reply
bob809
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Dec 13, 2017 2:35 pm
Contact:

[Rseding91] [16.0] Remote calls mangle tables

Post by bob809 » Wed Dec 13, 2017 3:19 pm

Table arguments to remote calls get mangled e.g. {a = 1, b = 2} -> {a = 2}.

To reproduce:
  • Mod with a 1 line control.lua

    Code: Select all

    remote.add_interface("test", {test = function(x) game.print(serpent.block(x)) end})
  • In game run

    Code: Select all

    /c remote.call("test", "test", {a = 1, b = 2})
Expected output: {a = 1, b = 2}
Actual output: {a = 2}

Note that this works as expected if

Code: Select all

/c remote.add_interface("test", {test = function(x) game.print(serpent.block(x)) end})
/c remote.call("test", "test", {a = 1, b = 2})
is run in the console, the bug only occurs when the interface is declared in a mod (calling from a mod also causes this bug to appear).
Attachments
test_0.0.1.zip
Example Mod
(458 Bytes) Downloaded 23 times
factorio-current.log
(27.85 KiB) Downloaded 25 times
Last edited by bob809 on Wed Dec 13, 2017 4:39 pm, edited 1 time in total.

dewiniaid
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

Re: [Rseding91] [16.0] Remote calls mangle tables

Post by dewiniaid » Wed Dec 13, 2017 4:12 pm

Also getting this. Likely related to the fix for [Rseding91] [15.37] Circular references on remote interface = hard crash

Rseding91
Factorio Staff
Factorio Staff
Posts: 9453
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [16.0] Remote calls mangle tables

Post by Rseding91 » Wed Dec 13, 2017 4:46 pm

Thanks for the report and easy steps to reproduce the problem.

It's now fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.

bob809
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Dec 13, 2017 2:35 pm
Contact:

Re: [Rseding91] [16.0] Remote calls mangle tables

Post by bob809 » Wed Dec 13, 2017 9:32 pm

Thank you for the quick fix :)

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users