Repository: godot
Issue: Editor crashes after ~30sec after opening project
Labels: bug,needs testing,crash

### Tested versions

I think I've seen this issue since 4.0.

### System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.3734) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)

### Issue description

Editor randomly crashes after a while when project is already opened. Mostly it happens when first time launching after turning on computer. At most it happened 2x in a row.
This time I created a *.bat script with --verbose print and this is what I got
```
O:\Program Files\Godot\Godot_v4.2.1-stable_win64.exe>"Godot_v4.2.1-stable_win64.exe" --verbose
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Native OpenGL API detected: 3.3: NVIDIA - NVIDIA GeForce RTX 2070 SUPER
NVAPI: Init OK!
NVAPI: Disabled OpenGL threaded optimization successfully
Using "winink" pen tablet driver...
Shader 'CanvasSdfShaderGLES3' SHA256: 831821e746cff0158b5269d22ecbf2f475805fbeda670da86f1b183501f2a32a
Shader 'SkeletonShaderGLES3' SHA256: 8c782a5a5584c3ac14a566f1d2755807595d478c24252c60047dec258d90faac
Shader 'ParticlesShaderGLES3' SHA256: 1ed751bae0499c63fa52294d94f4521527ebe5922981c03065a1b7f79badea5e
Shader 'ParticlesCopyShaderGLES3' SHA256: b9e33d016f4464cf00543a346eb1a8e0ee48ce2ddd3f5ae000343879f806153d
Shader 'CopyShaderGLES3' SHA256: c9890a27b3c324b21924f42213bb2a389f4e46935a6a9a02097b7817df800fd1
Shader 'CanvasShaderGLES3' SHA256: be830b5a6c57d2a2d6230aeb2955d4ddaeefb76bfdb1a7bf6b6cd2ac15e28d6f
Shader 'CanvasOcclusionShaderGLES3' SHA256: 8122a195ef914cd664658a12aa97f1ffaa964eee995346bd99b4f987aeba92df
Shader 'SceneShaderGLES3' SHA256: c5001b4e484c459fc235b4c6a8778cbc48c92391705e727e469af3cdae8ca302
Shader 'SkyShaderGLES3' SHA256: e4040bba7ad6e9726ad9d2ab2f32acd0cde2a20771b9198ae73803aba444f95a
Shader 'CubemapFilterShaderGLES3' SHA256: 4f1883c27e6540c374d782e54abea7be1acb6bd799e830088a95cd6905890a37
OpenGL API 3.3.0 NVIDIA 537.34 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 2070 SUPER
WASAPI: Activated output_device using IAudioClient3 interface
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 44100
WASAPI: nAvgBytesPerSec = 352800
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: mix_rate = 44100
WASAPI: fundamental_period_frames = 441
WASAPI: min_period_frames = 441
WASAPI: max_period_frames = 441
WASAPI: selected a period frame size of 441
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 441 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 915626997
EDITOR API HASH: 1313472085
EditorSettings: Load OK!
Loaded system CA certificates
EditorSettings: Save OK!
Editing project: O:/Projects/Godot/CosplayPlatformer
EditorSettings: Save OK!
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"

O:\Program Files\Godot\Godot_v4.2.1-stable_win64.exe>pause
Press any key to continue . . . Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        Layer name GalaxyOverlayVkLayer does not conform to naming standard (Policy #LLP_LAYER_3)
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 1865184270352
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:264)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        Layer name GalaxyOverlayVkLayer_VERBOSE does not conform to naming standard (Policy #LLP_LAYER_3)
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 1865184270352
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:264)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        Layer name GalaxyOverlayVkLayer_DEBUG does not conform to naming standard (Policy #LLP_LAYER_3)
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 1865184270352
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:264)
Vulkan devices:
  #0: NVIDIA NVIDIA GeForce RTX 2070 SUPER - Supported, Discrete
Vulkan API 1.3.242 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2070 SUPER
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found
- Vulkan Variable Rate Shading supported:
  Pipeline fragment shading rate
  Primitive fragment shading rate
  Attachment fragment shading rate, min texel size: (16, 16), max texel size: (16, 16)
- Vulkan multiview supported:
  max view count: 32
  max instances: 134217727
- Vulkan subgroup:
  size: 32
  min size: 32
  max size: 32
  stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE_COMPUTE, STAGE_RAYGEN_KHR, STAGE_ANY_HIT_KHR, STAGE_CLOSEST_HIT_KHR, STAGE_MISS_KHR, STAGE_INTERSECTION_KHR, STAGE_CALLABLE_KHR, STAGE_TASK_NV, STAGE_MESH_NV
  supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELATIVE, FEATURE_CLUSTERED, FEATURE_QUAD, FEATURE_PARTITIONED_NV
  quad operations in all stages
Startup PSO cache (6.2 MiB)
Using "winink" pen tablet driver...
Creating VMA small objects pool for memory type index 1
Shader 'CanvasSdfShaderRD' (group 0) SHA256: ccda596da71a96af6897be3bc63633145694ec79105c5674ee719a025f168249
Shader 'SkeletonShaderRD' (group 0) SHA256: db547e2a7abfceddca6daece649af33b18189dc08eaa37cef9dc5860862b91ee
Shader 'SortShaderRD' (group 0) SHA256: 0635218ab1b23b93c0e100ad9a6fe7be993089593c96fb6f498e0f9d047ce9f4
Shader 'ParticlesShaderRD' (group 0) SHA256: bfea0e55dd78696fd416c3513873f5a94bc956c2a61b8292eb5d078690e41591
Shader 'ParticlesCopyShaderRD' (group 0) SHA256: b640b70d21ec3903c8e257f1d54ef3c64236018b36feffb7a955f8cbf2b977c4
Shader 'CanvasShaderRD' (group 0) SHA256: f2af9ca0e26c0e8049ed431865d8fd5d14faf79f1ba8dade11df8dbd611652c3
Shader 'CanvasOcclusionShaderRD' (group 0) SHA256: 6e1f14f7d04af941e1d2300431ef37d7e2742684dce4fbe7495def98a3b1cb4d
Shader 'ClusterRenderShaderRD' (group 0) SHA256: 2135e66bae082ab8c6b6d9b8513777bd4aae70f47ed40a170cc241c0696d57dd
Shader 'ClusterStoreShaderRD' (group 0) SHA256: e7c19c07bf7cf7209e469a9fbb06d30b27bf29d7ad91bc47e74e0631765b2d86
Shader 'ClusterDebugShaderRD' (group 0) SHA256: 96afdc9dc3999abd6dc9e98643b3d58644ec856e4fa4ea20f9f69e1b225d6af8
Shader 'SceneForwardClusteredShaderRD' (group 0) SHA256: d5ded1b6d087f9d205de57ed54272037445fd80bbbab48e31e53a3fe33da0710
Shader 'SceneForwardClusteredShaderRD' (group 1) SHA256: 48092b10c0c4dd4c2e716f8fc6f699428872bad85dd07c65b7903c8732acba2a
Shader 'SceneForwardClusteredShaderRD' (group 2) SHA256: 5878195f2ab9a62223312633ac117c7b61974128c353968d1e66c80efb298e03
Shader 'SceneForwardClusteredShaderRD' (group 3) SHA256: 13816f69baf68044a6820cb07e9d2c069d84975407c2560320b8a551545e42cb
Shader 'ResolveShaderRD' (group 0) SHA256: bbae2281243fdb9a2fc1e014df1debab098cfa3fcafe9ee75283d37df2d1fddf
Shader 'TaaResolveShaderRD' (group 0) SHA256: 75850220cf4a882155831df3c46894bb18d5c770308ec844ff00d09520802a9b
Shader 'Fsr2DepthClipPassShaderRD' (group 0) SHA256: 2830090de5d5209b66e51f2bab8566480a2115c0f1b50534f9a18ac00b9be4bd
Shader 'Fsr2ReconstructPreviousDepthPassShaderRD' (group 0) SHA256: 50cb1c922c840f610233f20009f23a81457ee61a0e4986a85e5c08a63ef7c6cf
Shader 'Fsr2LockPassShaderRD' (group 0) SHA256: d6dbbf3057a3df42cf35700040550925b590fa22b318da4e9dde695a9c9601bd
Shader 'Fsr2AccumulatePassShaderRD' (group 0) SHA256: 22be82431e6f4ca678118ab070b427f8ab2bac9cf229056893e06dbcf9b88115
Shader 'Fsr2RcasPassShaderRD' (group 0) SHA256: 618153e882d42170c18f28a260da6d5c589acded5900975af70585065a59e085
Shader 'Fsr2ComputeLuminancePyramidPassShaderRD' (group 0) SHA256: 9dcae72fdad619f6b0b4df518e764e82400773504dc6dc42dee94342522a2cb6
Shader 'Fsr2AutogenReactivePassShaderRD' (group 0) SHA256: 309b444059a2b40ba093bf12cc4b01b327ea377105f38fd3c9b62395b068c3e0
Shader 'Fsr2TcrAutogenPassShaderRD' (group 0) SHA256: c0cd163bbfd61c6a3eb0b3dd9ce53a8191ed96d9c49f766122816258c829426a
Shader 'SsEffectsDownsampleShaderRD' (group 0) SHA256: 33191663db775b3239324c8e7c70b322003c7ba4f3bf509584e1cdc8ce90ca14
Shader 'SsilShaderRD' (group 0) SHA256: 7fd8e5f50a5704489ee2a7c2a433125ad7fa0d3a259d399af638bce1edcb8450
Shader 'SsilImportanceMapShaderRD' (group 0) SHA256: 673bf3ed83df4540ff07c5b6592d8117847d322f44fc54c541a41052868672ad
Shader 'SsilBlurShaderRD' (group 0) SHA256: c4823d0e827d0dd34f66eeeb04a52753c801e7a782e63057003523827a7ebfac
Shader 'SsilInterleaveShaderRD' (group 0) SHA256: 18f771bd553cb304db576babd51d4c4cc63df20ac2052fb0e4133f9fbdf5aa3e
Shader 'SsaoShaderRD' (group 0) SHA256: 21e4ef08ca2c349ce5ab040c40233a23516ece7c756639d914d6617b909985b7
Shader 'SsaoImportanceMapShaderRD' (group 0) SHA256: fc0834566ddf20cc312e6a1eafc6e4ead6ebc5874b1beec4f8b7100879adf9b9
Shader 'SsaoBlurShaderRD' (group 0) SHA256: 6649d2399f3866ffbde70be4eae7644fbfe70907923fd36a10552342f768b48d
Shader 'SsaoInterleaveShaderRD' (group 0) SHA256: 1420d433267675277657dbe4a189eb1a8ee79b1dfbd47038e6acf926e1b3b91b
Shader 'ScreenSpaceReflectionScaleShaderRD' (group 0) SHA256: c17a8a99b2bfaf1a0e3fdeaf2afc912e685a8f581ca9ad3208b2637c78d43699
Shader 'ScreenSpaceReflectionShaderRD' (group 0) SHA256: b5d41ffd66ed21e4cb5bb10d7d6c9f1b2575907979e8577ecaadc91765c64733
Shader 'ScreenSpaceReflectionFilterShaderRD' (group 0) SHA256: 60f8b0befc8ae01c09adc3d4b34f7900bc1430b089054913d923605e7a0ca9c4
Shader 'SubsurfaceScatteringShaderRD' (group 0) SHA256: 91e1ac945dad61f48411d0a1244e6636634e9785333c014ac318fcee04b72741Shader 'SkyShaderRD' (group 0) SHA256: c773b40a48cb349a2f34006aace7b0ef1aaa8fad530160990a9634fcf019aebe
Shader 'VoxelGiShaderRD' (group 0) SHA256: 26adaa157a0dbc77aaeb10cd9840a3cfeddb4699002202c4069ea0aca1b684eb
Shader 'VoxelGiDebugShaderRD' (group 0) SHA256: 10e6f56ab62c32c6283301052f7f3efd8733a2dd8c54b5c8e8875b4019be3530
Shader 'SdfgiPreprocessShaderRD' (group 0) SHA256: 5d3bf192407ce0131d8d17e264d302c13eb17f8284e643e96071c3c2f09b45a8
Shader 'SdfgiDirectLightShaderRD' (group 0) SHA256: 2d9e0cdb42a45dcec8d6fa71bc0e820405887a0f06b540f9cfb9a3d5b0d05c53
Shader 'SdfgiIntegrateShaderRD' (group 0) SHA256: 15a2e64db17d8aafc8f3d8d2a528747c64d294e8034e7b9e4e86e5ee994d66c2
Shader 'GiShaderRD' (group 0) SHA256: fc70dbaf4b894ea97a0300ec38724bb52936be2bd53a8e3d056f28d9938a1c87
Shader 'SdfgiDebugShaderRD' (group 0) SHA256: 1d7fbd21ccb6e9825acc51d893c06bb4030178286b008b840821fd317fc5302b
Shader 'SdfgiDebugProbesShaderRD' (group 0) SHA256: 90121919d39f8150a9149d5e7eca75d0f2b06d679f544f696bdb941a6cf51810
Shader 'VolumetricFogShaderRD' (group 0) SHA256: c6ff2f4ac52f1179cd0f6c29737304d12ed6b90feae4187f34b38d5228ae1765
Shader 'VolumetricFogProcessShaderRD' (group 0) SHA256: 8d17101913be2888afe1d04fa9287ce1137a8385e86202f4b2a3c6946d3d8982Shader 'BokehDofShaderRD' (group 0) SHA256: c8b02e9d9aed942a821d35f533288d4fd0a2faaf2c7b58b53c8a92c6c3544feb
Shader 'CopyShaderRD' (group 0) SHA256: b3d9672c50ef509a18599d840e170b4531f88fdffb8f3b73d085bf572599743d
Shader 'CopyToFbShaderRD' (group 0) SHA256: 100799ce54eea0950d2a761842afbdb825c4274cd7ae712042a99dd1738b306b
Shader 'CubeToDpShaderRD' (group 0) SHA256: 660d8fbdedf9d936fc5b9136a097854da9e921113edfdd404a556bcd4fad6f8a
Shader 'CubemapDownsamplerShaderRD' (group 0) SHA256: 7fa47c7b9bdb49d907907d1270a1c655307ed89c6d440c039a74c00a0f65519e
Shader 'CubemapFilterShaderRD' (group 0) SHA256: 1f5612e43bd985ba7545d1f652d72bb4a8251a8320475ebca00f62518d75f98b
Shader 'CubemapRoughnessShaderRD' (group 0) SHA256: 10ad3612c713073a9477ce1395ccb37e510a332370ed0c0a810e1a066533c13a
Shader 'SpecularMergeShaderRD' (group 0) SHA256: fee8ef8ea7ed18eeeebcfa2a626d54c6a503d5b75a9d775d7fb17a7e2dddc698
Shader 'ShadowFrustumShaderRD' (group 0) SHA256: 12fb0f35abe27d7c2578b5bdeaf4517d45f710f9b66ab66f57794d77f90c2fd5
Shader 'MotionVectorsShaderRD' (group 0) SHA256: ca45f570f7b085fd508662270a09a17e42436227dd37e8f5a22034bbb70d8a94
Shader 'LuminanceReduceShaderRD' (group 0) SHA256: ad94b0824e25b988f4792cd9be4cb80f042918016d83b4d9683034bbeffdd811
Shader 'TonemapShaderRD' (group 0) SHA256: 886811888c9b1fc45eecfdd383f8c7087ea62f74178fadb6ff561a568aade71b
Shader 'VrsShaderRD' (group 0) SHA256: b747acdb722b2faf724266877a5336a0141453c1632b280cdff87b47c108f7c9
Shader 'FsrUpscaleShaderRD' (group 0) SHA256: 5d97f0e27e6b49e530b561b06452e04bbf6b4763e0b831ea8650c098644f446a
Shader 'BlitShaderRD' (group 0) SHA256: 72c6e59fbd6bdca88a055003cd3614ebdbc4b9fed5efefb796128c188d379986
WASAPI: Activated output_device using IAudioClient3 interface
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 44100
WASAPI: nAvgBytesPerSec = 352800
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: mix_rate = 44100
WASAPI: fundamental_period_frames = 441
WASAPI: min_period_frames = 441
WASAPI: max_period_frames = 441
WASAPI: selected a period frame size of 441
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 441 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 915626997
EDITOR API HASH: 1313472085
EditorSettings: Load OK!
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
Loaded system CA certificates
Creating VMA small objects pool for memory type index 3
EditorSettings: Save OK!
ERROR: Parameter "tex" is null.
   at: texture_replace (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1362)
ERROR: Parameter "tex" is null.
   at: texture_replace (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1362)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERROR: Attempted to free invalid ID: 768000282083465
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8565)
ERRO
```

### Steps to reproduce

- open a Godot project after turning on computer rises chance of crash (~80%)

### Minimal reproduction project (MRP)

NA