Search found 4546 matches

by Norbo
Sun May 17, 2020 4:23 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

Unfortunately, I don't have enough information to suggest anything in particular. It definitely shouldn't be throwing access violations :P If you can reproduce it in the demos, I could take a closer look. Grabbing the source and running in debug mode could help too- there are a lot of asserts that w...
by Norbo
Sat May 16, 2020 11:18 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

Are you using multiple threads to add to/remove from the simulation simultaneously, or while the simulation is running? Both will definitely corrupt the simulation and things will fail in arbitrarily bad ways. If it's not that, the fact that you're seeing access violations means something has gone t...
by Norbo
Thu May 07, 2020 4:40 pm
Forum: Questions and Help
Topic: Bepuint and solver discrepancies
Replies: 3
Views: 10318

Re: Bepuint and solver discrepancies

That's odd- softness shouldn't introduce nondeterminism alone. As for why softness is the way that it is: 1) Collision softness is, roughly, inverse damping coefficient normalized for effective mass. A raw damping coefficient would produce different behavior depending on the effective mass at the co...
by Norbo
Mon May 04, 2020 4:34 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

I've gone back and forth on that a bit. The value of implicit conversions is silently doing things that should work, but converting a handle to an integer loses the type information that is the entire point of the type. When you intend to do that, it's perfectly fine, but implicit conversions don't ...
by Norbo
Sun May 03, 2020 2:38 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

Unfortunately, it would not make it any faster, nor make it more deterministic, because bepuphysics2 already uses a custom allocator, uses very few managed instances, and does not generate garbage :) The underlying pinned block allocations come from the GC large object heap as an implementation deta...
by Norbo
Sun May 03, 2020 12:37 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

Well, that's certainly an approach :D Putting aside the implementation dependencies (specific offsets and whatnot), it's hard for me to say anything conclusive. Storing a managed reference to an instance sneakily allocated in unmanaged memory definitely does trigger ExecutionEngineExceptions at leas...
by Norbo
Sat May 02, 2020 5:54 pm
Forum: Questions and Help
Topic: Networked Character Controller Issue (v2)
Replies: 7
Views: 13800

Re: Networked Character Controller Issue (v2)

Running with debug asserts active in the library would provide more information, but it looks like some state has gotten corrupted in the broad phase. Incorrectly timed asynchronous reads can get torn/trash data, possibly even an access violation at the time of the read if you get very unlucky, but ...
by Norbo
Sat May 02, 2020 5:43 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

I do intend to eventually open it up, expanding usage of the IUnmanagedMemoryPool: https://github.com/bepu/bepuphysics2/blob/master/BepuUtilities/Memory/IUnmanagedMemoryPool.cs It's already used for Quick* collections, and I intend to eventually move many ephemeral allocations to more purpose-built ...
by Norbo
Fri May 01, 2020 11:55 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

I'm afraid I can't be too much help- by the sounds of it, there is indeed some memory corruption going on elsewhere in the program. Best guess is that the simulation is just revealing corruption through stress testing, but the corruption is there either way. Likely some buffer getting overrun and st...
by Norbo
Fri May 01, 2020 4:45 pm
Forum: Questions and Help
Topic: Networked Character Controller Issue (v2)
Replies: 7
Views: 13800

Re: Networked Character Controller Issue (v2)

So long as the body data isn't being modified externally or an executing timestep, it's safe to access. No engine threads continue to run outside of the timestep. You may be able to catch the problem earlier than an access violation if you run the library in debug configuration so that all the asser...
by Norbo
Fri May 01, 2020 1:59 am
Forum: Questions and Help
Topic: Networked Character Controller Issue (v2)
Replies: 7
Views: 13800

Re: Networked Character Controller Issue (v2)

Should work fine, with two potential minor issues: 1) At the border between meshes, contacts will not be corrected to match the continuous surface. That can cause bumps for sliding or rolling objects when the normals point sideways. More information in this thread: https://forum.bepuentertainment.co...
by Norbo
Thu Apr 30, 2020 5:09 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

I've tried widely varying block allocation sizes on simulations from ~15000 to >300000 bodies, no luck reproducing so far. Other forms of manual memory management shouldn't interfere with the BufferPools- they don't do anything particularly fancy, they just allocate blocks from the GC. The only conc...
by Norbo
Thu Apr 30, 2020 12:47 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25017

Re: BufferPool problem

That's pretty odd. ExecutionEngineException means 'something has gone terribly wrong', and shouldn't happen under anything close to normal circumstances. Widespread memory corruption could do it. I'd be concerned that bumping up the MinimumBlockAllocationSize is just hiding the true bug somehow. Can...
by Norbo
Tue Apr 28, 2020 10:09 pm
Forum: Questions and Help
Topic: Networked Character Controller Issue (v2)
Replies: 7
Views: 13800

Re: Networked Character Controller Issue (v2)

Given that it works with the debugger attached, it's almost certainly not going to be physics-related misconfiguration. Hard to say what it is- standard recommendation would be to add more reporting and progressively simplify so you can narrow down where it might be coming from.
by Norbo
Sun Apr 26, 2020 5:04 pm
Forum: Questions and Help
Topic: Bepu V1 demo can not run
Replies: 1
Views: 7962

Re: Bepu V1 demo can not run

Could be a missing dependency of some sort, like a C++ redistributable, hard to say. Might want to try installing VS2019 and see if it magically starts working.