Facepunch / sbox-issues

175 stars 12 forks source link

TypeLibrary will occasionally fail to load when swapping between projects. #4259

Closed TheNameIsMatt closed 7 months ago

TheNameIsMatt commented 9 months ago

Describe the bug

Swapping between game projects causes type library issues which results in missing components

To Reproduce

  1. Create two scenes with respective components in each of them
  2. Open a scene and add some components to some GameObjects and save.
  3. Close game project under File -> Close Game Project
  4. Load up a different project.
  5. Previous scene will load from previous project (Ignoring the starting scene in project settings).
  6. Components will not be available on GameObjects anymore (because of type library errors)

Solution: Restarting game and opening the project will fix this.

Expected behavior

Scenes should load into their respective starting scenes in project settings and components should be available.

Media/Files

2023/12/19 18:14:36.6469 [engine/Engine] SteamAPI_Init succeeded. SteamID is [U:1:30698854] (76561197990964582), AppID is 590830
2023/12/19 18:14:36.6828 [engine/Steam] CSteam3Client::Activate succeeded. SteamID is [U:1:30698854] (76561197990964582), AppID is 590830
2023/12/19 18:14:38.4411 [Generic] Waiting for Web Auth Ticket.. 2023/12/19 18:14:38.7823 [engine/AssetSystem] AssetSystem pruned 378 stale assets
2023/12/19 18:14:40.7358 [engine/AssetSystem] AssetSystem initialized in 2.03 seconds. [0.01 load, 0.06 scan, 1.94 dependencies, 0.01 save]
2023/12/19 18:14:40.9829 [Generic] Took 2.5540869s to get steam auth ticket
2023/12/19 18:14:41.4981 [Generic] Create Compiler base
2023/12/19 18:14:41.5070 [Generic] Create Compiler local.menu
2023/12/19 18:14:41.5070 [Generic] Create Compiler toolbase
2023/12/19 18:14:41.5070 [Generic] Create Compiler local.shadergraph
2023/12/19 18:14:41.5070 [Generic] Create Compiler local.actiongraph
2023/12/19 18:14:41.5070 [Generic] Create Compiler pukes.my_minimal
2023/12/19 18:14:47.6775 [engine/Qt] invalid splitter encountered
2023/12/19 18:15:03.1787 [Generic] Create Compiler apetavern.partytime 2023/12/19 18:15:03.1787 [Generic] Create Compiler apetavern.partytime.editor
2023/12/19 18:15:21.3436 [GameMenu] Unable to load prefab 'prefabs/minigames/rollerrings/player_wheel.prefab'
2023/12/19 18:15:21.3450 [GameMenu] TypeLibrary couldn't find Component type WheelSpawner
2023/12/19 18:15:31.6677 [GameMenu] TypeLibrary couldn't find Component type CitizenAnimationHelper
2023/12/19 18:15:31.6677 [GameMenu] TypeLibrary couldn't find Component type RingCameraController
2023/12/19 18:15:31.6677 [GameMenu] TypeLibrary couldn't find Component type WheelCorrectorReceiver
2023/12/19 18:15:31.6677 [GameMenu] TypeLibrary couldn't find Component type RingController
2023/12/19 18:15:35.3342 [Generic] EngineLoop::Exiting
2023/12/19 18:15:35.3342 [engine/ToolFramework2] Shutting down Qt windows.............
2023/12/19 18:15:35.3342 [engine/Engine] Source2Shutdown 2023/12/19 18:15:35.3342 [engine/Engine] ShutdownSource2Logging

Additional context

No response

garrynewman commented 9 months ago

I think this might be a duplicate of #4162 - but will keep this open as it's more accurate

handsomematt commented 7 months ago

The previous game was marked as active and compiling on startup, contaminating everything. Fixed

MrBrax commented 7 months ago

This was fixed a while ago but now it's happening again with the content mode removal.

1706261219215

Seems to work after closing and reopening scene. Race issue?