Crash when my ROOT application closes

Dear all,

I am working with a C++ application which uses ROOT libraries. On certain computer systems I receive a crash right after my application finishes the last line in my “main” function. The stack trace is printed below:

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

from libstdcxx.v6.printers import register_libstdcxx_printers

#0 0x00007fb11d5786dc in __libc_waitpid (pid=15563, stat_loc=stat_loc
entry=0x7fffe683ba80, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007fb11d4fd2e2 in do_system (line=) at …/sysdeps/posix/system.c:148
#2 0x00007fb120f07073 in TUnixSystem::StackTrace() () from /home/na280/src/root/lib/libCore.so
#3 0x00007fb120f08d7c in TUnixSystem::DispatchSignals(ESignals) () from /home/na280/src/root/lib/libCore.so
#4
#5 0x00007fb115894ae5 in ?? () from /usr/lib/x86_64-linux-gnu/libXft.so.2
#6 0x00007fb115890a27 in ?? () from /usr/lib/x86_64-linux-gnu/libXft.so.2
#7 0x00007fb1198a74b2 in XCloseDisplay () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#8 0x00007fb115eddab0 in TGX11::CloseDisplay() () from /home/na280/src/root/lib/libGX11.so
#9 0x00007fb11ab3f8cf in TGClient::~TGClient() () from /home/na280/src/root/lib/libGui.so
#10 0x00007fb11ab3f929 in TGClient::~TGClient() () from /home/na280/src/root/lib/libGui.so
#11 0x00007fb11ac13cc4 in TRootApplication::~TRootApplication() () from /home/na280/src/root/lib/libGui.so
#12 0x00007fb11ac13d19 in TRootApplication::~TRootApplication() () from /home/na280/src/root/lib/libGui.so
#13 0x00007fb120e34337 in TApplication::~TApplication() () from /home/na280/src/root/lib/libCore.so
#14 0x000000000040483a in main (argv=1, argc=) at src/exe/STARucn.cxx:76

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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 0x00007fb115894ae5 in ?? () from /usr/lib/x86_64-linux-gnu/libXft.so.2
#6 0x00007fb115890a27 in ?? () from /usr/lib/x86_64-linux-gnu/libXft.so.2
#7 0x00007fb1198a74b2 in XCloseDisplay () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#8 0x00007fb115eddab0 in TGX11::CloseDisplay() () from /home/na280/src/root/lib/libGX11.so
#9 0x00007fb11ab3f8cf in TGClient::~TGClient() () from /home/na280/src/root/lib/libGui.so
#10 0x00007fb11ab3f929 in TGClient::~TGClient() () from /home/na280/src/root/lib/libGui.so
#11 0x00007fb11ac13cc4 in TRootApplication::~TRootApplication() () from /home/na280/src/root/lib/libGui.so
#12 0x00007fb11ac13d19 in TRootApplication::~TRootApplication() () from /home/na280/src/root/lib/libGui.so
#13 0x00007fb120e34337 in TApplication::~TApplication() () from /home/na280/src/root/lib/libCore.so
#14 0x000000000040483a in main (argv=1, argc=) at src/exe/STARucn.cxx:76

My main function looks like this:

int main(int argv, char* argc[])
{
std::string file = argv>1 ? argc[1] : “scripts/STARucn.par”;
//int verbose = argv>2 ? atoi(argc[2]) : 0;
//verbose=2;
TApplication app(“STARucn”,&argv,argc); // This is the line 76 that the program is crashing on

gErrorIgnoreLevel=10000;

///////////////////////////////////
/// My program does the work here ///
/////////////////////////////////

std::cout << “STARucn Finished” << std::endl;
return 0;
}

Commenting out the line TApplication app(“STARucn”,&argv,argc); prevents the crash, but it causes different crashes when I try to use certain root-provided features. The TApplication object does not seem to be directly accessed in my code.

I am currently working on a fairly stock version of ubuntu 14.04, inside a Virtualbox VM. I am using ROOT 5.34.32, which I compiled myself. This crash at the finish of the program does not seem to happen on all systems. I did not write the main part of the application, so am not completely familiar with the inner workings. I am slightly familiar with ROOT, but am by no means an expert.

Thanks in advance,
Nick

Try:
TApplication app(“STARucn”, 0, 0);

Thanks for the suggestion, but it seems not to have had an effect.