Ok, this is what I tried and this is my result (the error message is similar to what I see above the null pointer error:
$ root
------------------------------------------------------------
| Welcome to ROOT 6.18/04 https://root.cern |
| (c) 1995-2019, The ROOT Team |
| Built for linuxx8664gcc on Sep 13 2019, 20:06:00 |
| From tag , 11 September 2019 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
root [0] gFile->ls();
#0 0x00007f2754c34687 in __GI___waitpid (pid=4051, stat_loc=stat_loc
entry=0x7fffd88c7878, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007f2754b9f067 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
#2 0x00007f2755864823 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x7fffd0065b80) at /home/cucip/root-6.18.04/core/unix/src/TUnixSystem.cxx:2106
#3 TUnixSystem::StackTrace (this=0x7fffd0065b80) at /home/cucip/root-6.18.04/core/unix/src/TUnixSystem.cxx:2400
#4 0x00007f274fff8d55 in cling::MultiplexInterpreterCallbacks::PrintStackTrace() () from /home/cucip/builddir/lib/libCling.so
#5 0x00007f274fff875b in cling_runtime_internal_throwIfInvalidPointer () from /home/cucip/builddir/lib/libCling.so
#6 0x00007f27560910b4 in ?? ()
#7 0x00007fffd09e3cb0 in ?? ()
#8 0x00007fffd00c7480 in ?? ()
#9 0x00007fffd0a1dc38 in ?? ()
#10 0x00007f274fff8710 in ?? () from /home/cucip/builddir/lib/libCling.so
#11 0x00007fffd011c440 in ?? ()
#12 0x0000000056091000 in ?? ()
#13 0x00007f275008eab0 in ?? () from /home/cucip/builddir/lib/libCling.so
#14 0x00007fffd88ca170 in ?? ()
#15 0x00007f2756091000 in ?? ()
#16 0x00007f27500680a0 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/cucip/builddir/lib/libCling.so
#17 0x00007f274fffae77 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/cucip/builddir/lib/libCling.so
#18 0x00007f274fffc4df in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/cucip/builddir/lib/libCling.so
#19 0x00007f274fffc787 in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /home/cucip/builddir/lib/libCling.so
#20 0x00007f27500bf72d in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/cucip/builddir/lib/libCling.so
#21 0x00007f274ff7b68e in HandleInterpreterException (metaProcessor=0x7fffd06fa380, input_line=<optimized out>, compRes=
0x7fffd88ca15c: cling::Interpreter::kSuccess, result=result
entry=0x7fffd88ca170) at /home/cucip/root-6.18.04/core/metacling/src/TCling.cxx:2152
#22 0x00007f274ff8ff8d in TCling::ProcessLine (this=0x7fffd00c6c90, line=<optimized out>, error=0x7fffd88ca65c) at /home/cucip/root-6.18.04/core/metacling/src/TCling.cxx:2310
#23 0x00007f2755711ca2 in TApplication::ProcessLine (this=0x7fffd00b2900, line=<optimized out>, sync=<optimized out>, err=0x7fffd88ca65c) at /home/cucip/root-6.18.04/core/base/src/TApplication.cxx:1026
#24 0x00007f2755be1962 in TRint::ProcessLineNr (this=this
entry=0x7fffd00b2900, filestem=filestem
entry=0x7f2755bf39cd "ROOT_prompt_", line=0x7fffd88ca719 "gFile->ls();", error=0x7fffd88ca65c, error
entry=0x0) at /home/cucip/root-6.18.04/core/rint/src/TRint.cxx:746
#25 0x00007f2755be1cd4 in TRint::HandleTermInput (this=0x7fffd00b2900) at /home/cucip/root-6.18.04/core/rint/src/TRint.cxx:607
#26 0x00007f2755866600 in TUnixSystem::CheckDescriptors (this=this
entry=0x7fffd0065b80) at /home/cucip/root-6.18.04/core/unix/src/TUnixSystem.cxx:1309
#27 0x00007f2755867f98 in TUnixSystem::DispatchOneEvent (this=0x7fffd0065b80, pendingOnly=<optimized out>) at /home/cucip/root-6.18.04/core/unix/src/TUnixSystem.cxx:1064
#28 0x00007f275577cd81 in TSystem::InnerLoop (this=0x7fffd0065b80) at /home/cucip/root-6.18.04/core/base/src/TSystem.cxx:412
#29 TSystem::Run (this=0x7fffd0065b80) at /home/cucip/root-6.18.04/core/base/src/TSystem.cxx:362
#30 0x00007f275570fc7f in TApplication::Run (this=this
entry=0x7fffd00b2900, retrn=retrn
entry=false) at /home/cucip/root-6.18.04/core/base/src/TApplication.cxx:1178
#31 0x00007f2755be32d1 in TRint::Run (this=0x7fffd00b2900, retrn=<optimized out>) at /home/cucip/root-6.18.04/core/rint/src/TRint.cxx:460
#32 0x00007f2756200a0c in main (argc=<optimized out>, argv=0x7fffd88ccaa8) at /home/cucip/root-6.18.04/main/src/rmain.cxx:30
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
ROOT_prompt_0:1:1: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
gFile->ls();
^~~~~
/home/cucip/builddir/include/TFile.h:335:15: note: expanded from macro 'gFile'
#define gFile (TFile::CurrentFile())
^~~~~~~~~~~~~~~~~~~~~~
root [1]
If I type .ls in the root[1] terminal , I get nothing?
What does it mean? Is there a way to fix this?