Newton 2.0x Archemedia Open Beta

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Wed Dec 29, 2010 10:11 am

I tried v2.28 with VS2008, but I get a link error (with a full rebuild, statically linking Newton):

1>fatal error C1900: Il mismatch between 'P1' version '20081201' and 'P2' version '20080116'
1>LINK : fatal error LNK1257: code generation failed

Anybody seeing this? Might be something with the VS2010 build, hm.

PS The reason I'm trying this over 2.26 is that I'm seeing NaN's being generated when colliding at times. May be just fences not being thick enough though.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Wed Dec 29, 2010 12:25 pm

Yes I found that too.
I made the last build with VS2010 and later I realize that Microsoft made it incompatible with all previous version of visual studio at the library level.
The dlls are compatible with older versions, but what good does that makes? most developers use librariers

I reported it that to they complain department but they simple ignore bug report by people who are no important enought and silently tag the bugs as "Will No Fix"
http://newtondynamics.com/forum/viewtopic.php?f=9&t=6338&start=30
I also posted about that BUg over teh Microsof connect forum
https://connect.microsoft.com/VisualStudio/feedback/details/633817/fatal-error-c1900

The bugs in Visual studio 2010 are many that they are innumerable; thousands of people are complaining but the do no paid attention.

This is the second time I get burn by it, the first time was with the Beta, and now that I paid $790.00 I found out that is full of bugs.

I will wait a little and maybe I buy the Intel compiler, if I cannot find a way to substitute VS with GCC for the PC.

Anyway you say you are getting Nan when collision happens is this reproducible?
Can you make a build using the DLL like you did before; maybe I can trap the bug and fix it.

I already made reverted back to VS 2008 and forget about VS 2010 maybe they will fix it with a service Pack.
Please get version 2.29 from the download

Please let me know about that Nan's bug that to me is the most important part.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Thu Dec 30, 2010 6:37 am

Too bad about VS2010, it seems their energy goes into all the fancy other libs they're trying to push, but raw C++ power is being neglected.

I am trying 2.29. Results:
- funnily enough I made an error the first time; I linked with the newton.lib for DLL's (~80Kb) but had the newton.h set to use the .lib. It still worked (although I did install the 2.29 newton.dll in my app directory)
- the NaN disappeared with this DLL version - note the NaN appears when I read back the Newton body position after a step.
- I then reverted to 2.26 (static lib/mt) to verify my earlier NaN results. It indeed gave me back the NaN when I hit a wall quickly (takes a few seconds).
- Since this would be of no use to you, I changed to Newton 2.26/DLL.
- For fun I tried to use the 2.26 DLL .lib with the 2.29 DLL. That in fact works (without NaN also), but ofcourse a bit awkard. I switched to the 2.26 newton.dll as well.
- The 2.26 DLL version works without NaN, only the static newton.lib fails. I verified that by switching to 2.26/static/MT.lib; it started generating NaN again.
- I switched to 2.29/static/MT. I gives me back the NaN.
- I switch to 2.29 DLL again. Finally I start using NewtonWorldGetVersion() - it seems the 2.26 DLL returns 225. ;-) The 2.29 DLL correctly gives 229 though. The NaN is gone.

I realise this isn't much use (you can only debug the DLL version); using the 2.29 static lib gives me problems. It might be a compilation settings; I've turned off exception handling for example, since I don't really find those helpful (too fatal for my taste). Or some calling convention, although I'm not doing anything non-default there. Consider it fixed for now, but keep it in mind if somebody else gets into trouble using the static libs.

Notes:
- NaN generated when a convex hull hits a collision tree
- I had to modify NewtonCreateBody() each time for the 3rd matrix argument. I understand that's currently unused (only in 3.00).
- My collision tree is loaded from disk, but that checks for the Newton version, so it correctly regenerates the tree when I switch Newton versions.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Thu Dec 30, 2010 11:23 am

so you mean that the dll and teh lib are different?
It is wierd because the lib and dll are the same projects, the only diffrent is the preprossesor defined

I like to fix the bug that sound like some big problem tah need immidiate respond.
I can send you a lib version with debug info, maybe that can cache the crash if you add float exection to you project.
I can also enable float exection maybe the will make it eassier to find the nan bug.

does that sound like a good idead to you,
If this is right I will make the project and the build.
what library do you use lib_vs9_md or lib_vs9_mt

I fist make the test project and emulate a crash by fakin a nan and see if the exection make the project crash on the file and function that generate the bug.
then I send you the secial build, for debug porpose only.

rvangaal wrote:- I had to modify NewtonCreateBody() each time for the 3rd matrix argument. I understand that's currently unused (only in 3.00).

yes I did that to keep 2.00 and 3.00 compatible, that way I can just drop a 3.00 dll into a 2.00 test and see if is performe equal or better than 2.00

