yoshinoToylogic / bulletsharp

Automatically exported from code.google.com/p/bulletsharp
MIT License
0 stars 0 forks source link

System.AccessViolationException in RigidBody::Orientation::get() #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Using the getter of the Orientation property of a RigidBody. The second time 
it's called it will crash.

Unfortunately I couldn't find a demo project that is using the Orientation 
property so I just added a single line of code into the DistanceDemo. It's 
enough to just add the following line into the "OnUpdate" method:

Quaternion test = rotBody.Orientation;

It can help if you compile it in release mode. This way I encountered it the 
first time, but right now it also happens in debug builds.

What is the expected output? What do you see instead?

Instead of getting a quaternion it crashes in this line (RigidBody.cpp, 405):

"RigidBody_GetOrientation(Unmanaged, orientationTemp);"

What version of the product are you using? On what operating system?

This happens with VS10 and VS11 builds with the latest trunk version of 
Bullet/BulletSharp.

Original issue reported on code.google.com by Hagn99@gmail.com on 28 Sep 2012 at 10:21

GoogleCodeExporter commented 8 years ago
Is this with the Generic build or some other?

Original comment by andres.traks on 28 Sep 2012 at 10:25

GoogleCodeExporter commented 8 years ago
It happened in my XNA 4 project and also with the demo framework with SharpDX 
as renderer.

Original comment by Hagn99@gmail.com on 28 Sep 2012 at 10:30

GoogleCodeExporter commented 8 years ago
Ok, I can reproduce this, but I've no idea why this happens yet. Thanks for 
reporting!

Original comment by andres.traks on 28 Sep 2012 at 10:39

GoogleCodeExporter commented 8 years ago
Thank you very much for your great support in this project. I just needed to 
say you this.

Original comment by Hagn99@gmail.com on 28 Sep 2012 at 10:40

GoogleCodeExporter commented 8 years ago
r421 has a workaround for this. It extracts the orientation from the world 
transform instead of using getOrientation (which is equivalent). Still no idea 
why that fails, but at least it seems to not crash now.

Original comment by andres.traks on 29 Sep 2012 at 12:53

GoogleCodeExporter commented 8 years ago
I just checked it and it seems to run fine now. Thank you very much.

Original comment by Hagn99@gmail.com on 29 Sep 2012 at 12:56

GoogleCodeExporter commented 8 years ago
The problem was found in bullet: 
https://github.com/bulletphysics/bullet3/pull/361

Original comment by andres.traks on 23 Apr 2015 at 7:49