View Issue Details

IDProjectCategoryView StatusLast Update
0006869Multi Theft Auto : San AndreasClientpublic2012-02-08 19:41
ReportermabakoAssigned Toccw 
PrioritynormalSeveritymajorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.1Fixed in Version1.3.1 
Summary0006869: triggering events is unreliable with strings > 65535 bytes
Description

Originally coming from the point where I got "attempt to call number/string" for a mere event handler that had no complex code in it, I figured something is wrong with either triggerClientEvent or triggerLatentClientEvent. Since they show exactly the same behavior in that matter I figured it must be something MTA-y.

And well, see the resource attached.

/mtatest <size> sends a string containing only space characters, exactly <size> long. Yet when the length exceeds 65535 it -does- return the correct size, yet the hash proves to be different.

/mtatest 65535
(server) md5=BB450AA6D244252331F0BDCD7A023B19 size=65535
(client) md5=BB450AA6D244252331F0BDCD7A023B19 size=65535

/mtatest 65536
(server) md5=C858BA08B3D55C2E7E2F31A7412A7BD5 size=65536
(client) md5=AE5C932AB2E19291DD20C2C4AC382428 size=65536

The same can be tested with /mtatest2 for triggerLatentClientEvent.

If you have an event handler like function( reallyLargeData, r, g, b ) for example, you'll struggle to see using r, g, b causes the "attempt to call number"/string mentioned above.

TagsNo tags attached.

Activities

Remi-X

2012-02-08 17:18

reporter   ~~0015979

Doesn't triggerLatentClient/ServerEvent fix this?

lil_Toady

2012-02-08 17:36

administrator   ~~0015980

When triggering a remote event it sends the string length in 2 bytes, so it's limited by the 65535 characters

mabako

2012-02-08 17:46

updater   ~~0015981

I went merely by the example in http://wiki.multitheftauto.com/wiki/FetchRemote, and since the restriction on max. packet size was removed perhaps strings longer than that might be available too.

lil_Toady

2012-02-08 17:49

administrator   ~~0015982

There's a downside in increasing it, people rarely transfer that long strings, usually it's a set of smaller ones, and increasing the limit would send 2 extra bytes per string. You could split your string and send it in a table instead.

ccw

2012-02-08 17:58

administrator   ~~0015983

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

Issue History

Date Modified Username Field Change