I'd like to disable threading in v2 for debugging purposes, in the default bepu2 Demos.sln . I've deduced from the deterministic documentation that it's just a matter to avoid passing ThreadDispatcher to Simulation.Update
However when I do that, an Assert fail appears in Buffer.cs here:
Code: Select all
Debug.Assert(index >= 0 && index < length, "Index out of range.");
Code: Select all
BepuPhysics.dll!BepuPhysics.PoseIntegrator<Demos.DemoPoseIntegratorCallbacks>.IntegrateBodiesAndUpdateBoundingBoxes(int startIndex = 0, int endIndex = 0, float dt = 0.0166666675, ref BepuPhysics.BoundingBoxBatcher boundingBoxBatcher = {BepuPhysics.BoundingBoxBatcher}, int workerIndex = 0) Line 300 C#
BepuPhysics.dll!BepuPhysics.PoseIntegrator<Demos.DemoPoseIntegratorCallbacks>.IntegrateBodiesAndUpdateBoundingBoxes(float dt = 0.0166666675, BepuUtilities.Memory.BufferPool pool = {BepuUtilities.Memory.BufferPool}, BepuUtilities.IThreadDispatcher threadDispatcher = null) Line 556 C#
BepuPhysics.dll!BepuPhysics.Simulation.IntegrateBodiesAndUpdateBoundingBoxes(float dt = 0.0166666675, BepuUtilities.IThreadDispatcher threadDispatcher = null) Line 212 C#
BepuPhysics.dll!BepuPhysics.PositionFirstTimestepper.Timestep(BepuPhysics.Simulation simulation = {BepuPhysics.Simulation}, float dt = 0.0166666675, BepuUtilities.IThreadDispatcher threadDispatcher = null) Line 59 C#
BepuPhysics.dll!BepuPhysics.Simulation.Timestep(float dt = 0.0166666675, BepuUtilities.IThreadDispatcher threadDispatcher = null) Line 344 C#
Demos.dll!Demos.Demo.Update(DemoUtilities.Window window = {DemoUtilities.Window}, DemoRenderer.Camera camera = {DemoRenderer.Camera}, DemoUtilities.Input input = {DemoUtilities.Input}, float dt = 0.0121090971) Line 46 C#
Demos.dll!Demos.SpecializedTests.NotGJKTestDemo.Update(DemoUtilities.Window window = {DemoUtilities.Window}, DemoRenderer.Camera camera = {DemoRenderer.Camera}, DemoUtilities.Input input = {DemoUtilities.Input}, float dt = 0.0121090971) Line 144 C#
Demos.dll!Demos.DemoHarness.Update(float dt = 0.0121090971) Line 309 C#
Demos.dll!Demos.GameLoop.Update(float dt = 0.0121090971) Line 43 C#
DemoUtilities.dll!DemoUtilities.Window.Run(System.Action<float> updateHandler = {System.Action<float>}, System.Action<BepuUtilities.Int2> onResize = {System.Action<BepuUtilities.Int2>}) Line 166 C#
Demos.dll!Demos.GameLoop.Run(Demos.DemoHarness harness = {Demos.DemoHarness}) Line 55 C#
Demos.dll!Demos.Program.Main(string[] args = {string[0]}) Line 25 C#
By the way, I'd like to suggest to separate the "questions and help" subforum into V1 and V2.
In example, I'm trying to search how to disable threading in V2, however "v2" is discarded from the search query, probably because it's too short, but makes impossible to search for V1/V2 specific threads.
Thanks!