-
-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access violation when using registry.clear<Component>() #1126
Comments
Yeah, a repro would help a lot, you know. |
Thank you for your response! I don't think I move the registry anywhere but I will check later by using your assert method. I create and clear the storage like this:
Then I use it via
|
Side note:
I suggest creating a registry.emplace<Renderable>(entity, ...); Get the storage once and use it again and again as in |
Oh, I didn't know that. So i could write this?
|
Just to make sure, I understand you correctly. I am not allowed to (or rather I shouldn't) do things like this:
|
Yeah, exactly. The view doesn't have to lookup the storage, so the check is faster overall and the lookup costs don't sum up.
Yes and no. thread 1: registry.emplace<T>();
thread 2: registry.emplace<U>(); This is ok in general but only if the pools already exist, so only after the first time. That said, I don't think this is your issue actually. You said that it runs fine a thousand times, then it breaks, right? |
Can I assume it was fixed? I don't have a repro nor other info since two weeks ago and I don't know how to help you further otherwise. So, I'm tempted to close the issue. |
Yes, thank you. It can be closed. I am sorry for not responding with proper info. I redesigned my code and probably eliminated my error, even though I don't know where it was exactly. Thank you very much for your suggestions. |
I'm glad you fixed it. Thanks for the quick turnaround. 👍 |
Hi there,
I am using entt 3.13.1 from vcpkg with MSVC 19.37.32825.0 and I get sometimes an access violation when using
.clear()
:Unfortunately, it only happens sometimes and I couldn't reproduce it yet with a minimal example. It runs thousands of times without a problem and suddenly crashes.
According to debug info, it fails in sparse_set.hpp, line 258:
I use the vanilla entt types and pools without any specific customisation, etc.
I am trying to reduce it down but it is quite difficult. If you have any ideas or tips, I would be very happy :-)
The text was updated successfully, but these errors were encountered: