View Issue Details

IDProjectCategoryView StatusLast Update
0008531Multi Theft Auto : San AndreasScriptingpublic2014-09-14 11:37
ReporterGrafuAssigned ToJusonex 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform64-bitOSWindowsOS Version8.1 Pro
Product Version 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008531: Huge tables being sent trough events get corrupted
Description

I tested it with a 33k entries table and after sending it trough triggerClientEvent, I received only a table of 800 of entries.

Steps To Reproduce

-- Server
addCommandHandler("send",
function()
local hugeTable = {}
for i = 0, 50000 do
hugeTable[i] = "a"
end

    triggerClientEvent("rpc", root, hugeTable, "astring", 1337)
end

)

-- Client
addEvent("rpc", true)
addEventHandler("rpc", root,
function(hugeTable, s, n)
outputChatBox(s)
outputChatBox(n)
end
)

TagsNo tags attached.

Activities

Jusonex

2014-09-12 14:31

administrator   ~~0021998

The reason is - as already stated on IRC - a too small integral datatype (unsigned short) used for the argument count (= amount of table entries * 2):
https://code.google.com/p/mtasa-blue/source/browse/trunk/MTA10/mods/shared_logic/lua/CLuaArguments.cpp#457

Jusonex

2014-09-14 11:37

administrator   ~~0022017

Fixed in https://code.google.com/p/mtasa-blue/source/detail?r=6856

Issue History

Date Modified Username Field Change