Objects suddenly bounce off?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Objects suddenly bounce off?

Postby Marc » Wed Dec 02, 2009 4:59 pm

When I had that issue with the support vector bounding box calculation, I replaced it with the bruteforce method and never switched back (only shortly for verifying that it's fixed). So my current crash issue can't be related to wrongly calculated bounding boxes by the supportvector code.

I regenerated the collisions for 2.11 public. I also prepended the newtonversion to my collision files and check if they match on load like suggested in the other thread. The check succeeds.
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Julio Jerez » Wed Dec 02, 2009 5:19 pm

I am sorry, the version in the site say 2.12 bu teh header say 2.11
I renamed this moring but like I say there was an error when I upload 2.11 and I change next day in the morning.
Please resave any serialized data.
if you prepemnde teh version to the serilized data you cna just edit the Newton header and change the version from, 2.11 to 2.12 to forc it to resave

I am confused?
does the app crash with the brute force AABB?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Marc » Wed Dec 02, 2009 5:45 pm

yes, since 2.11 public it crashes with the bruteforce bounding box.

Apart from that, I guess I never had that wrong public 2.11 version because when I binary compare my 2.11 public newton.dll with the 2.12 newton.dll, they are identical.
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Julio Jerez » Wed Dec 02, 2009 5:53 pm

can you reproduce the crash?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Marc » Wed Dec 02, 2009 7:04 pm

Not easily. I've seen it once in debug with the stacktrace pretty much when I started using 2.11 public - but didn't care at that point and haven't managed to get it in debug mode again. And besides that, the server crashes within 24h most likely now. I have no idea how to accelerate it. I guess it's not just related to running long because when I saw it first in debug, it ran for about 5 min maybe.
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Julio Jerez » Wed Dec 02, 2009 7:46 pm

well the only thing I can think off is try to make a test level than can run with the debug dll and let it run until it craches.
did you get the PM I send you?
actuatly that debug dll will not be good I will make anothe tonight and send it again.

One of the thing I did for version 2.11 is tha I build it with VS10, and I changed lot of of sintax mainly shadow variables that the compiler recomended to rename.
I do stuf like this
Code: Select all
for (int i = 0; i < n ; i ++) {
   for (int i = 0; i < m ; i ++) {
   }
}


I will compare the differences an see if I make a big mistake.
visual studio 10 come comes with a utility called anylise that remoment to rename a those shadow variabl;e.
I can see how a mistake can be made is for example i is used in the inner loop and subthently it is the outer varible that is in scope.
I will verify.
The only problem is that they are lot fo thsoe chaneg that are miex with legitimate changes and I did no make a lable.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Marc » Thu Dec 03, 2009 6:28 am

Yes I got your dll. I didn't have time to pull the island generation in a seperate process yet though.

The shadow variable thing looks indeed like it could lead to errors easily. Theoretically, VS2010 should be able to do refactoring? I just heard - no idea if it's true. If it's true, from the code with the shadow variables in it, theoretically, one should be able to select a variable and do "rename" and it renames it correctly according to scope without breaking semantics. Did you do something like that or did you do it manually by hand?
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Julio Jerez » Thu Dec 03, 2009 8:31 am

Marc wrote:The shadow variable thing looks indeed like it could lead to errors easily. Theoretically, VS2010 should be able to do refactoring? I just heard - no idea if it's true. If it's true, from the code with the shadow variables in it, theoretically, one should be able to select a variable and do "rename" and it renames it correctly according to scope without breaking semantics. Did you do something like that or did you do it manually by hand?

not I did no do liek that It did it by hand.
any way the last version I havea relible back up is 2.08
I am going back to tah version and merging only the new engine changes, I will forget about those VS10 recomendations.

to tell you not other compiler ever say that that was problem only VS10.
so I will just ignore that or If I try I will see if theer is teh automatic refactoring.

her is oen fo eth simpel changes in a fintion I have a loop liek this

Code: Select all
   for (fscanf (file, tokenFormat, Buffer); !feof (file); fscanf (file, tokenFormat, Buffer)) {
      if (!stricmp (Buffer, Token)) {
         return 1;
      }
      getc (file);
   }


vidaul studion report an waring because teh value reported for sscan is ignired
it want like this

Code: Select all
  for (dgInt32 i = fscanf (file, tokenFormat, Buffer); !feof (file); i = fscanf (file, tokenFormat, Buffer)) {
       Buffer[sizeof (Buffer)-1] = 0;
      if (!stricmp (Buffer, Token)) {
         return 1;
      }
      i = getc (file);
   }


there other more important changes thought but I will just ignore then an use then like I have in 2.08
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Julio Jerez » Thu Dec 03, 2009 3:13 pm

I was trying to merge to the 2.08 backup but there are too many important changes. I think I have a more recent one.
in a normal run the engine should not crash under any cisrcunstces an I no sure what I am fixing.

Let us do this:
I will unpack my latest backup and mahe a build then I will send it to you for testing.
I will have the bugs we bouce bu you repoerted, but what I want to find out it the reason for the Crash first.
I 'd like you to run the long 24 hours test.

then from the last version stable I will scrap the current one and integrate the new funtionality and bug fixes, skiping VS10 factorization BS.
I am reluctan to make some many blind changes from such and older version when I do not have any confirmation tah it will in fatc resolve the rpoblem.

Are you OK with that?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Julio Jerez » Fri Dec 04, 2009 3:13 am

Ok I think I finally removed all of the VS10 recomendation and when back to 2.10 this was the last version stable.
Then I added by hand the bug fixes I got for varios peoples including your supportvertex and edge Bounce bug.

it is amasing by the VS modification where around 1000 changes, it is not wonder I could made some kind of mistake since I made then manually and that was dealling with variable with the same name.
I can see how eassly I could make a mistake with a name alias that could not be be sintactically right but logically wrong.
I still want to make the change but I think I will wait for VS10 final, or I do it incrementally some other time.

It is amasing how VS is still the only compiler I know that still complaint about the scope of local variable wit the same name.

Anyway I will make a build and send it to you tomorrow morning.
let us hope this fix the problem.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Julio Jerez » Fri Dec 04, 2009 2:47 pm

Ok I sent you the SDK replacement for testing.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Marc » Sun Dec 06, 2009 6:14 pm

Sorry I haven't checked back earlier. I had other non game dev related things to do. I plan to work on this again tomorrow.

Does VS 2010 warn you about those things or does it refuse to compile it? To me, it sounds like they integrate some static code analysis in the compiler of vs2010. So I suggests you to make the name of variables more unique, aber suggests to make sure buffers you use as strings are 0-terminated etc. I wonder why it doesn't suggest you to use fscanf_s instead of fscanf though - I think my vs2008 already warns me about that. I'ld guess it'll still finish the compilation if you don't do all that, but since those things could create hard to find errors in the future, I warns you about it.

It'll probably suggest a lot of things to my code as well when I upgrade some day.... yeah .... :/
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Julio Jerez » Sun Dec 06, 2009 8:49 pm

Ha OK, Make sure you get teh PM I send you with teh Link to teh New version with those sintax error.
It is 2.12 but wit all the Bug fixes but witout the VS codes analisy sugestions.
Make sure you re-save all serialized data.


Marc wrote:Does VS 2010 warn you about those things or does it refuse to compile it? To me, it sounds like they integrate some static code analysis in the compiler of vs2010. So I suggests you to make the name of variables more unique, aber suggests to make sure buffers you use as strings are 0-terminated etc. I wonder why it doesn't suggest you to use fscanf_s instead of fscanf though - I think my vs2008 already warns me about that. I'ld guess it'll still finish the compilation if you don't do all that, but since those things could create hard to find errors in the future, I warns you about it.


VS2010 professional is just like VS2009 professional, quite frankly I do not see much difference.
The compiler issue zero error and zero warning when I compile Newton with 2010, however VS2010
comes with a series of tool like Profiler, and code analysis the tell you code weakness.

When I run Newton with it I get several thousand of those variable x is show by variable x.
This is not because it is and error, it is because eit is a habit of mine to program that way.

I Learned programming in a Fortran environment where variables use to have meaning for example, pointer where global, and loops variables where designated indices like i, j, k, ... So you must reuse then as much as possible and I keep using the same patter in C++.
That is not an error, and not other compiler had ever complained about that, Matroxwords, Visual Studio, Intel, Watcon, and all version of GCC, it is only that VS code analysis tool that had suggested to change it.
I can see how make that kind of change can easily lead to the Bug you found.

What I will do is to stop using that Habit for new code I write and each time I change a file I make the changes gradually, but I will no make a global find a replace over the entire engine like I did.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Objects suddenly bounce off?

Postby Marc » Mon Dec 07, 2009 6:54 pm

Ok, I've just finished the seperation of the island generation on the server side into a seperate process. I also updated to the new vesrion you sent me via pm. I also recreated all newtoncollision. Now we'll have to wait and see if something odd happens ...
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Objects suddenly bounce off?

Postby Marc » Tue Dec 08, 2009 4:38 am

still running ...

Fortran is before my time. I came in contact with it once when I used some libraries from netlib.org and converted them to c with f2c - and I was happy it just worked :)
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron