Page MenuHomeFeedback Tracker

magazinesAmmoFull is broken on Linux servers
Feedback, NormalPublic

Description

magazinesAmmoFull always returns empty arrays on Linux servers. This happens on both 32 and 64 bit servers. I'm on Debian Buster 64bit. This happens with and without mods but is causing my Exile server to have issues.

There appears to be at least one other person having this issue as well. https://forums.bohemia.net/forums/topic/231795-broken-magazinesammofull-on-linux-server/?tab=comments

I just created my server so I'm unsure when this stopped working.

Arma 3 Console version 2.00.146766 x86 : port 2314

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Linux
Operating System Version
Debian Buster
Category
Server
Steps To Reproduce

Create linux server with version 2.00.146766. Run the magazinesAmmoFull[player] command and see that arrays inside the array are all empty.

Additional Information

Versions:

17:07:36 ============================================================================================= List of mods ===============================================================================================
17:07:36 modsReadOnly = true
17:07:36 safeModsActivated = false
17:07:36 customMods = true
17:07:36 hash = '16308B44E55DF58A8C0DFC3B61154BC6ABE95D9C'
17:07:36 hashShort = '3204d924'
17:07:36 name | modDir | default | official | origin | hash | hashShort | fullPath
17:07:36 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17:07:36 Enhanced Movement | @enhancedmovement | false | false | GAME DIR | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/arma3server/serverfiles/mods/@enhancedmovement
17:07:36 Exile Mod | @Exile | false | false | GAME DIR | 40954e2fef9c5ea7da797fdc19fc5305cd94d08f | 52ca1771 | /home/arma3server/serverfiles/mods/@Exile
17:07:36 Arma 3 Contact (Platform) | enoch | true | true | GAME DIR | 1ba0bd900ebe2592bc131b6076b3188912ef400a | cc42b20a | /home/arma3server/serverfiles/enoch
17:07:36 Arma 3 Tanks | tank | true | true | GAME DIR | 1741984a682960e6d5cea03802d56fcb8733f1ee | e3600f2e | /home/arma3server/serverfiles/tank
17:07:36 Arma 3 Tac-Ops | tacops | true | true | GAME DIR | 97b1dbbcf02653320d4a971972e3fa7b86de0bb6 | 3f7c910a | /home/arma3server/serverfiles/tacops
17:07:36 Arma 3 Laws of War | orange | true | true | GAME DIR | 9ffa496322c2448b3406a8da16acf6acdf767b4e | 9ddb9ce4 | /home/arma3server/serverfiles/orange
17:07:36 Arma 3 Malden | argo | true | true | GAME DIR | 7e514225d7ca25f6ac7fd327d29bfbef7895faf1 | 3e898373 | /home/arma3server/serverfiles/argo
17:07:36 Arma 3 Jets | jets | true | true | GAME DIR | ca8d2b15096709f721442f1bd8daaf340efe3c7a | 4dedcd93 | /home/arma3server/serverfiles/jets
17:07:36 Arma 3 Apex | expansion | true | true | GAME DIR | ba42c2077a3ccc61ad9da08b0520dcdd3bf836e1 | a9ced3d9 | /home/arma3server/serverfiles/expansion
17:07:36 Arma 3 Marksmen | mark | true | true | GAME DIR | f4f2299213d3fbac83f93a40f3a9189981d3b4d4 | bdd1f9cf | /home/arma3server/serverfiles/mark
17:07:36 Arma 3 Helicopters | heli | true | true | GAME DIR | a864c4890a0a81805ec227cad1f26be1773aa0a8 | da5627a1 | /home/arma3server/serverfiles/heli
17:07:36 Arma 3 Karts | kart | true | true | GAME DIR | dda4727989bdfbf55ca28fe990bcf47d86ace303 | 3e52333 | /home/arma3server/serverfiles/kart
17:07:36 Arma 3 Zeus | curator | true | true | GAME DIR | d6bd1f0f8278a7e1c60de7d92c098cf210834cf3 | 2c4264c1 | /home/arma3server/serverfiles/curator
17:07:36 Arma 3 | A3 | true | true | NOT FOUND | | |
17:07:36 @exileserver | @exileserver | false | false | GAME DIR | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/arma3server/serverfiles/mods/@exileserver
17:07:36 ==========================================================================================================================================================================================================

ExileClient_util_inventory_getLoadedMagazinesMap.sqf:

private["_player", "_loadedMagazines", "_magazine", "_bullets", "_isLoaded", "_type", "_muzzle"];
_player = _this;
_loadedMagazines = [];

diag_log format["All magazines: %1", magazinesAmmoFull[_player]];

{
diag_log format["Magazine in for loop: %1", _x];

_magazine = _x select 0;
_bullets = _x select 1;
_isLoaded = _x select 2;
_type = _x select 3;
_muzzle = _x select 4;
if (_isLoaded) then
{

		if (_bullets > 0) then 
		{
			switch (_type) do 
			{
				case 1: 
				{
					_loadedMagazines pushBack [primaryWeapon _player, _magazine, _bullets, _muzzle];
				};
				case 2: 
				{
					_loadedMagazines pushBack [handgunWeapon _player, _magazine, _bullets, _muzzle];
				};
				case 4: 
				{
					_loadedMagazines pushBack [secondaryWeapon _player, _magazine, _bullets, _muzzle];
				};
			};
		};

};
}
forEach (magazinesAmmoFull _player);
_loadedMagazines

Log:

17:15:24 "All magazines: [[]]"
17:15:24 "Magazine in for loop: []"
17:15:24 Error in expression <
_magazine = _x select 0;
_bullets = _x select 1;
_isLoaded = _x select 2;
_type>
17:15:24 Error position: <select 1;
_isLoaded = _x select 2;
_type>
17:15:24 Error Zero divisor
17:15:24 File exile_client\code\ExileClient_util_inventory_getLoadedMagazinesMap.sqf..., line 23

Event Timeline

dedmen claimed this task.Dec 2 2020, 4:35 PM
dedmen set Ref Ticket to AIII-53628.
AWG added a subscriber: AWG.Dec 12 2020, 7:27 PM
dedmen changed the task status from New to Feedback.Dec 15 2020, 5:58 PM

Fixed for 2.02.
Maybe profiling branch v10 update. not next dev-branch, the one after.