TGCompositeFrame and batch mode


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 :

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


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 :
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,


First, I moved your post to ROOT Support. Then, the ROOT GUI is not supposed to work in batch mode…

Cheers, Bertrand.