Release Export of the game crashes at start

Godot Version

Godot 4.3 - custom build ( very close to Stable )

Question

I am working on a game and I have compiled my own version of the engine
Nothing much changed at engine level, just added an extra module with couple new nodes and wanted to rip some parts of the engine off like 3D Module ( disable_3d = “yes” ) since the game is in 2D

The issue is that the game works well in editor and debug export, but crashes the moment it starts when exporting with release.

I made sure to run the game with --verbose but all I get is:

Godot Engine v4.3.dev.custom_build
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
USER WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.
	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 3196313181376
   at: RenderingContextDriverVulkan::_debug_messenger_callback (drivers\vulkan\rendering_context_driver_vulkan.cpp:305)
Devices:
  #0: NVIDIA NVIDIA GeForce RTX 3060 Laptop GPU - Supported, Discrete
- 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), max fragment size: (4, 4)
- 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
Vulkan 1.3.289 - Forward Mobile - Using Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Laptop GPU
Startup PSO cache (1.5 MiB)
Using "winink" pen tablet driver...
Creating VMA small objects pool for memory type index 1
Shader 'CanvasSdfShaderRD' (group 0) SHA256: 08d9643910d5f3a938ee6ce5f871c478c2b5d7dac9a560a5daad3653c406e05b
Shader 'SkeletonShaderRD' (group 0) SHA256: 5a241a5b5545675a41f7cbce72e23318903da1a4437d07f44e11f6c39bc9ff87
Shader 'SortShaderRD' (group 0) SHA256: 597be6b3136b261d54d9db39336c6b7e8350b913331af303a63f395220f8d668
Shader 'ParticlesShaderRD' (group 0) SHA256: 0a69f2e0236dbe06fc52aba0df52949f885e19e6d7d7d4c213580e23fdf0014e
Shader 'ParticlesCopyShaderRD' (group 0) SHA256: 4ac9724d156b41ca66a41b664c9558a4a5e817b284aa63e2c0c81d32b1e5078f
Shader 'CanvasShaderRD' (group 0) SHA256: a42b7be341172259a9106eb9bdbc8e2677056a377b6d08af283c9ab99c07a11e
Shader 'CanvasOcclusionShaderRD' (group 0) SHA256: 54ad09fb7d5517b89bd69519597b207bb7259213cff8d0e36555418f59874652
Shader 'SceneForwardMobileShaderRD' (group 0) SHA256: 494ca6cc88068754fad8e743ce51b811c1e6f2955f1ba1b563ef371990faae2f
Shader 'SkyShaderRD' (group 0) SHA256: 40a97e995e9bb8142377be31d38018112df14b5b45308f2d28a8cef79bc99527
Shader 'BokehDofRasterShaderRD' (group 0) SHA256: 6ca7b542f47e47ffb890bffeb64323c058130e1ee74d8baf84d483042e506cc9
Shader 'BlurRasterShaderRD' (group 0) SHA256: 40c265c192f3825a954282cfa599e78c77c2c527fd80a4004741ec360819a1f4
Shader 'CopyShaderRD' (group 0) SHA256: a8ace08ec726a3bde056de588386a2eee126ad9be15183481608dc334fb36c6e
Shader 'CopyToFbShaderRD' (group 0) SHA256: b4936c8ba2d39cf0ee9cb57fdb5fa6b1464e2cbfffc58f805953c19d1bad7142
Shader 'CubeToDpShaderRD' (group 0) SHA256: a615671cbe009b8fa048efb3850bf9f8dbada60ef43157db7eacbf8abb0825ad
Shader 'CubemapDownsamplerRasterShaderRD' (group 0) SHA256: 9d95142bb6c471299fd466bda21951ae4f8492e5da3907bd571a060fdc3cb2fb
Shader 'CubemapFilterRasterShaderRD' (group 0) SHA256: e815aa7c636a208206981f170473dfd88fd6f34c8d52ce15fa896b3d679cc72b
Shader 'CubemapRoughnessRasterShaderRD' (group 0) SHA256: f53c8557ac45dddb3e3352230fdf69378cfcfbfb919c359beec2ea17e81b92e7
Shader 'SpecularMergeShaderRD' (group 0) SHA256: ec3d13993a816dbe0f32eee78dc87ce0883aa92c21d369f299eedc82683891b9
Shader 'ShadowFrustumShaderRD' (group 0) SHA256: f56deffe2593b8e33a95c20eed22fd90284c588421672e4b7b54394d618a0aa2
Shader 'MotionVectorsShaderRD' (group 0) SHA256: b5583d6fad826307b0ea64a201b5783de5465d6c4930caa0114e447e6a14ba8f
Shader 'LuminanceReduceRasterShaderRD' (group 0) SHA256: 4edac58a574e0fa3571632d2a69f9b3efe752cd9f8626629af4bfa6ad3d70cc2
Shader 'TonemapShaderRD' (group 0) SHA256: 10effb712eb7c15587fb2e606a35f0a36c63b2819502c400ae4468b33d66c603
Shader 'VrsShaderRD' (group 0) SHA256: 023ffdb56c846db543c432f5ba1090608209a3eaf6f924291270133e65d16233
Shader 'BlitShaderRD' (group 0) SHA256: 473f05b074f36bb848ca87ad672908a7c009d3e910e56c11d83ac835fba46b80
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

