Hello,
I built a GUI through the TGMainFrame interface.
The class inheriting from TGMainFrame holds tabs with different TRootEmbeddedCanvas. Other classes are calling this TGMainFrame in order to retrieve the canvas corresponding to a given index (tab index).
The TG… interface is great and working fine !
But, I would also like to run this application in batch mode (because it is much more pratical while working through svn) and save the different canvas in C++ macros rather than displaying them. (The thing is that the canvas are, at present time, held by the member TRootEmbeddedCanvas of the TGMainFrame child class -that I am not able to instantiate, see below- and I would like to change the code as few as possible).
I am facing a segmentation error while loading my application with :
“USER@SOMEWHERE$ myApp -b”
even with this simple code:
int macro(int argc, char** argv)
{
TRint* theApp = new TRint("Whatever", &argc, argv, NULL, 0);
new TGCompositeFrame(); // segmentation occurs here
theApp->Run();
}
It seems that the segmentation fault is coming from TGCompositeFrame.
(Unfortunately, I cannot give you the exact line since I use a “institute’s installation” (5.32) compiled in “release mode”, so without the debug flags.)
So am I wondering whether TGMainFrame can actually work in batch mode and if it does, what am I doing wrong?
(I pop up this talk : root.cern.ch/root/roottalk/roottalk04/2450.html
it is not exactely new so I guess TGMainFrame actually offers a batch support and I am actually doing something wrong)
Thank you for your help,
Regards
Mat