-
Notifications
You must be signed in to change notification settings - Fork 0
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
attempt to reproduce a crash with a more complex example #26
base: RapierContext_Component
Are you sure you want to change the base?
attempt to reproduce a crash with a more complex example #26
Conversation
src/pipeline/events.rs
Outdated
.map(|co| Entity::from_bits(co.user_data as u64)) | ||
.or_else(|| self.deleted_colliders.get(&handle).copied()) | ||
.expect("Internal error: entity not found for collision event.") | ||
.get_unknown_gen(handle_index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a possible fix: bypassing generational check. I'm not sure generation is very important for mapping colliders to entities 🤔 ; for a collider to change entity, we'd need either very cursed code, as from my understanding it would recreate a new collider within rapier (so another index).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my assumption is correct, we could simplify this mapping to map to index only rather than index + generation 💭 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems completely incorrect ; generation is updated when we remove an entry, so it's needed to be sure we're targeting the correct entity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal error: entity not found for collision event with collider handle: ColliderHandle(Index { index: 0, generation: 0 }).
is interesting:
There shouldn't be a generation 0 ; not after the first step 🤔 (maybe even not ever?) ; it seems to mean the arena grew unexpectedly
No description provided.