godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.08k stars 21.18k forks source link

Setting "stretch mode" to "canvas_items" and engine crashes with no logs #81748

Open DJMcMayhem opened 1 year ago

DJMcMayhem commented 1 year ago

Godot version

4.1.1

System information

Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1080 (NVIDIA; 31.0.15.3699) - Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (8 Threads)

Issue description

When I try to set my "stretch mode" to "canvas_items", the editor crashes every single time. This is not the only instance where the editor crashes, but it's the most easily reproducible. When I run with `--verbose-- I get the following output

C:\Program Files\Godot>Godot_v4.1.1-stable_win64.exe --verbose --editor --path "C:\Users\DJ\Documents\godot\2d Tutorial"

C:\Program Files\Godot>Godot Engine v4.1.1.stable.official.bd6af8e0e - 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 VK_LAYER_fpsmon uses API version 1.1 which is older than the application specified API version of 1.2. May cause issues.
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 1553899328432
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:264)
Vulkan devices:
  #0: NVIDIA NVIDIA GeForce GTX 1080 - Supported, Discrete
Vulkan API 1.3.242 - Forward Mobile - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080
Optional extension VK_KHR_fragment_shading_rate not found
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found
- Vulkan Variable Rate Shading not supported
- Vulkan multiview supported:
  max view count: 32
  max instances: 134217727
- Vulkan subgroup:
  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
  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 (0.7 MiB)
Using "winink" pen tablet driver...
Creating VMA small objects pool for memory type index 7
Shader 'CanvasSdfShaderRD' SHA256: 884841f2ed8f766f2ec50c7630bc034ee802170ea7afe00146eb9b501b6fe106
Shader 'SkeletonShaderRD' SHA256: 6bc2f8ef4b30b454ed825eb79818637020c3967eb512a04a9303e91d48c80a26
Shader 'SortShaderRD' SHA256: 412ea376207f1c650aff670638c1ba8c6602e7c6e2d023346389f03c9b898070
Shader 'ParticlesShaderRD' SHA256: f7ab6ccfa252be89882edb865a0c044053c5e338929dd6e1fa9e48d94dd7c7ac
Shader 'ParticlesCopyShaderRD' SHA256: 91b875446f6cb83730ece374de0d55df2b19a73640dea924f46a7da75d458103
Shader 'CanvasShaderRD' SHA256: 02e4d4e394d4d4d356a6056446b2ad3dce4a260af01de389e37159cb2919c0e3
Shader 'CanvasOcclusionShaderRD' SHA256: 7056555b40140d5d4fa7f634d9107d9b0c53f4988a9c267b12ecb2e9b79339bb
Shader 'SceneForwardMobileShaderRD' SHA256: 3e5918b7fe05045804bed1d50613f60ea184ef8ccfd7b0b8eb083837d586779f
Shader 'SkyShaderRD' SHA256: 3d7c408289bf826aba9dc433d32ba4c2bd222f07deb2921211ba48eac26fd9d6
Shader 'BokehDofRasterShaderRD' SHA256: e952107eba1b098faa865fc1eeaa8c03d89c8327a9bb8058a472f036198d30b9
Shader 'BlurRasterShaderRD' SHA256: 51e3f103167f76fe1406be06141712da5a68126f47fe9ce424625c61812bd7e6
Shader 'CopyToFbShaderRD' SHA256: 9df1b2798f0817a2808802d4571852bc2392ae4c17bd8718b77a7e6ab6771356
Shader 'CubeToDpShaderRD' SHA256: 4933c20de143e376182a3823bc5aba3697964d0d244feb80d739ee73b527c9f4
Shader 'CubemapDownsamplerRasterShaderRD' SHA256: a916c66293b36a3d06a089e2ed221d259896cbd2f5864e9f86c36aef7c3fc5eb
Shader 'CubemapFilterRasterShaderRD' SHA256: 07e95f3a3acedce67535aede85dcbf01d34ffdfdbafab012582284ed8ef586db
Shader 'CubemapRoughnessRasterShaderRD' SHA256: 1880d2242dcecef1ac32cca11f48694344fec49182c031498473f6e8673b2cba
Shader 'SpecularMergeShaderRD' SHA256: c6c4f2797a84a99cf42df508bdd4e026e53dbd67370214e4d536794687458926
Shader 'LuminanceReduceRasterShaderRD' SHA256: 29c283d3be078bb6f0612c2af53b90a5a1ce06d3d06f3a6489a25cbf1bf2b9c9
Shader 'TonemapShaderRD' SHA256: f0c47d5cefe95675f0e641e28994970040cc37f5261113c6b95258acadbb7cc7
Shader 'BlitShaderRD' SHA256: e5047fcefa30442783be734705aed10b8020504a66f92f63ed86bdf34970cde1
WASAPI: Activated output_device using IAudioClient3 interface
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: mix_rate = 48000
WASAPI: fundamental_period_frames = 480
WASAPI: min_period_frames = 480
WASAPI: max_period_frames = 480
WASAPI: selected a period frame size of 480
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 480 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 3144975361
EDITOR API HASH: 3555714656
Regenerating editor help cache
Class 'EditorPropertyNameProcessor' is not exposed, skipping.
Class 'FramebufferCacheRD' is not exposed, skipping.
Class 'GDScriptEditorTranslationParserPlugin' is not exposed, skipping.
Class 'GDScriptNativeClass' is not exposed, skipping.
Class 'GLTFDocumentExtensionPhysics' is not exposed, skipping.
Class 'GLTFDocumentExtensionTextureWebP' is not exposed, skipping.
Class 'GodotPhysicsServer2D' is not exposed, skipping.
Class 'GodotPhysicsServer3D' is not exposed, skipping.
Class 'IPUnix' is not exposed, skipping.
Class 'MovieWriterMJPEG' is not exposed, skipping.
Class 'MovieWriterPNGWAV' is not exposed, skipping.
Class 'ResourceFormatImporterSaver' is not exposed, skipping.
Class 'ResourceImporterMP3' is not exposed, skipping.
Class 'ResourceImporterOggVorbis' is not exposed, skipping.
Class 'SceneCacheInterface' is not exposed, skipping.
Class 'SceneRPCInterface' is not exposed, skipping.
Class 'SceneReplicationInterface' is not exposed, skipping.
Class 'UniformSetCacheRD' is not exposed, skipping.
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:73)
MbedTLS: Some X509 certificates could not be parsed (1 certificates skipped).
Loaded system CA certificates
Creating VMA small objects pool for memory type index 9
EditorSettings: Save OK!

