Exception is thrown ("invalid vector subscript") when loading textures after calling UnloadAllTextureAssets(). The exception comes from line 437 in ShaderStorage.cpp where we attempt to access a vector element within the static TextureArrayBufferStorage that has been cleared.
Easy to reproduce with the sample test: ./Sample --run-test.
Commenting out texture unloading in the test (line 99 in SmokeTest.cpp) allows the test to pass, so it doesn't look like other handle types are having problems (we clear all asset types). (After looking again, it looks like this ought to an issue for CubeMaps also?).
I haven't fully grokked the flow yet, so I'm uncertain on what correct behavior is. Maybe either the handling of a 'clear' event should be different, or 'clear' shouldn't be sent in the 'unload all' case.
This is due to incorrect handling of asset clear events. WIP branch here, which includes some other fixes - bug in sparse_map and potential bug with asset ids being cached as std::string_view.
Exception is thrown ("invalid vector subscript") when loading textures after calling
UnloadAllTextureAssets()
. The exception comes from line 437 in ShaderStorage.cpp where we attempt to access a vector element within the staticTextureArrayBufferStorage
that has been cleared.Easy to reproduce with the sample test:
./Sample --run-test
.Commenting out texture unloading in the test (line 99 in SmokeTest.cpp) allows the test to pass, so it doesn't look like other handle types are having problems (we clear all asset types). (After looking again, it looks like this ought to an issue for CubeMaps also?).
I haven't fully grokked the flow yet, so I'm uncertain on what correct behavior is. Maybe either the handling of a 'clear' event should be different, or 'clear' shouldn't be sent in the 'unload all' case.