Resolved General Too long banner codes block the server

Users who are viewing this thread

Version number
1.1.1
Branch
Main
Modded/unmodded
Modded
C#:
var agentBuildData = new AgentBuildData(character);
// ...
agentBuildData.Banner(new Banner("11.129.116.1836.1836.768.788.1.0.-30.212.128.146.468.438.799.572.1.1.0.212.128.146.468.438.961.586.1.1.0.212.128.146.468.438.580.566.1.1.0.212.128.146.468.438.746.1011.1.1.0.212.128.146.468.438.979.971.1.1.0.212.128.146.468.438.502.947.1.1.0.212.128.146.468.438.692.602.1.1.0.212.128.146.468.438.903.752.1.1.0.212.128.146.468.438.674.933.1.1.0.212.128.146.468.438.927.602.1.1.0.212.128.146.468.438.624.911.1.1.0.212.128.146.468.438.825.923.1.1.0.212.128.146.468.438.554.706.1.1.0.212.128.146.468.438.943.688.1.1.0"));
Mission.SpawnAgent(agentBuildData);

Trying to spawn an agent like that will block the server without crashing it. I think the reason is that the CreateAgent packet is too large.
 
I've been informed that the fix is on 1.2.X version of the game, already applied.
I've just done some testing and it appears that the client may crash, caused by an issue with the compression of the banner data within the Character property of the CreateAgent network message.

When testing the bannercode provided by @takeoshigeru, there were no issues. But after I edited the bannercode to the one provided below, I would get the crash. This crash occurs on many different banners that I have tested, not just the one provided below.

Example bannercode:
Code:
11.129.116.1836.1836.768.788.1.0.-30.532.128.146.289.271.553.528.1.0.0.532.128.146.289.100.644.720.1.0.0.532.128.146.289.271.837.720.1.1.0.532.128.146.289.271.923.544.1.1.0.532.128.146.289.271.734.913.1.1.-180

Client:
Code:
[14:09:19.197] Reading message: CreateAgent
[14:09:19.197] Invalid encode/decode in Integer_compression_info::decode_safe. min: 0. max: 360. input: 509. Message: internal_decode

Server:
Code:
[14:09:19.019] Set the team to: Attacker, for peer: Droob
[14:09:19.025] >SBC => Droob is switching from NULL to Attacker. Adding to scoreboard side Attacker.
[14:09:19.037] Invalid encode/decode in IMono_MBNetwork::write_int_to_packet. min: 0. max: 360. input: -3. Message: managed_encode
[14:09:19.037]
<##########################################################################################>

[14:09:19.037]
WARNING: Compression info input is not between min and max values. Min: 0. Max: 360.
[14:09:19.037] [14:09:19.042]
rgl_post_warning_line: RGL WARNING - Compression info input is not between min and max values. Min: 0. Max: 360.

[14:09:19.042] Messagebox [Always Ignore?] message: Would you like to always ignore this failure?

As always, your help is greatly appreciated @MArdA TaleWorlds!
 
Back
Top Bottom