Skip to content

Add NarrowPhase::set_query_dispatcher, skip serde for contact workspaces - #999

Open
Jondolf wants to merge 2 commits into
dimforge:masterfrom
Jondolf:narrow-phase-patches
Open

Jondolf wants to merge 2 commits into
dimforge:masterfrom
Jondolf:narrow-phase-patches

Conversation

@Jondolf

@Jondolf Jondolf commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Adds NarrowPhase::set_query_dispatcher. This is useful for snapshot restoration, because (de)serialization drops custom query dispatchers, and there's no other pre-existing way to set it without constructing a new NarrowPhase (as far as I know).

Also changes contact pairs to skip serialization for the contact workspace, which is transient and makes deserialization fail with "Cannot deserialize custom shape" for snapshots that contain custom shape contacts.

@sebcrozet sebcrozet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sebcrozet sebcrozet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we shouldn’t skip the serialization of workspace as that could break determinism if the workspace contains warmstarting for some internal algorithm.

Instead, the deserialization panic should be addressed (I’m thinking we should have a mechanism that sets the workspace to a dummy value for unknown types. The specific contact algorithm would then automatically overwrite that dummy value with its own proper workspace type at its next execution.)

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

Successfully merging this pull request may close these issues.

2 participants