Freeze/Sleep state issues since rev 991

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 3:50 am

Hi Julio,

I just wanted to let you know that since revision 990/991 the behavior of sleeping bodies changed. Since rev 991, sleeping bodies (set with freeze state) do not get active when another body collides with them.

Markus
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 6:56 am

if you play the demos and you run simple box stacking, the you set autosleep on in the menu so that teh all go to sleep.
then with teh mise point to one of teh towers, and shoot a ball, you will see that the do go wake up and go to sleep as teh ball touch then
please try that an let me know if is this is no correct.
if it is not please make a demo so that I can see what you mean.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 9:45 am

The simple box stacking demo runs fine. What I am doing is to create a few domino pieces (simple boxes) in a row and call NewtonBodySetFreezeState(body, 1); on each of them. Most of the time, when one box hits the other both of them get inactive.

You can download a demo here. Start the program, then go to File->Open->"demo_playground_final.xml". Then press F9 or go to Simulation->Start. In the middle of the map, there should be a sphere in mid-air. You can activate it using a right-click.
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 9:49 am

before I download the demo, can you sync to core 300.

My guess si that you hab eth esame problem with freeze and sleeping. tthsoe are diferent things.
freeze is broken is core 200, but if I change it, it will brake code for people who are using it like it now.
If I am going to change the behavior of freeze body to be like it was in core 100, it has to be for core 300 not for core 200.

core 300 is compatible with core 200 you just need to sync an compile.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 10:52 am

I've got the same problem with core300.

By the way, would it be reasonable to switch to core300 now, or is something missing in there?
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 11:00 am

I did not say it was solved in core 300, I say for me to change that unless it si a bug, it has to be in core 300.
did you test it with core 300?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 11:14 am

When I use the core300 DLL, everything is completely unstable and objects (and joints) start flying around and acting crazy right from the beginning.
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 11:24 am

that sound like a really, really bad bug. As far as I knwo core 300 soudl be stable every where, execpt teh place that had no bein completed.

had you tryied, or are you assumnimg that based on some early test that you did?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 11:28 am

I assume that the issue exists in core300, too. That is, because in rev990/991 you made the same changes to core200 and core300. When I use rev989, everything works as expected with core200.
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 11:47 am

I said sync to svn an dtry core 300, before I strt debugging.

I am focusing in core 300 more than core 200, only if ther are bugs I make change to core 200.
you request isa change in behavior. an you are not teh only one hwo had foudn that diffrence in core 200.

please synk to svn and build core 300, see if it tworks first. It will no solve teh freezee issue but it will allwo me to make the change.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 12:07 pm

As I said, when I use core300 from the SVN trunk I get unstable physics behavior. But from what I can see, the freeze/sleep issue is in core300, too.

But I don't understand why you are saying this was in core200 from the beginning. The issue was introduced in rev990/991 which was in mid-October. Before that (and also Newton 2.33) there was no such issue.
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 1:02 pm

thes was the change you are talking abput
Code: Select all
   body0->m_equilibrium = body0->m_invMass.m_w ? false : true;
   body1->m_equilibrium = body1->m_invMass.m_w ? false : true;

//   body0->Unfreeze();
//   body1->Unfreeze();


before is was like that
Code: Select all
//   body0->m_equilibrium = body0->m_invMass.m_w ? false : true;
//   body1->m_equilibrium = body1->m_invMass.m_w ? false : true;
   body0->Unfreeze();
   body1->Unfreeze();


that was a bug in core 200, because the code was changing the freeze state of a body with out notifying the user. I said againt I cannot have it both ways in the same core.

basically a frozened body is a body that does not get solver updates unless it is touched by another active body, the moment the body loses its conection to any other active body it will stops moving
that should be the correct behavior. Is that what you are seeing?

if that is what you are seeing but it is a problem, then the solution is make the modification to the client code so that is works the proper way.
Having it working because a bug is not a solution.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 1:38 pm

Ah, thanks for the clarification, this is exactly what I'm seeing. I thought this was the correct behavior ;-)
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Re: Freeze/Sleep state issues since rev 991

Postby Julio Jerez » Sat Nov 05, 2011 1:45 pm

so then there is not problem then.

now for a domino game you should not be using feeze body, a flozzen body does not provide better performance because they may not be in equilibrium therefore they will get collision updates.
a dominbo game should work fine with the default setting of the engine, try not calling freeze body, and simply set the to autosleep on.

autosleep body is the feature that offer the best performance, because when the body goes to equelibrium, then engien skips both collision and dynamics updates.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Freeze/Sleep state issues since rev 991

Postby Markus » Sat Nov 05, 2011 2:06 pm

I used the freeze state for ramps etc, where the dominos whould normally fall over on their own. Using the freeze state, they keep standing and only get activated when other bodies collide with them.
Markus
 
Posts: 52
Joined: Sat Mar 19, 2011 6:31 am

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 6 guests

cron