Root complains when started


ROOT Version: 6.14.04
Platform: Windows
Compiler: Not Provided


Hi,
The problem that I had with v 6.14.02 still persists in *.04
Here is the error:

C:\Users\Debajyoti Sengupta>root
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:131:12: error: redefinition of '_CrtEnableIf<true, _Ty>'
    struct _CrtEnableIf<true, _Ty>
           ^~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:131:12: note: previous definition is here
    struct _CrtEnableIf<true, _Ty>
           ^
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:488:16: error: redefinition of '__crt_locale_data_public'
typedef struct __crt_locale_data_public
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:495:16: error: redefinition of '__crt_locale_pointers'
typedef struct __crt_locale_pointers
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:503:16: error: redefinition of '_Mbstatet'
typedef struct _Mbstatet
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
   ------------------------------------------------------------
  | Welcome to ROOT 6.14/04                http://root.cern.ch |
  |                               (c) 1995-2018, The ROOT Team |
  | Built for win32                                            |
  | From tags/v6-14-04@v6-14-04, Aug 23 2018, 17:00:44         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0]

Any solutions?

Hi,

This is most probably due to a mismatch between the Visual Studio version used to build ROOT and your local version. We’ll try to fix this kind of problem. One possible solution would be to build ROOT from source, but note that there is an internal compiler error with the latest version of Visual Studio…

Cheers, Bertrand.

I’m currently using visual studio 2017.

I have the same errors. My VS2017 version is:

Microsoft Visual Studio Community 2017 Version 15.8.4

VisualStudio.15.Release/15.8.4+28010.2026
Microsoft .NET Framework
version 4.7.03056

Visual C++ 2017 00369-60000-00001-AA695

Python 15.8.18241.1

SQL Server Data Tools 15.1.61808.07020

Visual C++ для кроссплатформенной разработки мобильных приложений 15.0.27924.00

Разработка на Visual C++ для Linux 1.0.9.27924

I would advise to build from source, but unfortunately, the version 15.8.4 of Visual Studio 2017 contains a bug that has been reported to Microsoft. You can even vote for it if you want :wink:

Ye, I have already tried to build it but, unfortunately saw compiler error and stopped my trying :slight_smile:

So please vote on the bug report, it might accelerate the process…

1 Like

I reported about this bug and asked my colleagues to press “follow” too. Today i have install new version of VS2017 -> 15.8.5. Errors is still there.

1 Like

Thank you very much! But following is not sufficient, you should vote… :wink:
And I know, I also updated to 15.8.5…

I found another problem with ROOT installed on my PC (Windows 10). Maybe it is because of VS2017 version problems:
I try tutorial macros slits.C

// Example drawing the interference pattern of light
// falling on a grid with n slits and ratio r of slit
// width over distance between slits.

auto pi = TMath::Pi();

// function code in C
double single(double *x, double *par) {
    return pow(sin(pi*par[0]*x[0])/(pi*par[0]*x[0]),2);
}

double nslit0(double *x,double *par){
    return pow(sin(pi*par[1]*x[0])/sin(pi*x[0]),2);
}

double nslit(double *x, double *par){
    return single(x,par) * nslit0(x,par);
}
 
 // This is the main program
void slits() {
   float r,ns;
 
   // request user input
   cout << "slit width / g ? ";
   scanf("%f",&r);
   cout << "# of slits? ";
   scanf("%f",&ns);
   cout <<"interference pattern for "<< ns <<" slits, width/distance: "<<r<<endl;
 
   // define function and set options
   TF1 *Fnslit  = new TF1("Fnslit",nslit,-5.001,5.,2);
   Fnslit->SetNpx(500);
 
   // set parameters, as read in above;
   Fnslit->SetParameter(0,r);
   Fnslit->SetParameter(1,ns);
 
   // draw the interference pattern for a grid with n slits
   Fnslit->Draw();
 }

this bring me errors:

root [0]
Processing slits.C...
In file included from input_line_10:1:
D:\ROOT\STUDY\slits.C:25:4: error: use of undeclared identifier 'cout'
   cout << "slit width / g ? ";
   ^
D:\ROOT\STUDY\slits.C:27:4: error: use of undeclared identifier 'cout'
   cout << "# of slits? ";
   ^
D:\ROOT\STUDY\slits.C:29:4: error: use of undeclared identifier 'cout'
   cout <<"interference pattern for "<< ns <<" slits, width/distance: "<<r<<endl;
   ^
D:\ROOT\STUDY\slits.C:29:77: error: use of undeclared identifier 'endl'
   cout <<"interference pattern for "<< ns <<" slits, width/distance: "<<r<<endl;
                                                                            ^

I add std:: befor cout and endl

ROOT falls without any messages at the line
std::cout <<"interference pattern for "<< ns <<" slits, width/distance: "<<r<<std::endl;
just befor secont operator << (a hade only saw line "root[3] interference pattern for ")

this causes 2 errors in application events:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2018-09-24T11:27:42.973403300Z" />
    <EventRecordID>12713</EventRecordID>
    <Channel>Application</Channel>
    <Computer>*********</Computer>
    <Security />
  </System>
  <EventData>
    <Data>root.exe</Data>
    <Data>0.0.0.0</Data>
    <Data>5b5b151c</Data>
    <Data>unknown</Data>
    <Data>0.0.0.0</Data>
    <Data>00000000</Data>
    <Data>c00001a5</Data>
    <Data>0035ce50</Data>
    <Data>3ed4</Data>
    <Data>01d453f992e66059</Data>
    <Data>C:\root\root_v6.14.02.win32.vc15\bin\root.exe</Data>
    <Data>unknown</Data>
    <Data>ce02c52e-df07-43de-bdb9-5eef9e2a4b01</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

and

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2018-09-24T11:27:44.352743500Z" />
    <EventRecordID>12715</EventRecordID>
    <Channel>Application</Channel>
    <Computer>*************</Computer>
    <Security />
  </System>
  <EventData>
    <Data>root.exe</Data>
    <Data>0.0.0.0</Data>
    <Data>5b5b151c</Data>
    <Data>ntdll.dll</Data>
    <Data>10.0.17134.254</Data>
    <Data>bf2f8c99</Data>
    <Data>c0000005</Data>
    <Data>00051169</Data>
    <Data>3ed4</Data>
    <Data>01d453f992e66059</Data>
    <Data>C:\root\root_v6.14.02.win32.vc15\bin\root.exe</Data>
    <Data>C:\WINDOWS\SYSTEM32\ntdll.dll</Data>
    <Data>9606b6a7-9007-457a-ae8b-6b34a0394b30</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

Maby i need to create new topic about this problem?

std::cin causes same error, so i deside to use printf instad of cout. And this works fine.

Well, it works for me, even when starting ROOT from a regular command prompt…

Usually when root complains, I do a fresh installation of everything. That’s mingw, vs, and root. If possible uninstall everything and do a fresh install

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.