Using present mode: Enabled
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 0
EDITOR API HASH: 0
Loaded system CA certificates
Using present mode: Enabled
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"

I am using Mobile Rendering
All my assets/resources/scenes are in snake_case

I have created the visual studio studio solution with:

scons platform=windows vsproj=yes deprecated=no

And the release export template with:

scons platform=windows deprecated=no production=yes target=template_release arch=x86_64

I have also tried t remove production=yes and to add the following commands to the release export template command, but no luck:

debug_symbols=true werror=yes verbose=yes warnings=extra

I have tried to attach to the process and also compiled release_template on Visual Studio and start attached, but no breakpoints get hit before the game crashes.

I am sure I am missing something simple to be able to see what is going on ( an error at least :sweat_smile: ) or to be able to attach with VStudio ( probably missing some command )

Hope someone can help! :smiley:
Thank you!

What happens if you use the default export template?

Assumed it would not work since it would be missing my classes, but gave it a shot anyway and got what I expected

Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
USER WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.
	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2532012101984
   at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:305)
Devices:
  #0: NVIDIA NVIDIA GeForce RTX 3060 Laptop GPU - Supported, Discrete
- 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), max fragment size: (4, 4)
- 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_ARITHMEERROR: 1 RID allocations of type 'N10RendererRD14TextureStorage7TextureE' were leaked at exit.
USER ERROR: Parameter "RenderingServer::get_singleton()" is null.
   at: ~CompressedTexture2D (scene/resources/compressed_texture.cpp:464)
USER WARNING: 2 RIDs of type "Texture" were leaked.
   at: finalize (servers/rendering/rendering_device.cpp:5758)
