chrome972 / pybox2d

Automatically exported from code.google.com/p/pybox2d
0 stars 0 forks source link

Different results between windows and linux #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have upgraded pybotwar (https://code.google.com/p/pybotwar/) to work with the 
latest pybox2d 2.3b0. It is working well on Linux, but just now, testing on 
Windows gives a much different result with the ContactListener

What steps will reproduce the problem?
1. ContactListener.PostSolve -> impulse.normalImpulses
2. On linux, max value usually somewhere ~50
3. On windows, max value 702212538368.0 (always the same number)

What is the expected output? What do you see instead?
 The same (or very close) output on both systems.

What version of pybox2d are you using? On what operating system? 32-bit or
64-bit?

2.3b0
32 bit windows 7

Please provide any additional information below.

Original issue reported on code.google.com by miss...@hotmail.com on 5 May 2014 at 9:18

GoogleCodeExporter commented 8 years ago
I'm surprised it's gone this long having not been found -- thanks for reporting 
it. I believe I have fixed this with rev 381. 

The problem was that b2_maxManifoldPoints was being used in place of 
b2WorldManifold.count, leading to uninitialized floats being added to the 
normalImpulses tuple. The representation of those uninitialized floats on Linux 
apparently leads to a very small value (1e-43), whereas on Windows (at least in 
my tests) you see 1e+30 or so.

Original comment by sir...@gmail.com on 17 May 2014 at 6:56

GoogleCodeExporter commented 8 years ago
Thanks for looking in to this. I was afraid I had not given you enough to go on.

Unfortunately I don't have any systems set up to build from source on Windows.

Any plans for an updated windows installer?

Original comment by miss...@hotmail.com on 17 May 2014 at 8:25

GoogleCodeExporter commented 8 years ago
I hope to do a new release in the near future.

In the meantime, if you have a win32+python27 machine to test your code on, 
would you mind giving the binary in the repository a go? r384 has it in 
/trunk/library/Box2D -- and you can simply copy the Box2D directory to 
pybotwar's temporarily.

Original comment by sir...@gmail.com on 17 May 2014 at 9:23

GoogleCodeExporter commented 8 years ago
I will try it on Monday when I can get to a Windows machine. Thanks!

Original comment by miss...@hotmail.com on 17 May 2014 at 9:37

GoogleCodeExporter commented 8 years ago
That (r384) looks good.

Impulses on Windows are now about the same magnitude as what I see on Linux.

Thank you!

Original comment by miss...@hotmail.com on 19 May 2014 at 4:15

GoogleCodeExporter commented 8 years ago
Great -- glad that fixed it. I'll close the issue now.

Original comment by sir...@gmail.com on 21 May 2014 at 11:37