ERROR: Memory::alloc_static: Condition "!mem" is true. Returned: 0

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Keeroh

I am having a pretty weird problem on godot 3.2.3 where it suddenly crashes on both the editor and on the .exe file, but they give different errors on each one and I don’t know what I can do to fix it. One thing I noticed is that these crashes only happen during certain scenes. I can play the main menu and level select scenes without a problem, but any level may or may not crash without any warning and I have to play scene until it decides to work.

On the editor it shows this error:

ERROR: Memory::alloc_static: Condition “!mem” is true. Returned: 0
At: core\os\memory.cpp:84
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on Issues · godotengine/godot · GitHub
[0] DynamicFontAtSize::_bitmap_to_character (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:503)
[1] DynamicFontAtSize::get_char_size (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:284)
[2] DynamicFont::get_char_size (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:886)
[3] Font::get_string_size (c:\godot\godot-3.2.3-stable\scene\resources\font.cpp:493)
[4] Button::get_minimum_size (c:\godot\godot-3.2.3-stable\scene\gui\button.cpp:38)
[5] Control::get_combined_minimum_size (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:197)
[6] Control::_size_changed (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:1371)
[7] Control::_notification (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:483)
[8] Control::_notificationv (c:\godot\godot-3.2.3-stable\scene\gui\control.h:48)
[9] Button::_notificationv (c:\godot\godot-3.2.3-stable\scene\gui\button.h:38)
[10] Object::notification (c:\godot\godot-3.2.3-stable\core\object.cpp:934)
[11] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:194)
[12] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[13] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[14] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[15] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[16] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[17] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[18] Node::_set_tree (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:2574)
[19] Node::_add_child_nocheck (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:1168)
[20] Node::add_child (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:1183)
[21] SceneTree::_change_scene (c:\godot\godot-3.2.3-stable\scene\main\scene_tree.cpp:1297)
[22] MethodBind1<SceneTree,Node *>::call (c:\godot\godot-3.2.3-stable\core\method_bind.gen.inc:867)
[23] Object::call (c:\godot\godot-3.2.3-stable\core\object.cpp:922)
[24] MessageQueue::_call_function (c:\godot\godot-3.2.3-stable\core\message_queue.cpp:250)
[25] MessageQueue::flush (c:\godot\godot-3.2.3-stable\core\message_queue.cpp:316)
[26] SceneTree::idle (c:\godot\godot-3.2.3-stable\scene\main\scene_tree.cpp:538)
[27] Main::iteration (c:\godot\godot-3.2.3-stable\main\main.cpp:2107)
[28] OS_Windows::run (c:\godot\godot-3.2.3-stable\platform\windows\os_windows.cpp:3397)
[29] widechar_main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:162)
[30] _main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:184)
[31] main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:196)
[32] __scrt_common_main_seh (d:\agent_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[33] BaseThreadInitThunk
[34] RtlGetAppContainerNamedObjectPath
– END OF BACKTRACE –
Running: C:\godot\godot-3.2.3-stable\bin\godot.windows.opt.tools.32.exe --path C:/Users/Pichau/Desktop/godot_games/spellthief%20erinn-20200917T233212Z-001/spellthief%20erinn/spellthief%20erinn --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 2292 --position 1680,945 res://scenes/Tower.tscn
Godot Engine v3.2.3.stable.custom_build - https://godotengine.org
OpenGL ES 3.0 Renderer: Radeon ™ RX 480 Graphics

WARNING: SceneTree::_update_root_rect: Font oversampling only works with the resize modes ‘Keep Width’, ‘Keep Height’, and ‘Expand’.
At: scene\main\scene_tree.cpp:1153
ERROR: Cannot open file with icon ‘res://Sprites/ERINN_ICON_32x32.ico’.
At: platform\windows\os_windows.cpp:2958
Setting breakpad minidump AppID = 1474050
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198050174788 [API loaded no]
Did Steam initialize?: {status:0, verbal:Steamworks active.}
Steam API start
cloud: 0
cloud is enabled: True
level 2
stars 0
stars 0
ERROR: Memory::alloc_static: Condition “!mem” is true. Returned: 0
At: core\os\memory.cpp:84
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on Issues · godotengine/godot · GitHub
[0] DynamicFontAtSize::_bitmap_to_character (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:503)
[1] DynamicFontAtSize::get_char_size (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:284)
[2] DynamicFont::get_char_size (c:\godot\godot-3.2.3-stable\scene\resources\dynamic_font.cpp:886)
[3] Font::get_string_size (c:\godot\godot-3.2.3-stable\scene\resources\font.cpp:493)
[4] Button::get_minimum_size (c:\godot\godot-3.2.3-stable\scene\gui\button.cpp:38)
[5] Control::get_combined_minimum_size (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:197)
[6] Control::_size_changed (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:1371)
[7] Control::_notification (c:\godot\godot-3.2.3-stable\scene\gui\control.cpp:483)
[8] Control::_notificationv (c:\godot\godot-3.2.3-stable\scene\gui\control.h:48)
[9] Button::_notificationv (c:\godot\godot-3.2.3-stable\scene\gui\button.h:38)
[10] Object::notification (c:\godot\godot-3.2.3-stable\core\object.cpp:934)
[11] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:194)
[12] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[13] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[14] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[15] Node::_propagate_ready (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:188)
[16] Node::_set_tree (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:2574)
[17] Node::_add_child_nocheck (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:1168)
[18] Node::add_child (c:\godot\godot-3.2.3-stable\scene\main\node.cpp:1183)
[19] SceneTree::_change_scene (c:\godot\godot-3.2.3-stable\scene\main\scene_tree.cpp:1297)
[20] MethodBind1<SceneTree,Node *>::call (c:\godot\godot-3.2.3-stable\core\method_bind.gen.inc:867)
[21] Object::call (c:\godot\godot-3.2.3-stable\core\object.cpp:922)
[22] MessageQueue::_call_function (c:\godot\godot-3.2.3-stable\core\message_queue.cpp:250)
[23] MessageQueue::flush (c:\godot\godot-3.2.3-stable\core\message_queue.cpp:316)
[24] SceneTree::idle (c:\godot\godot-3.2.3-stable\scene\main\scene_tree.cpp:538)
[25] Main::iteration (c:\godot\godot-3.2.3-stable\main\main.cpp:2107)
[26] OS_Windows::run (c:\godot\godot-3.2.3-stable\platform\windows\os_windows.cpp:3397)
[27] widechar_main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:162)
[28] _main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:184)
[29] main (c:\godot\godot-3.2.3-stable\platform\windows\godot_windows.cpp:196)
[30] __scrt_common_main_seh (d:\agent_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[31] BaseThreadInitThunk
[32] RtlGetAppContainerNamedObjectPath
[33] RtlGetAppContainerNamedObjectPath
– END OF BACKTRACE –

And on the .exe file it shows this error:

ERROR: Invalid color code: fffff.
At: core\color.cpp:343
ERROR: Invalid color code: fffff.
At: core\color.cpp:343
ERROR: Invalid color code: fffff.
At: core\color.cpp:343
ERROR: Invalid color code: fffff.
At: core\color.cpp:343
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-144b6724f61b5fb325ed9990fad6cb65.png’.
At: core\io\image_loader.cpp:56
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-2981faf07b6e58644e9c89b387a31181.png’.
At: core\io\image_loader.cpp:56
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-d8974367f270dd9acd37a851256d58ba.png’.
At: core\io\image_loader.cpp:56
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-4992266c535947ea8597cc6d9de50019.png’.
At: core\io\image_loader.cpp:56
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-aa10370b284a3dbbd10674618bbe4d7f.png’.
At: core\io\image_loader.cpp:56
ERROR: ImageLoader::load_image: Error opening file ‘C:\Users\Pichau\AppData\Local\Temp/Godot/resthumb-b2393e2c7f63ce2ee1fc1c6fe59cd64c.png’.
At: core\io\image_loader.cpp:56
ERROR: ResourceInteractiveLoaderText::recognize: res://default_env.tres:1 - Parse Error:
At: scene\resources\resource_format_text.cpp:1190
ERROR: Invalid color code: fffff.
At: core\color.cpp:343