Strange hang after upgrading to 2.74

sipickles
Posts: 44
Joined: Thu Aug 07, 2008 6:57 am

Strange hang after upgrading to 2.74

Post by sipickles »

Hi,

Just upgraded form 2.68 ->2.74 on winXP MSVC2005.

Now when my app first runs, it hangs the first time btDynamicsWorld::stepSimulation is called for about 10 seconds before bursting into life.

If I comment out the stepSimulation call it doesn't hang at all. This is the same code that worked fine for 2.68

I am stumped.... can anyone think of a reason why this might happen?

Many thanks

Simon
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Strange hang after upgrading to 2.74

Post by Erwin Coumans »

Can you upgrade to 2.75 beta1 and see if that helps?

Make sure to also update the projectfiles, 2.74 used SSE2 which might be incompatible. 2.75 reverts back to SSE1.

Hope this helps,
Erwin
sipickles
Posts: 44
Joined: Thu Aug 07, 2008 6:57 am

Re: Strange hang after upgrading to 2.74

Post by sipickles »

Ok, thank Erwin. I will upgrade and report back.

In the meantime I've noticed the problem was caused by adding a btHeightField. Once I've removed this, my app runs smoothly and collisions all behave. (hmm forgot to try vehicle demo....)

Also turning down the maxSteps of stepSimulation helped a little with the heightmap in place. Looked like there was some serious number crunching going on, blocking the app loop.

I'll do the upgrade today and get back to you.

Si

EDIT: Vehicle demo on 2.74 goes weird for me too with heightmap. Upgrading now.

EDIT: Vehicle Demo on 2.75 buggy too. Heightmap appears a long distance below vehicle and vehicle drops through terrain when it finally gets down there! Similar problem to my own app. I notice vehicle demo is not on AllDemos list, is it unmaintained?

I guess it is since there is a terrain demo. I'll take a look at that to see if I can fathom my problem.
sipickles
Posts: 44
Joined: Thu Aug 07, 2008 6:57 am

Re: Strange hang after upgrading to 2.74

Post by sipickles »

Made some progress with my terrain problem, using 2.75

I hadn't realised that btHeightfieldTerrainShape ctor had changed so I was passing nonsensical values to some of the arguments.

So now my models land on the terrain. Hooray!

Still have the odd hammered framerate for a few seconds if I add a heightmap, like 2 FPS.... after about 5 seconds it runs at 1000 FPS!

If I comment out the Heightmap adding function, I get 1000FPS straight away.... no chugging!

--- EDIT

Still grinding away at this problem. My debugging has shown that if any static object (mass == 0.0) is added to the world the simulation grinds to 2 FPS for 20 seconds (approx). This includes my terrain. Giving my terrain a mass of 1.0 stops the problem altogther!

So puzzled by this, I set the mass of the cubes in appBasicDemo to 0.0, but there is no slowdown in that demo :( The cubes behave statically as expected.