Facepunch / sbox-issues

175 stars 12 forks source link

Hotload crashes and makes S&box inoperable after saving GameObjects or compiling C# in the scene system. #4132

Closed LiminalCrab closed 1 year ago

LiminalCrab commented 1 year ago

Describe the bug

Following up on https://github.com/sboxgame/issues/issues/4125

Hotload crashes and makes S&box inoperable after saving GameObjects or compiling C#.

https://github.com/sboxgame/issues/assets/78995156/0e9b6387-c0ac-40be-a922-21fa32eb884b

04:32:02   engine/Qt invalid splitter encountered
 04:31:27   engine/Engine SteamAPI_Init succeeded.  SteamID is [U:1:13431743] (76561197973697471), AppID is 590830
 04:31:27   engine/Steam CSteam3Client::Activate succeeded.  SteamID is [U:1:13431743] (76561197973697471), AppID is 590830
 04:31:56   engine/ToolsStallMonitor  [1] Stall detected.
 04:33:08   engine/Client CL:  disconnect
 04:33:08   GameMenu Register Assembly: [package.base, Version=0.0.101.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:09   GameMenu Register Assembly: [package.facepunch.testbed, Version=0.0.103.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:09   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.107.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:09   Generic Exception waiting for task to finish
 04:33:12   engine/ResourceSystem Error loading resource file "maps/customer_returns01/world_visibility.vvis_c" (Error: ERROR_FILEOPEN: File not found)
 04:33:25   GameMenu  [1] [[GameMenu](arg:0)] Detected Asset File Changed /scenes/customer_returns.scene_c
 04:33:27   GameMenu  [1] Spawner
 04:33:27   GameMenu Spawner.cs
 04:33:39   Compiler/facepunch.testbed.editor Broken Reference: package.facepunch.testbed (the compiler failed)
 04:33:39   GameMenu Unregister Assembly: [package.facepunch.testbed.editor, Version=0.0.107.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:41   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.107.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:47   Compiler/facepunch.testbed.editor Broken Reference: package.facepunch.testbed (the compiler failed)
 04:33:48   GameMenu Unregister Assembly: [package.facepunch.testbed.editor, Version=0.0.107.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:48   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:50   Compiler/facepunch.testbed.editor Broken Reference: package.facepunch.testbed (the compiler failed)
 04:33:50   GameMenu Unregister Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:50   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:51   Compiler/facepunch.testbed.editor Broken Reference: package.facepunch.testbed (the compiler failed)
 04:33:51   GameMenu Unregister Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:33:52   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:34:01   GameMenu [[GameMenu](arg:0)] Detected Asset File Changed /scenes/customer_returns.scene_c
 04:34:07   GameMenu Unregister Assembly: [package.facepunch.testbed, Version=0.0.103.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:34:07   GameMenu Unregister Assembly: [package.facepunch.testbed.editor, Version=0.0.111.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a static method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a static method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Unable to find matching substitution for a lambda method.
 04:34:07   hotload/GameMenu Cannot bind to the target method because its signature is not compatible with that of the delegate type.
 04:34:07   hotload/GameMenu Type handle 'GameObject' and method handle with declaring type 'GameObject' are incompatible. Get RuntimeMethodHandle and declaring RuntimeTypeHandle off the same MethodBase.
 04:34:07   hotload/GameMenu Type handle 'GameObject' and method handle with declaring type 'GameObject' are incompatible. Get RuntimeMethodHandle and declaring RuntimeTypeHandle off the same MethodBase.
 04:34:07   hotload/GameMenu  [4] Field '<RootObject>k__BackingField' defined on type 'PrefabFile' is not a field on the target object which is of type 'PrefabFile'.
 04:34:07   hotload/GameMenu  [18] Field '<GameObjects>k__BackingField' defined on type 'SceneFile' is not a field on the target object which is of type 'SceneFile'.
 04:34:07   hotload/GameMenu  [1] Field 'handleTexture' defined on type 'GameObject' is not a field on the target object which is of type 'Scene'.
 04:34:07   hotload/GameMenu Field 'handleTexture' defined on type 'GameObject' is not a field on the target object which is of type 'GameObject'.
 04:34:07   hotload/GameMenu The value "GameObject:Map" is not of type "GameObject" and cannot be used in this generic collection. (Parameter 'value')
 04:34:07   hotload/GameMenu Field 'handleTexture' defined on type 'GameObject' is not a field on the target object which is of type 'GameObject'.
 04:34:07   hotload/GameMenu The value "GameObject:Map" is not of type "GameObject" and cannot be used in this generic collection. (Parameter 'value')
 04:34:07   hotload/GameMenu Field 'handleTexture' defined on type 'GameObject' is not a field on the target object which is of type 'GameObject'.
 04:34:07   GameMenu Register Assembly: [package.facepunch.testbed, Version=0.0.117.0, Culture=neutral, PublicKeyToken=null](arg:0)
 04:34:07   GameMenu Register Assembly: [package.facepunch.testbed.editor, Version=0.0.118.0, Culture=neutral, PublicKeyToken=null](arg:0)

To Reproduce

  1. Launch S&box Testbed
  2. Create a new Scene asset.
  3. Create a new GameObject.
  4. Add a Custom Component to it.
  5. Trigger the hotload ~2-4 times.

Expected behavior

Hotload should crash less frequently. This actually impacts attempts to develop in the scene system.

Media/Files

No response

Additional context

No response

Metapyziks commented 1 year ago

Thanks for reporting, although I need some help reproducing this one.

Does it happen for you in a freshly cloned testbed without any code changes (before triggering the hotload)? Do you have fast hotload disabled? Is it important that you cause a compilation error before the change that hotloads, as in the video?

Metapyziks commented 1 year ago

Okay seems to happen in scenes with a MapComponent, after the map loads, if there were any errors during loading.

Metapyziks commented 1 year ago

Please let me know if you get anything similar again!