Break segmentation violation when executing sparsehist.C

ROOT Version: 6.28/08
Platform: ubuntu1~22.04

Dear expert, when running the sparsehist.C tutorial, i got the following error. I check in the forum whether there is something related already to this *** Break *** segmentation violation, but I cannot see exactly a similar issues for this tutorial.

What might be the root cause for this issue?

root [0] .L sparsehist.C 
root [1] .x sparsehist.C 

 *** Break *** segmentation violation
 Generating stack trace...
 0x00007fd2156b4514 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd214dc1520 in <unknown> from /lib/x86_64-linux-gnu/
 0x00007fd2120893b3 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd212233b18 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd2122200af in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd212220a6f in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd2122301b5 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5fca58 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f550dba in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f552377 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f55acfc in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f559de5 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f52516c in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f525412 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f509006 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f509114 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5e8586 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5ec642 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5ec954 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5fa3c5 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5fbe08 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f5e5590 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f2ae056 in <unknown> from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f2aeb16 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0x904 from /snap/root-framework/926/usr/local/lib/
 0x00007fd20f2b2762 in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) + 0xa6 from /snap/root-framework/926/usr/local/lib/
 0x00007fd21550ffc9 in TApplication::ExecuteFile(char const*, int*, bool) at TApplication.cxx:? from /snap/root-framework/926/usr/local/lib/
 0x00007fd21550f6e4 in TApplication::ProcessFile(char const*, int*, bool) + 0x34 from /snap/root-framework/926/usr/local/lib/
 0x00007fd21550f4ca in TApplication::ProcessLine(char const*, bool, int*) + 0xd72 from /snap/root-framework/926/usr/local/lib/
 0x00007fd215a154dd in TRint::ProcessLineNr(char const*, char const*, int*) + 0x33b from /snap/root-framework/926/usr/local/lib/
 0x00007fd215a14aad in TRint::HandleTermInput() + 0x2f9 from /snap/root-framework/926/usr/local/lib/
 0x00007fd215a11f81 in TTermInputHandler::Notify() + 0x35 from /snap/root-framework/926/usr/local/lib/
 0x00007fd215a16edb in TTermInputHandler::ReadNotify() + 0x29 from /snap/root-framework/926/usr/local/lib/
 0x00007fd2156be032 in TUnixSystem::CheckDescriptors() + 0x106 from /snap/root-framework/926/usr/local/lib/
 0x00007fd2156bd2ac in TUnixSystem::DispatchOneEvent(bool) + 0x178 from /snap/root-framework/926/usr/local/lib/
 0x00007fd21558fbb7 in TSystem::InnerLoop() + 0x45 from /snap/root-framework/926/usr/local/lib/
 0x00007fd21558f917 in TSystem::Run() + 0xed from /snap/root-framework/926/usr/local/lib/
 0x00007fd215510199 in TApplication::Run(bool) + 0x61 from /snap/root-framework/926/usr/local/lib/
 0x00007fd215a13dd4 in TRint::Run(bool) + 0x90e from /snap/root-framework/926/usr/local/lib/
 0x0000559b0f1565e4 in main + 0x8a from /snap/root-framework/926/usr/local/bin/root.exe
 0x00007fd214da8d90 in <unknown> from /lib/x86_64-linux-gnu/
 0x00007fd214da8e40 in __libc_start_main + 0x80 from /lib/x86_64-linux-gnu/
 0x0000559b0f156245 in _start + 0x25 from /snap/root-framework/926/usr/local/bin/root.exe
Root > 

thank you

The help of this tutorial suggest to run it this way:

root[0] .L $ROOTSYS/tutorials/hist/sparsehist.C+
root[1] sparsehist()

Or (if you run root from $ROOTSYS/tutorials/hist/):

root[0] .L sparsehist.C+
root[1] sparsehist()
1 Like

Thank you for your prompt response.
I tried the first time to follow it but, as I got the following message, I decided to run it differently.

root [0] .L $ROOTSYS/tutorials/hist/sparsehist.C+ 
root [1] sparsehist()
Please run this script in compiled mode by running ".x sparsehist.C+"

The when changing the running method, I have the issue presented earlier.

Dear @couet Thanks so much,
I have check and the issue was the file DIR location

Note that there is a problem when reloading the script:

root [0] .L sparsehist.C 
root [1] .L sparsehist.C 
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 255.
Abort trap: 6

See Reloading sparsehist.C triggers an assert in LLVM · Issue #14012 · root-project/root · GitHub

1 Like

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