the only problem is that the set of test project I had from pass users and I use for stress testing, and now they fail and I have to get new ones.
but that always happens when I made and interface change that is used by that project.
the only difference is that all demos use function CreateBody, so they all bloke with this change.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Thu Dec 30, 2010 12:34 pm

Yes, using the DLL I get no NaN, but when linking with the LIB I do.
I use lib_vs9_mt; getting a debug lib probably would give more info. I also use StackWalker to catch crashes and hunt down a stacktrace, so that may also give some info. I normally use StackWalker in combination with .exe and .pdb which then gives accurate module file+line information. Terrific stuff.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Thu Dec 30, 2010 12:54 pm

OK I will make a buidl with debug.
for some reason I can not set exection on in my system, the moment I call

_controlfp (_EM_ZERODIVIDE, _MCW_EM);
I get this errors
Unhandled exception at 0x10002b3f (newton.dll) in NewtonDemos.exe: 0xC000008F: Floating-point inexact result.

in any standard math function.
it is a long time I do not use exections so I may be doing somethong wrong.
anyway I will not add the exection, it will probably be in you way,
I will make the build with debug info in the lib so that it give you more infomation aboout the bug.
with your tools you can probably cache better that way.

I will asso include a Debug library build in debug mode. (it is very slow) but is has all kind of checks that my cache the bug when it happens
however by the description you give me I am no sure if it will get a crash in one library and no the other.

Anyway, It has to be tomorrow I am late for work now.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Fri Dec 31, 2010 4:10 am

Microsoft reply to teh link Bug.

Dear Julio,

It sounds as though you are compiling one or more object files in your static library with Whole Program Optimization (/GL). When compiling with this option, the compiler tools that build the .obj/.lib and the ones that consume the .lib to build the .dll/.exe must be the same; if they aren't, error C1900 will be emitted. This behavior is by design as the format stored in a /GL .obj may change between releases. As noted in http://msdn.microsoft.com/en-us/library/0zza0de8.aspx, you should not ship a .lib file composed of .obj files built with /GL.

Please check your build to make sure that Whole Program Optimization is disabled. For a static lib project, go to the property page and change “Configuration Properties->C/C++->Optimization->Whole Program Optimization” to “No”.

Mark Levine
Visual C++


I will try to make the VS 2010 buidl again, and see if urning /GL option off solve that one Bug.
But first I will post the buidl with debug info in VS 2008.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Fri Dec 31, 2010 5:23 am

It crossed my mind, that option, but these things are often more complex. I always turn off whole program optimization since it takes so much time in the linking phase, since it starts compiling a whole lot suddenly, and again at every link you do! Quite slow.

Let's focus first on getting the vs2008 working though indeed. Funny though how a vs2010 lib could complain on cl dll's that are supposedly from 2008, hm.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Fri Dec 31, 2010 11:20 am

Ok if you dowload 2.29 all libraries are build with debug information.
I modfiyied the demo project to link to the static libray and it seems to work.
I also added the lib_vs9_mt\Newton_d.lib this is a debug build of newton that can provide lot of info. but it is much slower.
In the next SDK I will add Debug version of all the libraries, this will healp people to track bug easeirs.
specially memory leak and those degenerated number that happne forn time to time.

See if this help please.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Fri Dec 31, 2010 12:03 pm

Did a quick test; ofcourse with the debug lib it runs ok. Used the latest 2.29 static release lib and there I have the problem again.
Might be somewhere in my code; these situations typically means something is not uninitialised (the debug version always initialises everything).

Will do more testing next year! :)
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Fri Dec 31, 2010 12:35 pm

The release also has debug info build if you
If you set the float execption maybe you cna catch when the float value becomes bad.

Anyway =, you are right we can continue next year.

Happy new year, to you and every one readyng this.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Fri Dec 31, 2010 12:47 pm

Oh I realised that the release library is useless unless you have the vc90.pdb file

Th eprlblem is that I alwar leav tha fiel to it default an dwhen I copy the fiel to teh archive it serach fo the newton.*
but the PDG is name VC90.pdb

I have to modify the Visual studio project so that I generates the proper PDB when building the Release libraries with debug information, that may provide some more help.
But I will do that tomorrow
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby thedmd » Fri Jan 07, 2011 8:13 am

Please, ban spammer above.

Edit:
Well, there is not longer spammer above. : )
thedmd
 

Re: Newton 2.0x Archemedia Open Beta

Postby aqnuep » Mon Jan 10, 2011 4:05 pm

Hi,

Sorry, I haven't been around in the last couple of months.
Have anything happened lately?
I'm interested how Newton2 goes.
Does it gets production ready? Can we expect anytime a stable release?
What about breakable objects and soft body?
aqnuep
 
Posts: 97
Joined: Sat Dec 22, 2007 4:14 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Jan 10, 2011 7:09 pm

2.29 is the most stable release.
the breakable and soft body stuff is moved to 3.00

soon trere will be a 3.00 release with very stable and impresive breakable,
the experimental one in 2.00 is not for prime time yet but it will in 3.00
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests