error compiling ND [SOLVED]

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

error compiling ND [SOLVED]

Postby blackbird_dream » Thu Aug 24, 2017 7:58 am

Hi all
I followed this link : viewtopic.php?f=9&t=9106
I got an error while building the Newton project :
Code 1001 (Visual studio 2017)
internal compiler error
file dgcollisionheightfield.cpp line 914

I tried to clean and regenerate, same error.
Thks for any support
Last edited by blackbird_dream on Tue Aug 29, 2017 9:46 am, edited 1 time in total.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby blackbird_dream » Thu Aug 24, 2017 9:48 am

I needed to remove the lines
910-926 in dgCollisionHeightField.cpp:
Code: Select all
      case m_float32Bit:
      {
         const dgFloat32* const elevation = (dgFloat32*)m_elevationMap;
         for (dgInt32 z = z0; z <= z1; z ++) {
            for (dgInt32 x = x0; x <= x1; x ++) {
               dgFloat32 high = elevation[base + x];
               if (high < minHeight) {
                  minHeight = high;
               }
               if (high > maxHeight) {
                  maxHeight = high;
               }
            }
            base += m_width;
         }
         break;
      }


and
1002-1018
Code: Select all
   case m_float32Bit:
      {
         const dgFloat32* const elevation = (dgFloat32*)m_elevationMap;
         for (dgInt32 z = z0; z <= z1; z ++) {
            for (dgInt32 x = x0; x <= x1; x ++) {
               dgFloat32 high = elevation[base + x];
               if (high < minHeight) {
                  minHeight = high;
               }
               if (high > maxHeight) {
                  maxHeight = high;
               }
            }
            base += m_width;
         }
         break;
      }


to let it build with no error.
Where is the dll ? No Idea.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby Julio Jerez » Thu Aug 24, 2017 3:30 pm

Code 1001 (Visual studio 2017)
internal compiler error, is an error in visual studio.

I have seen those error in visual studio from time to time on other projects, never in newton.
Newton is very clean vanilla CPP code, so sure why you will get compiler error on those lines.
try clean an rebuild, see if that work.
if you remove those lines then collision will not work.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: error compiling ND

Postby blackbird_dream » Fri Aug 25, 2017 2:42 am

I've no control over vs2017 and ND either
So my experience with this build should stop right now.
Too bad.
:(
Thx anyway

PS : I'm working on W7
I managed to build build.sln in visualstudio_2015_dll folder but failed with build.sln in visualstudio_2015_static_mt

screen capture :
http://theimagehost.net/upload/f23a0f631df9cae4aedd3fafe1aa1b41.jpg
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby Julio Jerez » Fri Aug 25, 2017 9:39 am

ok let us clarify, are you build an older version of the engine or are you getting the latest from GitHub.

I do have VS 2015 professional, and I just build that project, and it build without warning and errors.
10> dScene.vcxproj -> C:\Development\newton-dynamics\sdk\projects\visualStudio_2015_static_mt\x64/dScene/Debug\dScene_d.lib
========== Build: 10 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


are you compiling a C or a c charp port?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: error compiling ND

Postby Julio Jerez » Fri Aug 25, 2017 9:56 am

Some time VS get confuse and give this Internal errors at say is code that is no really why the crash happened. that's is some Microsoft has not been able to resolve in 25 years and people has just accepted it.

I have seen this crash in one computer and no matter what you do it VS crashes and yet the compute next to you has no problem. whi lead me to belive that it may some corruption on the file itself.
each time I'd seen that happens the only solve is re-arrange the text file itself,
maybe delete it and get a fresh copy, it may by there is some bogus ascii character in the file that derail the MS parcel.

I edited the file a lithe, if you sync it will get a new copy, please try sync and build again.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: error compiling ND

Postby blackbird_dream » Fri Aug 25, 2017 10:05 am

thks for your feedback.

My latest experiments:
The build of visualStudio_2015_dll : OK
the build of visualStudio_2015_static_mt : failed
the build of visualStudio_2013_static_mt : failed
the build of visualStudio_2010_static_mt : OK


When Ok I verified one .dll or one .lib was created in all subfolders
Last edited by blackbird_dream on Fri Aug 25, 2017 10:22 am, edited 1 time in total.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby blackbird_dream » Fri Aug 25, 2017 10:10 am

are you compiling a C or a c charp port?


hum, what do you mean ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby blackbird_dream » Fri Aug 25, 2017 10:21 am

just downloaded again the latest pack and I get 2 new warnings (see picture):
http://theimagehost.net/upload/314076c2a39235a9c5c68d7ccf1c9c74.JPG

I did the operation twice again, one using 7-zip for decompression and the other with winrar. Same results
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby Julio Jerez » Fri Aug 25, 2017 10:43 am

Ok I converted those to switch pieces of code into two function calls, maybe that will resolve the confusion in Visual studio, please sync again an let me know if still crash.
at least if should do it on a different line.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: error compiling ND

Postby blackbird_dream » Mon Aug 28, 2017 9:26 am

Ok
I downloaded the new build.
Same results :
visualStudio_2010_static_mt/build.sln OK
visualStudio_2013_static_mt/build.sln failed
visualStudio_2017_static_mt/build.sln failed
error C1001 internal error line 891 , dgcollisionheightfield.cpp

my install :
http://theimagehost.net/upload/1b88571a66dee1080df4fe16e50b74a0.JPG

the minimal changes I made to make it compile is to replace line n°893 :
Code: Select all
         minHeight = dgMin(high, minHeight);


with
Code: Select all
         minHeight = dgMin(high, minHeight)+1.0-1.0;


and line n° 1012 :
Code: Select all
         minHeight = high;


with
Code: Select all
         minHeight = high+1.0-1.0;


incredible but true.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby Julio Jerez » Mon Aug 28, 2017 2:37 pm

Oh it see you version fo VS does not like that line for some reason.

I see that there was another place where the min and max elevation was calculated, I made the change
you should only need to do there trick
minHeight = dgMin(high, minHeight)+1.0-1.0;
at line n°893 :

if you sync then a least that will minimize the difference, I still do not know what cause that
I do not have VS 17, by I have 13 and 15 and I do no get those errors an I build on multiple computers,

anyway does the demo run after you build it?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: error compiling ND

Postby blackbird_dream » Tue Aug 29, 2017 3:46 am

good news, the latest build works here with no modifications.
What have you changed since last night ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: error compiling ND

Postby Julio Jerez » Tue Aug 29, 2017 7:50 am

In collision height field there was another place that was no calling the tow new function that calculate the height for the aabb.
I am not sure whit the fixed, but I take it.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 24 guests