Hello,
I installed Root Version 6.22/06 using homebrew on MacOS 10.15.7. I need to convert hbook files to root files with h2root. I get the following error message when I try to convert a file:
Converting directory //example
>>>>>> CALL HRZKEY(IDN)
Converting RWN with ID= 1, nentries = 3324
*** Break *** bus error
[/usr/local/Cellar/root/6.22.06_2/lib/root/libCore.so] TUnixSystem::DispatchSignals(ESignals) (no debug info)
[/usr/local/Cellar/root/6.22.06_2/lib/root/libCore.so] SigHandler(ESignals) (no debug info)
[/usr/local/Cellar/root/6.22.06_2/lib/root/libCore.so] sighandler(int) (no debug info)
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/usr/local/bin/h2root] hgiven_ (no debug info)
[/usr/local/bin/h2root] convert_rwn(int) (no debug info)
[/usr/local/bin/h2root] convert_directory(char const*) (no debug info)
[/usr/local/bin/h2root] main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
A .root file is created but it is empty.
Does anyone have any idea how to save that problem? Your help is greatly appreciated
I could not solve the problem with the installed binary version on my mac. It seems to be a problem concerning the installation of ROOT on my laptop.
I did manage to convert the files on a machine running ubuntu.
It seems like this is a problem with the convert_rwn subroutine in the hbook.f file. I was able to get a working h2root by commenting out the following line on line 886 of misc/minicern/src/hbook.f:
IF (NCH .GT. 0) CHTITL = ’ ’
I’m not a fortran expert so I’m not sure why this line breaks the code (is CHITITL allocatable?). Anyway, I could then recompile and run the code with no obvious issues with my hbook → root file output. I’m not entirely sure if this fix will work for all files (or correctly convert all files). In other words, this is more of a kludge than a fix. Use at your own risk.
Interesting. CHTITL is a returned parameter. It returns the ntuple name. This line was meant to clean the title in case it was not empty . I am not sure why it should produce a crash. It should not arm commenting it. On which kind of machine are you working ?
I work on macOS (Catalina). This has been a bug on mac for a while now (at least a year or two). I’ve been using various newer gcc versions for a while (not the standard mac clang), but I’m not sure with what version this bug showed up.