Project:
RSS

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006869Multi Theft Auto : San AndreasClientpublic2012-02-08 17:112012-02-08 19:41
Reportermabako 
Assigned Toccw 
PrioritynormalSeveritymajorReproducibilityrandom
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version1.3.1Fixed in Version1.3.1 
Summary0006869: triggering events is unreliable with strings > 65535 bytes
DescriptionOriginally 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.
Attached Fileszip file icon mta.zip [^] (735 bytes) 2012-02-08 17:11

- Relationships

-  Notes
(0015979)
Remi-X (reporter)
2012-02-08 17:18

Doesn't triggerLatentClient/ServerEvent fix this?
(0015980)
lil_Toady (administrator)
2012-02-08 17:36

When triggering a remote event it sends the string length in 2 bytes, so it's limited by the 65535 characters
(0015981)
mabako (updater)
2012-02-08 17:46

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.
(0015982)
lil_Toady (administrator)
2012-02-08 17:49

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.
(0015983)
ccw (administrator)
2012-02-08 17:58

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

- Issue History
Date Modified Username Field Change
2012-02-08 17:11 mabako New Issue
2012-02-08 17:11 mabako File Added: mta.zip
2012-02-08 17:18 Remi-X Note Added: 0015979
2012-02-08 17:36 lil_Toady Note Added: 0015980
2012-02-08 17:46 mabako Note Added: 0015981
2012-02-08 17:49 lil_Toady Note Added: 0015982
2012-02-08 17:58 ccw Note Added: 0015983
2012-02-08 19:41 x86 Project New issues => Multi Theft Auto : San Andreas
2012-02-08 19:41 x86 Assigned To => ccw
2012-02-08 19:41 x86 Status new => resolved
2012-02-08 19:41 x86 Resolution open => fixed
2012-02-08 19:41 x86 Fixed in Version => 1.3.1
2012-02-08 19:41 x86 Target Version => 1.3.1


Copyright © 2000 - 2013 MantisBT Team
Powered by Mantis Bugtracker