Comments (6)
Hi!
I test the demos quite frequently, but haven't seen this kind of crash recently. Can't reproduce it now either. Are you using your branch or did you try mine as well?
I'll go check the object references and stuff so that nothing gets disposed prematurely.
Thanks for reporting!
from bulletsharp.
Ok, i have been digging this all day and end up in bullet3 giving crappy pointers when trying to get Native->getChildList() when trying to add a shape in compound shape, which did not make sense.
I deleted, checkout and rebuild everything and now demos work fine :)
The problem is that it still crashes in my project, but i tracked the problem in adding wheels to raycast vehicle (next world simulation tick crashes with "Attempted to read or write protected memory.)
Up to the commit made at Jun 22, 2014 everything works, after that i get crashes.
Anyway bulletsharp/demos work ok after -all (sorry for the inconvenience) , so i will continue investigating my crashes.
Thanks :)
PS. i am using your branch
from bulletsharp.
The entire child list in btCompoundShape is reallocated when the underlying btAlignedObjectArray decides to allocate another chunk for additional children. So this makes getChildList() sometimes return different values. There's code to handle this here: https://github.com/AndresTraks/BulletSharp/blob/master/src/Collections.cpp#L335
from bulletsharp.
I finally found the problem ! (the fix here #3)
This bug arose from the changes in design/architecture that has to do with destruction (and garbage collection)
eg. I initialize my vehicle like this
Vehicle = new BulletSharp.RaycastVehicle(Tuning, chassis, new BulletSharp.DefaultVehicleRaycaster(physics_scene.World));
which means i do not keep a reference to raycaster in my class.. so the the wrapper class will be collected by garbage collector.. after the commit made at Jun 22, 2014 the raycaster class is now disposable(+destructor) which delete the native object and since vehicle did not keep a reference, it would be collected.
I believe other crashes i see are rooted to this issue...
I think that classes having destructor which frees the native object is a very good change and thing to have, but the object must keep a reference of the other destructable objects it needs.
Thanks :)
from bulletsharp.
Hunting down another crash let me to PersistentManifolds.
PersistentManifold inherit from TypedObject and they now got a destructor which deletes the native pointer when done. The bug was creating a PersistentManifold for unmanaged objects that would be delete (maybe even more that once) when it was time to collect the wrapper.
I added a flag in TypedObject to choose if should be delete. (fix here #4)
This fixed then crashes in my project and things seem to run smooth now.
If i find anything else i'll let you know :)
from bulletsharp.
Hey, nice work! :)
VehicleDemo doesn't crash because it actually implements it's own equivalent vehicle class (CustomVehicle) on top of IActionInterface, So it's not using RaycastVehicle at all. I think I'll rewrite RaycastVehicle to be fully managed just like CustomVehicle.
from bulletsharp.
Related Issues (20)
- how to compile dll from src? HOT 1
- Hi Vb.net developer issue when I try to remove ridgid body!!! HOT 3
- Stop simulate HOT 9
- Why does BasicDemo have many errors??? HOT 2
- Bullet Physics Version Update HOT 4
- Problem with BulletSharp with Debug x64 and Release x64 HOT 2
- MultiThreadedDemo, A heap has been corrupted exception HOT 3
- Build instructions for non C++ developers HOT 2
- Link is broken for downloading x64 release HOT 1
- AccessViolationException while BulletSharp.DynamicsWorld.StepSimulation HOT 2
- Example without Demo UI
- .NET Core compatibility HOT 6
- Strange behaviour HOT 4
- UnhandledException : Removing object that is not being tracked. at Finalize() HOT 2
- btTransform wrapper HOT 4
- How can BulletSharp.dll be built as AnyCPU .dll HOT 1
- BulletSharp, OpenTK & Scale HOT 4
- Unhandled Exception on ~btGImpactMeshShape()
- C# Demo Build Issues - Consistent Versions of Dependencies? HOT 1
- Passing Through object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulletsharp.