Cin cout crashed my self-compiled ROOT V6.16

Note that if you take the pre-built nightly binaries for Visual Studio 2019, it works as well. For example this one: root_v6.16.00-93-gc52748e82b.win32.vc16.zip from the nightly builds

Thank you very much!

Best wishes!
Han

1 Like

Hi, this problem seems not fixed with the master branch of git (https://codeload.github.com/root-project/root/zip/master).

Here is a little Debug information.(PS: This problem occurs also in the release version.)

**

“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\root.exe”。已加载符号。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\ntdll.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\kernel32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\KernelBase.dll”。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libRint.dll”。已加载符号。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libCore.dll”。已加载符号。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\liblzma.dll”。模块已生成,不包含符号。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcrt.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\shell32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\shlwapi.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\gdi32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\user32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\advapi32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\sechost.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\rpcrt4.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\sspicli.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\cryptbase.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\lpk.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\usp10.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\wsock32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\ws2_32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\nsi.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\IPHLPAPI.DLL”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\winnsi.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\ole32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcp140.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\vcruntime140.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-runtime-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\ucrtbase.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-heap-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-string-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-stdio-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-convert-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-locale-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-math-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-filesystem-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-time-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-environment-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-crt-utility-l1-1-0.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\WindowsCodecs.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\msimg32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\imm32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\msctf.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\dhcpcsvc.dll”。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libRIO.dll”。已加载符号。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libThread.dll”。已加载符号。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libCling.dll”。已加载符号。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\version.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\oleaut32.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\uxtheme.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\clbcatq.dll”。
“root.exe”(Win32): 已加载“C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\dwmapi.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\cryptsp.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\rsaenh.dll”。
“root.exe”(Win32): 已加载“C:\Windows\SysWOW64\RpcRtRemote.dll”。
“root.exe”(Win32): 已加载“G:\root-master-v616\build\bin\libMathCore.dll”。已加载符号。
线程 0x568 已退出,返回值为 0 (0x0)。
0x7760E4E3 (ntdll.dll) (root.exe 中)处有未经处理的异常: 0xC0000005: 写入位置 0x000000F1 时发生访问冲突。
**

Thank you!
Best Wishes,
Han

Sorry, I can’t reproduce the problem:

C:\Users\bellenot\build\release>root -l
root [0] cout << "test";
test
root [1] cout << "test"
test(std::basic_ostream<char, std::char_traits<char> > &) @0x76521ba8
root [2] cout << "test";
test
root [3] cout << endl;

root [4] .q

C:\Users\bellenot\build\release>

Did you build ROOT yourself? That could be the issue. Could you try to build it like the following (select you own directories):

C:\Users\bellenot\temp\git>git clone git@github.com:root-project/root.git master
Cloning into 'master'...
remote: Enumerating objects: 676980, done.
remote: Total 676980 (delta 0), reused 0 (delta 0), pack-reused 676980
Receiving objects: 100% (676980/676980), 715.41 MiB | 10.89 MiB/s, done.
Resolving deltas: 100% (488785/488785), done.
Checking out files: 100% (18544/18544), done.

C:\Users\bellenot\temp\git>cd ..\build\master

C:\Users\bellenot\temp\build\master>cmake -A Win32 -Thost=x64 ..\..\git\master
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.14393.
-- The C compiler identification is MSVC 19.20.27508.1
-- The CXX compiler identification is MSVC 19.20.27508.1

skipping output...

-- Performing Test has_found_attribute_noinline - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/bellenot/temp/build/master

C:\Users\bellenot\temp\build\master>cmake --build . --config Release
Microsoft (R) Build Engine version 16.0.462+g62fb89029d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  CMake does not need to re-run because C:/Users/bellenot/temp/build/master/CMakeFiles/generate.stamp is up-to-date.
  CMake does not need to re-run because C:/Users/bellenot/temp/build/master/builtins/zlib/CMakeFiles/generate.stamp is
  up-to-date.

skipping output...

or:

C:\Users\bellenot\temp\build\master>cmake --build . --config Debug

Thank you very much for your reply.
I will try it.

Best Wishes!
Han

Hi,
This problem is due to the Windows 7. At last I moved to Windows 10. This issue is fixed. It seems that the Windows 7 is out-of-date.
I re-build git/master of ROOT v6.17. The re-build method is the same as I had posted here.
However a new problem troubled me!
When run a program, ROOT gives the following ERROR message:

Blockquote
root [0] .x DrawPulser.cpp
Error in TCling::RegisterModule: cannot find dictionary module libMatrix_rdict.pcm
Error in TCling::RegisterModule: cannot find dictionary module libHist_rdict.pcm
Error in TCling::RegisterModule: cannot find dictionary module libGraf_rdict.pcm
Error in TCling::RegisterModule: cannot find dictionary module libGpad_rdict.pcm
Error in TCling::RegisterModule: cannot find dictionary module libGui_rdict.pcm

I have checked that all of these *.pcm files is installed in $(ROOTSYS)lib .

Would you please kindly help me?
Thank you very much!
Han

How did you build ROOT? Did you install it? Did you call root\bin\thisroot.bat? Can you execute any of the ROOT tutorials?

1.How did you build ROOT?
I build the ROOTv617 with Visual Studio 2019 in the “Windows” mode as shown in this picture:

I have tried the command lines (with my own directories): cmake -A Win32 -Thost=x64 …\master; cmake --build . --config Debug. However, the libWin32gdk is not produced. I am sure that this is because the file .\graf2d\win32gdk\gdk\src\glib\gunichartables.h has to be changed and saved in the ** Unicode (UTF-8 with signature ) - Codepage 65001** format. With this modification, in “Windows” mode with VS2019, I re-build ROOTv617 successfully.
PS:Is there some difference of the ‘command line’ mode with cmake and the ‘Whindow’ mode with VS2019?

2.Did you install it?
Yes, I do run the command line cmake -P cmake_install.cmake .

**3.Did you call root\bin\thisroot.bat **
Yes, On Windows 10, with PowerShell, I run thisroot.bat.

4.Can you execute any of the ROOT tutorials?
Yes, I can execute most of the .demo macros, except the geom/geometry.C.
While execute the .demo macros ROOT gives the same ERROR message that: Error in TCling::RegisterModule: cannot find dictionary module *.pcm

Thank you very much!
Best wishes!
Han

I don’t understand why you over-complicate things… Could you simply try the following:

  • Open a x86 Native Tools Command Prompt for VS 2019
  • download the source code of ROOT (or git clone the repository) don’t edit/modify anything!!
  • create a build directory and cd into it
  • cmake -A Win32 -Thost=x64 …\master (or wherever the unmodified source is)
  • cmake --build . --config Debug

When the build is over, call bin\thisroot.bat, and then try to execute your DrawPulser.cpp and let me know

Thank you very much for your patient.
I am doing a new building. It needs about 3 hours on my laptop.
I will let you know the result.

Best wishes!
Han

Hi,
The file gunichartables.h gives a lot of error.
I uploaded the error messages here. This is why I modified this file as I discribed before.
build.txt (16.7 KB)

Please help!
Thank you!
Best Wishes!
Han

First, don’t generate nmake makefiles, use -G"Visual Studio 16 2019"
Then, how did you take the source code? from a tar file or from git? I’ve never seen this error before…

Hi,
I clone the sourece code form git\master, not the tar file.
My Windows is in Chinese and the VS2019 is also in Chinese. Should this be the reasone of the error?
My Cmake version is 3.14.3.

Thank you!
Han

I don’t think so, but who knows… Anyway, for sure you must not generate nmake makefiles!

Thank you.
To avoid the produce of nmake file the command line should be write as this:
cmake -A Win32 -Thost=x64 -G"Visual Studio 16 2019" …\master
cmake --build . --config Debug
Am I right?
I am not good at cmake. Please help.

Thank you!
Han

And BTW, not sure if this could change anything, but the core.autocrlf value of git config should be set as input:

C:\Users\bellenot\github\master>git config core.autocrlf
input

Try to use cmake-gui!

Last times I used cmake-gui. Here is the copy of the setting. I know this will waste a lot of your time. So thank you very much!





Best Wishes!
Han

And I will try “git config core.autocrlf” setting.

OK, so the important part here is the Current Generator (on the bottom line), which is set as Visual Studio 2019, which seems just fine. So I don’t understand why, in you log file, you have:

NMAKE : fatal error U1077: ¡°"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.20.27508\bin\HostX64\x86\cl.EXE"¡±: return code¡°0x2¡± [D:\ROOTV617-Build-Debug2\graf2d\win32gdk\glib.vcxproj]
  Stop.

Anyway, I think I can reproduce the problem. What you can do for now (until we fix it) is to manually copy all the pcm files from the lib directory to the bin directory (in your install location)

Thank you very much!
You have helped me a lot. Please accept my sincere respect!

Han

1 Like