You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on physics system using Edyn for my engine, I see, that deleting an entity will lead to crash after creating new entity and run simulation
I tried to write minimal reproducible example - here it is
Assertion failed: valid(entity), file C:\src\vcpkg\installed\x64-windows\include\entt/entity/registry.hpp, line 895
Callstack of the crash
ucrtbased.dll!issue_debug_notification(const wchar_t * const message) Line 28 C++
ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 154 C++
ucrtbased.dll!abort() Line 61 C++
ucrtbased.dll!common_assert_to_stderr_direct(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number) Line 161 C++
ucrtbased.dll!common_assert_to_stderr<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number) Line 179 C++
ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 420 C++
ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444 C++
> ConsoleApplication4.exe!entt::basic_registry<enum entt::entity>::any_of<edyn::procedural_tag>(const entt::entity entity) Line 895 C++
ConsoleApplication4.exe!edyn::island_coordinator::init_new_nodes_and_edges() Line 167 C++
ConsoleApplication4.exe!edyn::island_coordinator::update() Line 803 C++
ConsoleApplication4.exe!edyn::update(entt::basic_registry<enum entt::entity> & registry) Line 67 C++
ConsoleApplication4.exe!main() Line 26 C++
[External Code]
You must not reuse an entity after it's destroyed using registry.destroy(entity), as it becomes an invalid entity identifier. You have to create a new entity using registry.create().
Oh sorry, I misread your code. I'll have to investigate further I guess. That looks like a bug in edyn::island_coordinator where it accumulates entities for later initialization, and there's the possibility that the entity was destroyed before being initialized in the call to edyn::update.
While working on physics system using Edyn for my engine, I see, that deleting an entity will lead to crash after creating new entity and run simulation
I tried to write minimal reproducible example - here it is
In console I see
Callstack of the crash
Edyn is build from sources from 4e497d7 commit
The text was updated successfully, but these errors were encountered: