Skip to content
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

Crash due to Entity doesn't exist in this World #318

Open
umut-sahin opened this issue Jan 30, 2024 · 1 comment
Open

Crash due to Entity doesn't exist in this World #318

umut-sahin opened this issue Jan 30, 2024 · 1 comment

Comments

@umut-sahin
Copy link

umut-sahin commented Jan 30, 2024

I'm not 100% sure this is caused by bevy_xpbd but I think it's possible.

In the game I'm developing, I'm spawning enemies and despawning them when certain things happen. One such case is when the game ends. Occasionally, my game is crashing with:

error[B0003]: Could not insert a bundle (of type `bevy_render::primitives::Aabb`) for entity ENTITY_ID because it doesn't exist in this World.

Can bevy_xpbd be the cause of it? I'm not touching Aabb at all, I don't think any of the libraries I use do that either (or maybe they do, like I said, I'm not sure).

What I think could be happening is that:

  • I'm spawning things
  • Before the next physics step, I despawn them
  • bevy_xpbd thinks the entities still exist and it tries to modify them
  • Bevy crashes because of it

Please let me know if this can be the case, or something else might be happening.

Thanks!

(here is the branch where I've encountered the issue lately: https://github.com/umut-sahin/mythmallow/tree/multiple-weapons)

@Jondolf
Copy link
Owner

Jondolf commented Feb 18, 2024

Hi! bevy_xpbd doesn't use Bevy's own AABB type at the moment, so this seems unrelated to me... It does insert components and such, but I don't see how that would cause this panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants