Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server freezes on Tanoa due to Error in expression <_randomPos; #75

Open
3Mydlo3 opened this issue Feb 17, 2024 · 1 comment
Open

Server freezes on Tanoa due to Error in expression <_randomPos; #75

3Mydlo3 opened this issue Feb 17, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@3Mydlo3
Copy link
Member

3Mydlo3 commented Feb 17, 2024

Below is the log when this happens for the first time. Mission was started at around 20:35.

20:49:03 "[AFSK] [COMMON] [getNearestLocation] Pos: [12612.6,7872.71,0.00175858], Town: No location"
20:49:04 "[AFSK] [COMMON] [getNearestLocation] Pos: [7933.54,7662.53,0.00161171], Town: Location NameVillage at 7942, 7663"
20:49:04 "[AFSK] [COMMON] [getNearestLocation] Pos: [11440.7,12269.7,0.000900269], Town: Location NameVillage at 11418, 12360"
20:49:06 Error in expression <_randomPos;
_randomPos = _randomPos findEmptyPosition [0, _emptyPosSearchRad>
20:49:06 Error position: <findEmptyPosition [0, _emptyPosSearchRad>
20:49:06 Error 0 elements provided, 3 expected
20:49:06 File /z/afsk/addons/civilian/functions/fnc_getCityRandomPos.sqf..., line 285
20:49:07 Error in expression <_randomPos;
_randomPos = _randomPos findEmptyPosition [0, _emptyPosSearchRad>
20:49:07 Error position: <findEmptyPosition [0, _emptyPosSearchRad>
20:49:07 Error 0 elements provided, 3 expected
20:49:07 File /z/afsk/addons/civilian/functions/fnc_getCityRandomPos.sqf..., line 285

The code was not changed for 4 years and worked flawlessly on Chernarus and Malden. There is probably an issue with expecting a road in every village/city. On Tanoa, Sosovu (on a small island in western part of the map) doesn't have a meter of road. This causes infinite loop(s) which break the server.

@3Mydlo3 3Mydlo3 added the bug Something isn't working label Feb 17, 2024
@3Mydlo3 3Mydlo3 added this to the 1.0.0.0 milestone Feb 17, 2024
@3Mydlo3
Copy link
Member Author

3Mydlo3 commented Apr 22, 2024

The issue appeared again in Bystrica #101 d513ab8, Nizhnoye doesn't have road there. Suggested workaround for now is to change location config so that it's ignored by the code:

class CfgWorlds
{
    class Woodland_ACR : CAWorld
    {
        class ACityC_Nizhnoye
        {
            type = "NameLocal";
        };
    };
};

I'll apply the same fix for Tanoa as well, especially that Sosovu is an island that no civilian could go to at this state anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Do
Development

No branches or pull requests

1 participant