Fix 'Attempted to remove invalid ID' errors

This commit is contained in:
Rafał Mikrut 2021-07-31 08:52:50 +02:00
parent f2efa6f4f3
commit e8877806ec
4 changed files with 18 additions and 18 deletions

View file

@ -70,12 +70,12 @@ jobs:
run: |
./bin/godot.linuxbsd.opt.tools.64 --test
# Download, unzip and setup SwiftShader library [d4550ab8d3f]
# Download, unzip and setup SwiftShader library [4466040]
- name: Download SwiftShader
run: |
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip
unzip swiftshader.zip
rm swiftshader.zip
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader2.zip
unzip swiftshader2.zip
rm swiftshader2.zip
curr="$(pwd)/libvk_swiftshader.so"
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json
@ -144,12 +144,10 @@ jobs:
scons --version
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
# [Workaround] SwiftShader doesn't support tessellation, so we skip Godot check about it
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
sed -i "s|ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|//ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|" drivers/vulkan/rendering_device_vulkan.cpp
scons tools=yes tests=yes target=debug debug_symbols=no use_asan=yes use_ubsan=yes
ls -l bin/
@ -158,12 +156,12 @@ jobs:
run: |
./bin/godot.linuxbsd.tools.64s --test
# Download, unzip and setup SwiftShader library [d4550ab8d3f]
# Download, unzip and setup SwiftShader library [4466040]
- name: Download SwiftShader
run: |
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip
unzip swiftshader.zip
rm swiftshader.zip
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader2.zip
unzip swiftshader2.zip
rm swiftshader2.zip
curr="$(pwd)/libvk_swiftshader.so"
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json

View file

@ -5,7 +5,7 @@ import sys
if len(sys.argv) < 2:
print("ERROR: You must run program with file name as argument.")
sys.exit(1)
sys.exit(50)
fname = sys.argv[1]
@ -17,7 +17,7 @@ file_contents = fileread.read()
if file_contents.find("ERROR: AddressSanitizer:") != -1:
print("FATAL ERROR: An incorrectly used memory was found.")
sys.exit(1)
sys.exit(51)
# There is also possible, that program crashed with or without backtrace.
@ -27,7 +27,7 @@ if (
or file_contents.find("Segmentation fault (core dumped)") != -1
):
print("FATAL ERROR: Godot has been crashed.")
sys.exit(1)
sys.exit(52)
# Finding memory leaks in Godot is quite difficult, because we need to take into
# account leaks also in external libraries. They are usually provided without
@ -38,7 +38,7 @@ if (
if file_contents.find("ERROR: LeakSanitizer:") != -1:
if file_contents.find("#4 0x") != -1:
print("ERROR: Memory leak was found")
sys.exit(1)
sys.exit(53)
# It may happen that Godot detects leaking nodes/resources and removes them, so
# this possibility should also be handled as a potential error, even if
@ -46,7 +46,7 @@ if file_contents.find("ERROR: LeakSanitizer:") != -1:
if file_contents.find("ObjectDB instances leaked at exit") != -1:
print("ERROR: Memory leak was found")
sys.exit(1)
sys.exit(54)
# In test project may be put several assert functions which will control if
# project is executed with right parameters etc. which normally will not stop
@ -54,7 +54,7 @@ if file_contents.find("ObjectDB instances leaked at exit") != -1:
if file_contents.find("Assertion failed") != -1:
print("ERROR: Assertion failed in project, check execution log for more info")
sys.exit(1)
sys.exit(55)
# For now Godot leaks a lot of rendering stuff so for now we just show info
# about it and this needs to be re-enabled after fixing this memory leaks.

View file

@ -222,7 +222,7 @@ void RendererCompositorRD::set_boot_image(const Ref<Image> &p_image, const Color
RD::get_singleton()->swap_buffers();
RD::get_singleton()->free(texture);
storage->free(texture);
}
RendererCompositorRD *RendererCompositorRD::singleton = nullptr;

View file

@ -146,7 +146,9 @@ void ShaderRD::_clear_version(Version *p_version) {
//clear versions if they exist
if (p_version->variants) {
for (int i = 0; i < variant_defines.size(); i++) {
RD::get_singleton()->free(p_version->variants[i]);
if (variants_enabled[i]) {
RD::get_singleton()->free(p_version->variants[i]);
}
}
memdelete_arr(p_version->variants);