[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 »

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 140 times
factorio-current.log
(27.85 KiB) Downloaded 148 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: 96
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

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

Post by dewiniaid »

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: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

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 »

Thank you for the quick fix :)

Post Reply

Return to “Resolved Problems and Bugs”