Search found 4546 matches
- Sun May 17, 2020 4:23 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Sat May 16, 2020 11:18 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Thu May 07, 2020 4:40 pm
- Forum: Questions and Help
- Topic: Bepuint and solver discrepancies
- Replies: 3
- Views: 12330
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...
- Mon May 04, 2020 4:34 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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 ...
- Sun May 03, 2020 2:38 am
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Sun May 03, 2020 12:37 am
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Sat May 02, 2020 5:54 pm
- Forum: Questions and Help
- Topic: Networked Character Controller Issue (v2)
- Replies: 7
- Views: 15950
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 ...
- Sat May 02, 2020 5:43 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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 ...
- Fri May 01, 2020 11:55 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Fri May 01, 2020 4:45 pm
- Forum: Questions and Help
- Topic: Networked Character Controller Issue (v2)
- Replies: 7
- Views: 15950
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...
- Fri May 01, 2020 1:59 am
- Forum: Questions and Help
- Topic: Networked Character Controller Issue (v2)
- Replies: 7
- Views: 15950
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...
- Thu Apr 30, 2020 5:09 pm
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Thu Apr 30, 2020 12:47 am
- Forum: Questions and Help
- Topic: BufferPool problem
- Replies: 18
- Views: 28752
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...
- Tue Apr 28, 2020 10:09 pm
- Forum: Questions and Help
- Topic: Networked Character Controller Issue (v2)
- Replies: 7
- Views: 15950
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.
- Sun Apr 26, 2020 5:04 pm
- Forum: Questions and Help
- Topic: Bepu V1 demo can not run
- Replies: 1
- Views: 9922
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.