Hi again. After compiling I incur into segmentation violation.
Commenting it out piece by piece I noticed that it is due to this line
fEc1 = new TRootEmbeddedCanvas("ec1", fcomposite2, 6000, 6000);
To confirm that it is not only a problem of my code, I run the example.C
script from this tutorial.
The result is similar, i.e. I get segmentation violation because of this line:
fEcanvas = new TRootEmbeddedCanvas("Ecanvas",fMain,200,200);
In both cases it is related to the TRootEmbeddedCanvas
declaration.
Here is the error for the latter case:
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f11ff8d89fa in wait4 () from /lib64/libc.so.6
#1 0x00007f11ff84b243 in do_system () from /lib64/libc.so.6
#2 0x00007f1201b12519 in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libCore.so
#3 0x00007f1201b11ed4 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libCore.so
#4 <signal handler called>
#5 0x00007f11f8b7f633 in asim_parse_argb_color () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#6 0x00007f11f8bd410c in build_xpm_colormap () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#7 0x00007f11f8baffc8 in xpm_file2ASImage () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#8 0x00007f11f8bb0176 in xpm2ASImage () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#9 0x00007f11f8bb12cc in file2ASImage_extra () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#10 0x00007f11f8b71f2f in TASImage::ReadImage(char const*, TImage::EImageFileTypes) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#11 0x00007f1200d38a1b in TImage::Open(char const*, TImage::EImageFileTypes) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGraf.so
#12 0x00007f12020ee2fa in TGPicturePool::GetPicture(char const*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#13 0x00007f12020f68fc in TGHScrollBar::TGHScrollBar(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#14 0x00007f1202001cf7 in TGCanvas::TGCanvas(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#15 0x00007f120219e8c6 in TRootEmbeddedCanvas::TRootEmbeddedCanvas(char const*, TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#16 0x00000000004022ec in MyMainFrame_ex::MyMainFrame_ex(TGWindow const*, unsigned int, unsigned int) ()
#17 0x0000000000402553 in main ()
===========================================================
The lines below might hint at the cause of the crash. If you see question
marks as part of the stack trace, try to recompile with debugging information
enabled and export CLING_DEBUG=1 environment variable before running.
You may get help by asking at the ROOT forum https://root.cern/forum
preferably using the command (.forum bug) in the ROOT prompt.
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs or (preferably) using the command (.gh bug) in
the ROOT prompt. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007f11f8b7f633 in asim_parse_argb_color () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#6 0x00007f11f8bd410c in build_xpm_colormap () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#7 0x00007f11f8baffc8 in xpm_file2ASImage () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#8 0x00007f11f8bb0176 in xpm2ASImage () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#9 0x00007f11f8bb12cc in file2ASImage_extra () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#10 0x00007f11f8b71f2f in TASImage::ReadImage(char const*, TImage::EImageFileTypes) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-fb5be/x86_64-el9-gcc13-opt/lib/libASImage.so
#11 0x00007f1200d38a1b in TImage::Open(char const*, TImage::EImageFileTypes) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGraf.so
#12 0x00007f12020ee2fa in TGPicturePool::GetPicture(char const*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#13 0x00007f12020f68fc in TGHScrollBar::TGHScrollBar(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#14 0x00007f1202001cf7 in TGCanvas::TGCanvas(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#15 0x00007f120219e8c6 in TRootEmbeddedCanvas::TRootEmbeddedCanvas(char const*, TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_105/ROOT/6.30.02/x86_64-el9-gcc13-opt/lib/libGui.so
#16 0x00000000004022ec in MyMainFrame_ex::MyMainFrame_ex(TGWindow const*, unsigned int, unsigned int) ()
#17 0x0000000000402553 in main ()
===========================================================
You can find the full code here.
I hope you can help me to spot the problem.
Thank you