ROOT Version: 6.14/02
Platform: SL6
Compiler: gcc (GCC) 6.4.0
Heya,
I’m trying to run a TApplication in a vncserver on the lxplus machines.
When the program reaches the end of the execution, a very bad backtrace happens that makes the whole vncserver crash.
I should say that my initial code didn’t have any EventDisplayApp->Run(true);
, but the problem still persists when this line is here and I ctrl-c
or File->QuitROOT
on the TApplication
.
I’ve also tried to remove the gSystem->ProcessEvents();
that doesn’t work. I’m running out of ideas!
This is definitely a problem with TApplication as when I comment out the first line of the main the problem disappears (and so does my nice display as well…).
Of course this run nicely on my laptop (macOS Mojave).
The code that I’m compiling/running is:
#include "TApplication.h"
#include "TCanvas.h"
#include "TSystem.h"
#include "TH1D.h"
#include <iostream>
int main(int argc, char *argv[]) {
TApplication* EventDisplayApp = new TApplication("EventDisplayApp", &argc, argv);
TH1F *h=new TH1F("h","Test",100,-10,10);
TCanvas c;
int count =0;
while(count<5) {
h->Reset();
h->FillRandom("gaus",1000);
h->Draw();
gSystem->ProcessEvents();
c.Update();
usleep(1000000);
++count;
}
EventDisplayApp->Run(true);
try{
delete EventDisplayApp;
} catch (...) {
std::cout << "Caught exception while deleting the app...\n";
}
return 0;
}
And here is the vnc log:
(EE) Backtrace:
(EE) 0: /usr/bin/Xvnc (xorg_backtrace+0x55) [0x5c31b5]
(EE) 1: /usr/bin/Xvnc (0x400000+0x1c6b19) [0x5c6b19]
(EE) 2: /usr/lib64/libpthread.so.0 (0x7ff4e6fe1000+0xf5d0) [0x7ff4e6ff05d0]
(EE) 3: /usr/bin/Xvnc (DamageUnregister+0x10) [0x4d8330]
(EE) 4: /usr/bin/Xvnc (compSetParentPixmap+0x37) [0x51f767]
(EE) 5: /usr/bin/Xvnc (compFreeClientWindow+0x231) [0x51fa01]
(EE) 6: /usr/bin/Xvnc (0x400000+0x11a499) [0x51a499]
(EE) 7: /usr/bin/Xvnc (0x400000+0x197932) [0x597932]
(EE) 8: /usr/bin/Xvnc (FreeResource+0xde) [0x59850e]
(EE) 9: /usr/bin/Xvnc (compUnredirectWindow+0xb1) [0x51ee01]
(EE) 10: /usr/bin/Xvnc (0x400000+0x11b723) [0x51b723]
(EE) 11: /usr/bin/Xvnc (compDestroyWindow+0x179) [0x51d1f9]
(EE) 12: /usr/bin/Xvnc (0x400000+0xd85be) [0x4d85be]
(EE) 13: /usr/bin/Xvnc (0x400000+0x896f0) [0x4896f0]
(EE) 14: /usr/bin/Xvnc (0x400000+0xd229e) [0x4d229e]
(EE) 15: /usr/bin/Xvnc (0x400000+0x19c4e4) [0x59c4e4]
(EE) 16: /usr/bin/Xvnc (DeleteWindow+0x76) [0x59f0f6]
(EE) 17: /usr/bin/Xvnc (0x400000+0x197932) [0x597932]
(EE) 18: /usr/bin/Xvnc (FreeResource+0xde) [0x59850e]
(EE) 19: /usr/bin/Xvnc (ProcDestroyWindow+0x8f) [0x56dbcf]
(EE) 20: /usr/bin/Xvnc (Dispatch+0x31d) [0x573a9d]
(EE) 21: /usr/bin/Xvnc (dix_main+0x39a) [0x57799a]
(EE) 22: /usr/lib64/libc.so.6 (__libc_start_main+0xf5) [0x7ff4e4b1f3d5]
(EE) 23: /usr/bin/Xvnc (0x400000+0x5630e) [0x45630e]
(EE)
(EE) Segmentation fault at address 0x38
(EE)
Any idea what is going on here?