Crash when drawing

I am using Ubuntu 16.04 and gcc version 5.4.1 20160904 (Ubuntu 5.4.1-2ubuntu1~16.04)
If I compile a program linking with root libraries it works fine.
But if I try to use ROOT to plot the objects I created with the program I get the crash below.
I tried with ROOT 6.08/00 and ROOT 6.08/02 built for gcc version 5.4 and Ubuntu 16.04.
I also tried to compile ROOT 6.06/06 and 5.99.06.
Same crash happens with all ROOT versions I tried.

Any help welcome.

vitor@kaon:~/teste-root$ root output.root

| Welcome to ROOT 6.08/00 root.cern.ch |
| © 1995-2016, The ROOT Team |
| Built for linuxx8664gcc |
| From tag v6-08-00, 4 November 2016 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
Attaching file output.root as _file0…
(TFile ) 0x3858690
root [1] _file0->ls()
TFile
* output.root
TFile* output.root
KEY: TF1 seno;1 sin(x)
KEY: TCanvas c;1 c1
root [2] seno->Draw()
Error in TClingCallFunc::make_wrapper: Failed to compile
==== SOURCE BEGIN ====
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
attribute((used)) extern “C” void __cf_0(void* obj, int nargs, void** args, void* ret)
{
if (ret) {
new (ret) (double) (TFormula____id13848592277636731913((double**)args[0]));
return;
}
else {
TFormula____id13848592277636731913(
(double**)args[0]);
return;
}
}
#pragma clang diagnostic pop
==== SOURCE END ====
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

#0 0x00007f90a9ea64ca in __GI___waitpid (pid=12785, stat_loc=stat_loc
entry=0x7ffc09a9ae80, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f90a9e1ffbb in do_system (line=) at …/sysdeps/posix/system.c:148
#2 0x00007f90aaa16ae4 in TUnixSystem::StackTrace() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#3 0x00007f90aaa1943c in TUnixSystem::DispatchSignals(ESignals) () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#4
#5 0x0000000000000000 in ?? ()
#6 0x00007f909519129c in TFormula::DoEval(double const*, double const*) const () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#7 0x00007f909510773f in TF1::EvalPar(double const*, double const*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#8 0x00007f909510ed23 in TF1::DoCreateHistogram(double, double, bool) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#9 0x00007f909510e448 in TF1::Paint(char const*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#10 0x00007f90949eb27b in TPad::PaintModified() () from /home/vitor/aplicativos/root_v6.08.00/lib/libGpad.so
#11 0x00007f9094a111dd in TCanvas::Update() () from /home/vitor/aplicativos/root_v6.08.00/lib/libGpad.so
#12 0x00007f90a678b1d9 in TCling::UpdateAllCanvases() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCling.so
#13 0x00007f90a67911e4 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libCling.so
#14 0x00007f90a6783dc7 in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libCling.so
#15 0x00007f90aad819eb in TRint::HandleTermInput() () from /home/vitor/aplicativos/root_v6.08.00/lib/libRint.so
#16 0x00007f90aaa1892c in TUnixSystem::CheckDescriptors() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#17 0x00007f90aaa19d6a in TUnixSystem::DispatchOneEvent(bool) () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#18 0x00007f90aa920044 in TSystem::InnerLoop() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#19 0x00007f90aa91eb7f in TSystem::Run() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#20 0x00007f90aa94777f in TApplication::Run(bool) () from /home/vitor/aplicativos/root_v6.08.00/lib/libCore.so
#21 0x00007f90aad83057 in TRint::Run(bool) () from /home/vitor/aplicativos/root_v6.08.00/lib/libRint.so
#22 0x00000000004010dc in main ()

The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x0000000000000000 in ?? ()
#6 0x00007f909519129c in TFormula::DoEval(double const*, double const*) const () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#7 0x00007f909510773f in TF1::EvalPar(double const*, double const*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#8 0x00007f909510ed23 in TF1::DoCreateHistogram(double, double, bool) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#9 0x00007f909510e448 in TF1::Paint(char const*) () from /home/vitor/aplicativos/root_v6.08.00/lib/libHist.so
#10 0x00007f90949eb27b in TPad::PaintModified() () from /home/vitor/aplicativos/root_v6.08.00/lib/libGpad.so
#11 0x00007f9094a111dd in TCanvas::Update() () from /home/vitor/aplicativos/root_v6.08.00/lib/libGpad.so
#12 0x00007f90a678b1d9 in TCling::UpdateAllCanvases() () from /home/vitor/aplicativos/root_v6.08.00/lib/libCling.so

Root >

Hi,

I think this is a known issue and those post may help:
[url]ROOT6 - Canvas won't display
[url]Problem using TGraphErrors created by other version of ROOT

And there is already a open bug report for it:
https://sft.its.cern.ch/jira/browse/ROOT-7512

Cheers, Bertrand.

Thanks Bertrand,

I switched back to root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
And apparently everything works again. Even if I am using Ubuntu 16.04 and gcc 5.4.1.

Hope the bug is fixed soon that we can move to ROOT version 6.

Thanks, Vitor