nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

Server Crash Randomly on CallRemoteEvent (FIX IT) #964

Closed vugi99 closed 11 months ago

vugi99 commented 11 months ago

Prerequisites

Your Environment

Description

Server Crash Randomly on CallRemoteEvent (FIX IT)

Steps to reproduce the behavior

Start the game on zm-supermarket

# discover configurations
[discover]
    # server name
    name =              "nanos world server"
    # server description (max 127 characters)
    description =       ""
    # server IP. we recommend leaving it 0.0.0.0 for default
    ip =                "0.0.0.0"
    # server port (TCP and UDP)
    port =              7777
    # query port (UDP)
    query_port =        7778
    # announce server in the master server list
    announce =          false
    # true if should run as dedicated server or false to run as P2P - dedicated server requires port forwarding and provides the fastest connection - P2P will provide a fake IP to be used to connect but connection can be slower
    dedicated_server =  true

# general configurations
[general]
    # max players
    max_players =       64
    # leave it blank for no password
    password =          ""
    # nanos world server authentication token
    token =             ""
    # banned nanos account IDs
    banned_ids = [

    ]

# game configurations
[game]
    # default startup map
    map =               "zm-supermarket"
    # game-mode package to load (set the main game-mode package to load - you can load only one 'game-mode' package type at once)
    game_mode =         "vzombies"
    # packages list (set the packages you want to load)
    packages = [

    ]
    # asset packs list (additionally loads the asset packs you define here)
    assets = [

    ]
    # loading-screen package to load (the loading screen will be displayed when players join your server)
    loading_screen =    ""

# custom settings values
# those values can be accessed through Server.GetCustomSettings() method from any package
[custom_settings]
    # my_setting_example_01 = "value"
    # my_setting_example_02 = 123

# debug configurations
[debug]
    # log Level - (1) normal, (2) debug or (3) verbose
    log_level =         1
    # if to use async or sync logs (async provides better performance, disabling async logs can help debugging crashes)
    async_log =         false
    # enables performance profiling logs for debugging
    profiling =         false

# optimization configurations
[optimization]
    # server tick rate in milliseconds (dangerous! server will tick at each [tick_rate] ms, affecting both server and client performance. 33 ms means 30 ticks per second and is the default and recommended value)
    tick_rate =         33
    # sets the compression level to use in some networking operations (0 - 9) - (0) disables it, (1) is the fastest and (9) is the slowest but has the highest compression ratio
    compression =       1

vzombies_3.0.2_crash_supermarket.zip

Join the server

Expected behavior

Should never crash there

Actual behavior

Crashing randomly (seems like it's doing it 90% of the time) on line 467 in Players.lua

Changing Parse_Custom_Settings in Shared/Config/Config.lua at line 43 may fix the issue (sometimes) ???

vugi99 commented 11 months ago

Data being passed (as a lua table) :

{
    "HELLHOUND_SPAWNS" = {
        1 = {
            "location" = Vector(X = 1421.0, Y = 4618.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        2 = {
            "location" = Vector(X = 1581.0, Y = 5406.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        3 = {
            "location" = Vector(X = 806.0, Y = 6940.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        4 = {
            "location" = Vector(X = -195.0, Y = 5684.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        5 = {
            "location" = Vector(X = -981.0, Y = 6904.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        6 = {
            "location"  = Vector(X = -1698.0, Y = 4822.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        7 = {
            "location" = Vector(X = -1770.0, Y = 6032.0, Z = -12.0),
            "room" = 1,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
    },
    "MAP_DOORS" = {
        1 = {
            "between_rooms" = {
                1 = 1,
                2 = 2,
            },
            "location" = Vector(X = 356.0, Y = 2094.0, Z = 0.0),
            "model" = "zm-supermarket::SM_MERGED_StaticMeshActor_2",
            "price" = 750,
            "required_rooms" = {
                1 = 1,
            },
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "scale" = Vector(X = 1.0, Y = 1.0, Z = 1.0),
        },
        2 = {
            "between_rooms" = {
                1 = 1,
                2 = 3,
            },
            "location" = Vector(X = -100.0, Y = -2309.0, Z = 0.0),
            "model" = "zm-supermarket::SM_MERGED_SM_DoubleDoor_Left2",
            "price" = 1000,
            "required_rooms" = {
                1 = 1,
            },
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "scale" = Vector(X = 1.0, Y = 1.0, Z = 1.0),
        },
        3 = {
            "between_rooms" = {
                1 = 2,
                2 = 3,
            },
            "location" = Vector(X = -100.0, Y = -1242.0, Z = 0.0),
            "model" = "zm-supermarket::SM_MERGED_SM_DoubleDoor_Right_13",
            "price" = 1000,
            "required_rooms" = {
                1 = 1,
            },
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "scale" = Vector(X = 1.0, Y = 1.0, Z = 1.0),
        },
        4 = {
            "between_rooms" = {
                1 = 2,
                2 = 4,
            },
            "location" = Vector(X = 1749.0, Y = -1240.0, Z = 0.0),
            "model" = "zm-supermarket::SM_Door",
            "price" = 1000,
            "required_rooms" = {
                1 = 1,
            },
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "scale" = Vector(X = 1.0, Y = 1.0, Z = 1.0),
        },
    },
    "MAP_INTERACT_TRIGGERS" = {
    },
    "MAP_LIGHT_ZONES" = {
    },
    "MAP_MYSTERY_BOXES" = {
        1 = {
            "location" = Vector(X = -1180.0, Y = 1947.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 179.99951171875, Roll = 0.0),
        },
        2 = {
            "location" = Vector(X = 1795.0, Y = 414.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
        },
        3 = {
            "location" = Vector(X = -1339.0, Y = -216.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 89.999794006348, Roll = 0.0),
        },
    },
    "MAP_PACK_A_PUNCH" = {
        "location" = Vector(X = 1583.0, Y = 1963.0, Z = 0.0),
        "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        "weapon_location" = Vector(X = 1555.0, Y = 2026.0, Z = 83.0),
        "weapon_rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
    },
    "MAP_PERKS" = {
        "doubletap" = {
            "location" = Vector(X = 546.0, Y = -3080.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        "juggernog" = {
            "location" = Vector(X = 1033.0, Y = -1357.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 89.99974822998, Roll = 0.0),
        },
        "quick_revive" = {
            "location" = Vector(X = 1152.0, Y = 7286.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 179.99951171875, Roll = 0.0),
        },
        "speed_cola" = {
            "location" = Vector(X = -1023.0, Y = -1406.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 89.99974822998, Roll = 0.0),
        },
        "stamin_up" = {
            "location" = Vector(X = 1423.0, Y = -1210.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        "three_gun" = {
            "location" = Vector(X = -1838.0, Y = 392.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
        },
    },
    "MAP_ROOMS" = {
        1 = {
            1 = {
                "ground_anim" = true,
                "location" = Vector(X = 234.0, Y = 7521.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            2 = {
                "ground_anim" = true,
                "location" = Vector(X = 1628.0, Y = 7735.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -151.20059204102, Roll = 0.0),
                "type" = "ground",
            },
            3 = {
                "ground_anim" = true,
                "location" = Vector(X = -221.0, Y = 7735.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -43.200908660889, Roll = 0.0),
                "type" = "ground",
            },
            4 = {
                "ground_anim" = true,
                "location" = Vector(X = -1342.0, Y = 7735.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -43.200908660889, Roll = 0.0),
                "type" = "ground",
            },
            5 = {
                "ground_anim" = true,
                "location" = Vector(X = -2416.0, Y = 7735.0, Z = 22.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -43.200908660889, Roll = 0.0),
                "type" = "ground",
            },
            6 = {
                "ground_anim" = true,
                "location" = Vector(X = 1708.0, Y = 6774.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            7 = {
                "ground_anim" = true,
                "location" = Vector(X = 1931.0, Y = 5884.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            8 = {
                "ground_anim" = true,
                "location" = Vector(X = 1903.0, Y = 5056.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            9 = {
                "ground_anim" = true,
                "location" = Vector(X = 1935.0, Y = 4385.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            10 = {
                "ground_anim" = true,
                "location" = Vector(X = 1876.0, Y = 3650.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
        11 = {
                "ground_anim" = true,
                "location" = Vector(X = 1876.0, Y = 2707.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            12 = {
                "ground_anim" = true,
                "location" = Vector(X = -2336.0, Y = 2725.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            13 = {
                "ground_anim" = true,
                "location" = Vector(X = -2336.0, Y = 3876.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            14 = {
                "ground_anim" = true,
                "location" = Vector(X = -2336.0, Y = 4913.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            15 = {
                "ground_anim" = true,
                "location" = Vector(X = -2336.0, Y = 5894.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            16 = {
                "ground_anim" = true,
                "location" = Vector(X = -2336.0, Y = 6760.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -97.20076751709, Roll = 0.0),
                "type" = "ground",
            },
            17 = {
                "ground_anim" = true,
                "location" = Vector(X = 42.0, Y = 6760.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
                "type" = "ground",
            },
            18 = {
                "ground_anim" = true,
                "location" = Vector(X = 42.0, Y = 6147.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
                "type" = "ground",
            },
            19 = {
                "ground_anim" = true,
                "location" = Vector(X = 42.0, Y = 5352.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
                "type" = "ground",
            },
            20 = {
                "ground_anim" = true,
                "location" = Vector(X = 42.0, Y = 4409.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
                "type" = "ground",
            },
            21 = {
                "ground_anim" = true,
                "location" = Vector(X = 42.0, Y = 3686.0, Z = -13.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = -90.000778198242, Roll = 0.0),
                "type" = "ground",
            },
            22 = {
                "ground_anim" = true,
                "location" = Vector(X= -2447.0, Y = 2026.0, Z = -12.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = 35.999912261963, Roll = 0.0),
                "type" = "ground",
            },
            23 = {
                "ground_anim" = true,
                "location" = Vector(X = 2453.0, Y = 1533.0, Z = -12.0),
                "rotation" = Rotator(Pitch = 0.0, Yaw = 165.59956359863, Roll = 0.0),
                "type" = "ground",
            },
        },
        2 = {
        },
        3 = {
        },
        4 = {
        },
    },
    "MAP_SETTINGS" = {
        "Bosses_Enabled" = true,
        "Sky_Light_Intensity" = -1.0,
        "Sun_Light_Intensity" = -1.0,
        "disabled_enemies" = {
        },
        "spawn_nanos_sky" = true,
        "time_overwrite" = {
        },
    },
    "MAP_STATIC_MESHES" = {
    },
    "MAP_TELEPORTERS" = {
    },
    "MAP_WEAPONS" = {
        1 = {
            "location" = Vector(X = 3.0, Y = -211.0, Z = 114.0),
            "max_ammo" = 400,
            "price" = 1200,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 179.99951171875, Roll = 0.0),
            "weapon_name" = "AK47",
        },
        2 = {
            "location" = Vector(X = 1481.0, Y = -1777.0, Z = 133.0),
            "max_ammo" = 300,
            "price" = 1000,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "weapon_name" = "P90",
        },
        3 = {
            "location" = Vector(X = 1559.0, Y = -1256.0, Z = 120.0),
            "max_ammo" = 100,
            "price" = 1000,
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
            "weapon_name" = "SPAS12",
        },
    },
    "MAP_WUNDERFIZZ" = {
        1 = {
            "location" = Vector(X = 1531.0, Y = 1682.0, Z = 0.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 179.99951171875, Roll = 0.0),
        },
    },
    "MAP_Z_LIMITS" = {
        "max" = 1191.0,
        "min" = -331.0,
    },
    "PLAYER_SPAWNS" = {
        1 = {
            "location" = Vector(X = -635.0, Y = 5801.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        2 = {
            "location" = Vector(X = -635.0, Y = 6021.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        3 = {
            "location" = Vector(X = 713.0, Y = 6021.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        4 = {
            "location" = Vector(X = 713.0, Y = 6275.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        5 = {
            "location" = Vector(X = 713.0, Y = 6513.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        6 = {
            "location" = Vector(X = -635.0, Y = 6253.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        7 = {
        "location" = Vector(X = -635.0, Y = 6511.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        8 = {
            "location" = Vector(X = 713.0, Y = 5796.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        9 = {
            "location" = Vector(X = -635.0, Y = 5021.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        10 = {
            "location" = Vector(X = -635.0, Y = 3933.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
        11 = {
            "location" = Vector(X = 713.0, Y = 5007.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        12 = {
            "location" = Vector(X = 713.0, Y = 3929.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        13 = {
            "location" = Vector(X = 713.0, Y = 4555.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = -172.8005065918, Roll = 0.0),
        },
        14 = {
            "location" = Vector(X = -635.0, Y = 4568.0, Z = -12.0),
            "rotation" = Rotator(Pitch = 0.0, Yaw = 0.0, Roll = 0.0),
        },
    },
}
gtnardy commented 11 months ago

Simple way to reproduce:

local v = {
    ["location"] = Vector(713.0, 3929.0, -12.0),
    ["rotation"] = Rotator(0.0, -172.8005065918, 0.0),
}

local v2 = {
    ["location"] = Vector(713.0, 3929.0, -12.0),
    ["rotation"] = Rotator(0.0, -172.8005065918, 0.0),
}

ASD2 = {
    ["asd"] = { v, v2, v }
}

Timer.SetTimeout(function ()
    print(NanosTable.Dump(ASD2))
    Events.BroadcastRemote("asd", ASD2)
end, 1000)
gtnardy commented 11 months ago

fixed it 🙏