C:\Program Files\Godot>

So no message related to the crash comes up. I have also checked %APPDATA%/Godot/app_userdata/ and there are no log files at all.

Steps to reproduce

Go to settings > window > stretch mode. Set to "canvas_items"

Minimal reproduction project

2d tutorial.zip

RealMadvicius commented 1 year ago

I tried to use your project and followed the steps but I couldn't manage to reproduce the crash. For me I could go in Project settings -> Display -> Window -> Stretching mode and set it to "canvas items" without any issue.

DJMcMayhem commented 1 year ago

It still crashes even if I make a brand new empty project. Do you have any thoughts on steps for troubleshooting that might reveal more information?

Calinou commented 1 year ago

Do you have MSAA or any other settings globally forced in the NVIDIA Control Panel?

Do you have third-party overlays that inject Vulkan layers and may cause issues, such as FPS Monitor or RTSS?

RealMadvicius commented 4 months ago

@DJMcMayhem are you still experiencing this issue ?

DJMcMayhem commented 4 months ago

@RealMadvicius Yes, this still reliably happens. However, I have stopped looking into it because I have found a work around. If I set the render settings to "Compatibility" then I get no more crashes. But it still reliably crashes when I go through the project settings menu on forward+ or mobile renderer.

Also, I have switched to using newer versions of godot in the meantime since I have raised this issue, so I can confirm that this still happens the same way for me on v4.2.1.stable.official [b09f793f5] v4.3.dev6.official [89850d553]

RealMadvicius commented 4 months ago

There is a feature on Windows that isnt enabled by default. It allows the system to auto generate a crash dump as soon as a specified app crashes. This is something I do use at my workplace, it is heaven savior for debugging these cases. Just remember to remove the entry in the registry once you are done debugging, else it will keep generate dumps at the specified location everytime the app crashes.

easier tutorial to follow, with picture reference: https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm

the official microsoft documentation about the feature: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps