Problem with my event display that makes use of GUI

Dear Rooters,
I’m just a beginner and I wrote for the first time a very simple event display that is based on a single class and uses threads to separate the graphic from the actual reading of the data. The display shows a series of histograms that update every minute and has a graphic panel made of buttons that change color depending on the level counts of the detector’s modules. So very simple… But I encouter some problem when I compile the program. Sometimes it will compile without any problem, but the after a while the program crashes and blocks the computer and other times it crashes during the make session with a “signal 11” or segmentation fault , with the following message:

++ -O -Wall -DR__THREAD -fPIC -I/usr/local/root/include -g -pthread -I/usr/loca
l/root/include -Wno-deprecated -c -o ArgoFrame.o ArgoFrame.cc
g++ -O -Wall -DR__THREAD -fPIC -I/usr/local/root/include -g -pthread -I/usr/loca
l/root/include -Wno-deprecated -c ArgoDict.cxx
g++ -shared -O ArgoFrame.o ArgoDict.o -o libArgo.so
libArgo.so done
g++ -O -Wall -DR__THREAD -fPIC -I/usr/local/root/include -g -pthread -I/usr/loca
l/root/include -Wno-deprecated -c -o argomain.o argomain.C
In file included from /usr/local/root/include/TApplication.h:37,
from argomain.C:2:
/usr/local/root/include/TApplicationImp.h:31: internal error: Segmentation
fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://bugzilla.redhat.com/bugzilla/ for instructions
The bug is not reproducible, so it is likely a hardware or OS problem.
make: *** [argomain.o] Error 1

I reported the problem to Bugzilla but they answered that it’s not a bug of GCC and it is likely a hardware or OS problem.
I read on internet that the Signal 11 could mean that the program accessed a memory location that was not assigned or it could be a hardware problem. I would like to exclude one or the other. Could you please help me to see if my program access memory which is not allocated? I’ve attached the tar file of the my display…

Thank you very much in advance
Irina
ROOT_FORUM.tar.gz (224 KB)

I do not see any problem in compiling your application.
I had to
rm ArgoDict.*
rm *.o *.so
make
The make failed because your makefile references your local installation.
I changed the procedure to link the application to

g++ -O argomain.o libArgo.so -L/home/brun/root/lib -lCore -lCint -lHist \ -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics \ -lThread -lGui -pthread -lm -ldl -rdynamic -lm -ldl -rdynamic \ -o argomain

At this point, I can start the application, but it requires a data file, see below:

code [139] argomain
Info in : thread run requested
Info in : thread is running
Thread 1, id:-1218671696 is running…

kfile = 0
Open file : /grb11/grb060808.05
File : /grb11/grb060808.05 not found
[/code]

Your problem appears during the compilation. You seem to have a bad installation for gcc.

Rene

Hello, thanks for your quick answer. The problem is that sometimes it will compile without problem but after a while that the program is running a get the “signal 11” message and the computer stops and other times during the compilation I get this message:

g++: Internal error: Segmentation fault (program cc1plus)

I just want to exclude that it’s my program causing these problems. If only you could look through the main class ArgoFrame.cc and see if there are evident mistakes or I could send you a data file for example…

Thank you again
Irina

Irina,

Let me repeat. Your program behaves correctly. I can execute it. I see your GUI, etc. I cannot run the event display part because the program expects a data file.
Your problem is likely a hardware problem. See, eg:
sienet.hu/linux/sig11-FAQ.html

Rene

Thank you, I will check the hardware then…