emory type index 1
Shader 'CanvasSdfShaderRD' (group 0) SHA256: f65579ae334cdfb6901aee2527afd18ed626d1067a35c91f12fb632b45ce7f21
Shader 'SkeletonShaderRD' (group 0) SHA256: 4964fd59acf4406110ae7bca4b716f23ae52cc19864e21a8a35aee53e141e17e
Shader 'SortShaderRD' (group 0) SHA256: 0b1e36114ab5330dc340cc740b0b946ed2dbf43098119b8d29cfa0222da18b7a
Shader 'ParticlesShaderRD' (group 0) SHA256: 47fcf57848349fdf54197e5c1f64750a69c8d54787d3509ade4781c9faa31654
Shader 'ParticlesCopyShaderRD' (group 0) SHA256: 69566a7b0235d75ec40f504cd5555856aace22b5273899269166fde57287d26e
Shader 'CanvasShaderRD' (group 0) SHA256: 165f6964cfc63fea91c4221f04e7b8a54b5dc39d76b5a57aed5f99b20050b148
Shader 'CanvasOcclusionShaderRD' (group 0) SHA256: 42f2245b35206bcace1cda9e39e9282519e9967978ba6d5956472809525b1150
Shader 'SceneForwardMobileShaderRD' (group 0) SHA256: e902df56af9ca9d9d9416d71378d35cb342cbc94502027ef4929feede81891a9
Shader 'SkyShaderRD' (group 0) SHA256: 4bc541bfde1c30032df77bb4c98974909ad0368d22557f44e6cf095b26c0490a
Shader 'BokehDofRasterShaderRD' (group 0) SHA256: f30ffa9b63b7111cdeebc9cfd845e16bce37fb3def0098b0ea4291c5cba4c56c
Shader 'BlurRasterShaderRD' (group 0) SHA256: 1491fde07959e0231c42129c86e0b36750d05d340fa12a234e747a34c291ab85
Shader 'CopyShaderRD' (group 0) SHA256: 4a43f34799f84bc5a387aff816d36330149d91299172af9be2d3ab05cc0c4e9d
Shader 'CopyToFbShaderRD' (group 0) SHA256: 8668028c5ceed89276611359329de4a0f5d40702546caecc31456f63f6f9ffe8
Shader 'CubeToDpShaderRD' (group 0) SHA256: e3db5adc31b15e80112f4d7497dc8563c39b7d64675a53dcce7f9511c5ca9f80
Shader 'CubemapDownsamplerRasterShaderRD' (group 0) SHA256: 7b25ae2b6822705c2714ecbc0e14d2af08ab7d08e88a1c3b7fa0ecc9bb281250
Shader 'CubemapFilterRasterShaderRD' (group 0) SHA256: 41fc5058a6a86412a99e75cfc00cb64be45eb0aa6d46278a0a0355ed01bc5487
Shader 'CubemapRoughnessRasterShaderRD' (group 0) SHA256: 2b317415ef9a47a49583fda31b04795e8751db94b488132f8816daa29362958a
Shader 'SpecularMergeShaderRD' (group 0) SHA256: a119881bb41d0ec2f36a7f060866ec38b88afa6d0e484a431c65b35b5a2e820b
Shader 'ShadowFrustumShaderRD' (group 0) SHA256: c9c1b6421f8f6625effc9ddfa4bb2c09cafda0942b62fb8e1414e90820e18fa0
Shader 'MotionVectorsShaderRD' (group 0) SHA256: cbf3cbdcba0d0a2026c9fbf248556f1acd11beacc38a2e8c5ce7009ee49a1560
Shader 'LuminanceReduceRasterShaderRD' (group 0) SHA256: 3ccd96a23701d47b6b28640ac3624f391cf503bff4453adcf9486ce1f753c572
Shader 'TonemapShaderRD' (group 0) SHA256: 1c4748b3de350503048a1f9eca4f1dc2b308086460692ea0a81bababfd80542a
Shader 'VrsShaderRD' (group 0) SHA256: def705023965d273a669c1ac6acfd7494138bde25b3e3bde0969c3c7a32c3aae
Shader 'BlitShaderRD' (group 0) SHA256: 09b63e5347ccb6779fd79e54b093cfc915ec80510efa1f613c9ada9ff2e0f70d
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

Using present mode: Enabled
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 0
EDITOR API HASH: 0
USER ERROR: Cannot get class 'SceneTransitionManager'.
   at: _instantiate_internal (core/object/class_db.cpp:515)
USER WARNING: Node scene_transition of type SceneTransitionManager cannot be created. A placeholder will be created instead.
   at: instantiate (scene/resources/packed_scene.cpp:277)
Loaded system CA certificates
USER ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSolveIslands
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSetup
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: _compression
   at: unref (core/string/string_name.cpp:127)
USER ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)

Game did not crash, but nothing would happen, just black screen

That’s good info. It means that the problem is most likely not your custom export template, plus there’s more debug info now.

Just for more info, what happens if you change the rendering mode and export?

Rendering mode has no effect ( same result )

Debug export - works, nothing different in the log with --verbose
Release export - crashes

Manage to figure out what was crashing the game ( basically an optimization I have done was missing a return statement and would crash it… I was sure it was something dumb and just needed to debug it )

In case someone finds this thread with the same issue just leaving a summary of what I have done to debug the release exported build:

  1. Compiled release_template ( make sure you have the debug symbols - *.pdb )
scons target=template_release platform=windows dev_build=yes vsproj=yes 
  1. Export the project in the editor using the release template I just created

  2. From here I could attach to the game from VS, but since the bug would happen to fast I added a delay in the main function so I had time to attach

Thing I was missing was that the vsproj was targeted as editor not as a release template and that was messing up the debugging.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.