Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Current FIX for server crashes. #3

Open
keku645 opened this issue Dec 8, 2021 · 1 comment
Open

Current FIX for server crashes. #3

keku645 opened this issue Dec 8, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@keku645
Copy link

keku645 commented Dec 8, 2021

After investigating why the server crashes I found out that few assets were the responsable of it.

Investigating further I realised that all these assets had one thing in common, they also made the server crash on maped or they directly didnt spawn.
One step ahead after some more investigations were that the assets that made the server crash had the scale below or higher than 1.0.

Example of one of these assets that made the server crash.

Partition 3BECC919-051A-4B87-8FA1-56780CA89353
HavokAsset 7A954417-78A5-C028-475B-EB5BFD3A4A07
    $::Asset
        $::DataContainer
        Name Levels/XP5_002/Objects/ConveyorLine_01_XP5_002/ConveyorLine_01c_XP5_002_Physics_0_Win32
    Scale 0.649999976158
    ExternalAssets *nullArray*

After removing such assets by setting the instance count to 0 by code, the server no longer crashed and let me in, but because I removed some assets the indexes broke so lots of assets would spawn on the wrong coordinates as seen below.

image

To fix this and to also have the removed assets back i swapped the physic data of the problematic assets by one with a scale of 1.0 from the same level and also setting the scale from the problematic asset at 1.0.

ResourceManager:RegisterInstanceLoadHandler(Guid('00DC5905-7297-478A-B904-670C42BD12A5'), Guid('C80B4D7A-2601-265B-F1E4-B2D770261C12'), function(instance)
    print('Scale changed...')
    local thisInstance = HavokAsset(instance)
    thisInstance:MakeWritable()
    thisInstance.name = 'xp3/props/trexskull_01/trexskull_01_physics_0_win32'
    thisInstance.scale = 1.0
end)

This fixed our issue and let me in.

Below I point which assets were the responsable ones.
image

This is the current list of assets that makes the server crash and in which map.


--Seine Crossing (MP_011)---

Objects/MetroSigns/MetroSign_25
Objects/Ashtray_01/Ashtray_01 (asset not spawning)


--Operation Metro (MP_Subway)---

Objects/MetroSigns/MetroSign_57
Objects/Phonebooth_02/Phonebooth_02 (asset not spawning)
Objects/MetroSigns/MetroSign_14
Objects/MetroSigns/MetroSign_32


--Death Valley (XP3_Valley)---

Objects/SignsBorder_01/Sign_LED_Wait_01 (asset not spawning)


--Nebandan Flats (XP5_002)---

Levels/XP5_002/Objects/ConveyorLine_01_XP5_002/ConveyorLine_01b_XP5_002
Levels/XP5_002/Objects/ConveyorLine_01_XP5_002/ConveyorLine_01c_XP5_002


--Operation 925 (XP2_Office)---

note: Once the server crash issue is solved you get a client kicked error.

Objects/MetroSigns/MetroSign_25
Objects/MetroSigns/MetroSign_27

@FoolHen
Copy link
Member

FoolHen commented Oct 4, 2022

The reason is that some havok physic assets for specific scales do not exist, probably due to havok optimisations or similar. The only way (i think) to fix this is to set a scale for those objects that does exist, which will make the level a bit different to the original map as some objects will be scaled up or down

@FoolHen FoolHen self-assigned this Oct 4, 2022
@FoolHen FoolHen added the bug Something isn't working label Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants