QtRoot Segmentation Fault

Good Morning,
yesterday I tried to install ROOT with Qt4 support.
The system is running a OpenSUSE 11.0 Linux with gcc 4.3.1.
First I downloaded the INSTALL_QTROOT.sh mentioned in http://root.cern.ch/phpBB2/viewtopic.php?t=7711&highlight=qtroot installation script and started the compilation. The ROOT version was changed to ROOT_VERSION_MAJOR=5.21 and ROOT_VERSION_MIINOR=06. There were some compilation errors, for example in the ./root/qtRoot/qtgl/qglviewer/QGLViewer/VRender/TopologicalSortMethod.cpp. Some headerfiles were missing. After fixing the problems the compilation finished without any trouble.
I added the setEnvironment.sh to my .bashrc.
When I start ROOT the splash screen appears and the CInt can be used. But as soon as graphical commands such as TBrowser are executed, ROOT crashes with a segmentation fault.

root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.21/06  25 November 2008   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.21/06 (trunk@26464, De 17 2008, 16:33:00 on linux)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TBrowser t

 *** Break *** segmentation violation
Attaching to program: /proc/16329/exe, process 16329
[Thread debugging using libthread_db enabled]
[New Thread 0xb6bfa8e0 (LWP 16329)]
done.
done.
done.
done.
done.
done.
0xffffe430 in __kernel_vsyscall ()
#1  0xb6cc8953 in waitpid () from /lib/libc.so.6
#2  0xb6c6a12b in ?? () from /lib/libc.so.6
#3  0xb6d8304d in system () from /lib/libpthread.so.0
    at core/unix/src/TUnixSystem.cxx:1941
#5  0xb7a8d2cf in TUnixSystem::StackTrace (this=0x80e2430) at core/unix/src/TUnixSystem.cxx:2121
#6  0xb7a90674 in TUnixSystem::DispatchSignals (this=0x80e2430, sig=kSigSegmentationViolation) at core/unix/src/TUnixSystem.cxx:1088
#7  0xb7a907a0 in SigHandler (sig=kSigSegmentationViolation) at core/unix/src/TUnixSystem.cxx:350
#8  0xb7a861e5 in sighandler (sig=11) at core/unix/src/TUnixSystem.cxx:3357
#9  <signal handler called>
#10 0xb6d7c520 in pthread_mutex_lock () from /lib/libpthread.so.0
#11 0xb5f2953f in ?? () from /usr/lib/libX11.so.6
#12 0xb5f400fe in XrmQGetResource () from /usr/lib/libX11.so.6
#13 0xb5f1f75b in XGetDefault () from /usr/lib/libX11.so.6
#14 0xb3a5c3ab in _XcursorGetDisplayInfo () from /usr/lib/libXcursor.so.1
#15 0xb3a5c61d in XcursorGetDefaultSize () from /usr/lib/libXcursor.so.1
#16 0xb3a5eb75 in XcursorLibraryLoadCursor () from /usr/lib/libXcursor.so.1
#17 0xb43a177e in QCursorData::update (this=0x850e770) at kernel/qcursor_x11.cpp:256
#18 0xb43a1d26 in QCursor::handle (this=0xbffc5838) at kernel/qcursor_x11.cpp:133
#19 0xb43b1425 in qt_x11_enforce_cursor (w=0x85cfef8, force=false) at kernel/qwidget_x11.cpp:312
#20 0xb43b15d9 in qt_x11_enforce_cursor (w=0x85cfef8) at kernel/qwidget_x11.cpp:325
#21 0xb43b6036 in QWidgetPrivate::create_sys (this=0x85cff18, window=0, initializeWindow=true, destroyOldWindow=true)
    at kernel/qwidget_x11.cpp:765
#22 0xb437c2e0 in QWidget::create (this=0x85cfef8, window=0, initializeWindow=201, destroyOldWindow=<value optimized out>)
    at kernel/qwidget.cpp:1236
#23 0xb4380c2f in QWidgetPrivate::init (this=0x85cff18, parentWidget=0x0, f={i = -1073980264}) at kernel/qwidget.cpp:1117
#24 0xb4380fd3 in QWidget (this=0x85cfef8, dd=@0x85cff18, parent=0x0, f={i = -1073980200}) at kernel/qwidget.cpp:984
#25 0xb46caab5 in QMainWindow (this=0x85cfef8, parent=0x0, flags={i = -1073980136}) at widgets/qmainwindow.cpp:300
#26 0xb5da8c6d in RootMainWindows (this=0x85cfef8, parent=0x0, f={i = -1073979996}) at src/TQtRootBrowserImp.cxx:113
#27 0xb5da68a2 in TQtRootBrowserImp::InitWindow (this=0x85cfe08) at src/TQtRootBrowserImp.cxx:343
#28 0xb5d977bc in TQtGUIFactory::CreateBrowserImp (this=0x84ec8d0, b=0x82e2398, title=0xb7e2edab "ROOT Object Browser", width=800,
    height=500) at src/TQtGuiFactory.cxx:130
#29 0xb7981eb6 in TBrowser (this=0x82e2398, name=0xb7e39443 "Browser", title=0xb7e2edab "ROOT Object Browser", extimp=0x0,
    opt=0xb7e2e8a0 "") at core/base/src/TBrowser.cxx:104
#30 0xb7b826ea in G__G__Base1_80_0_3 () from /home/schneider/Install/root/root/lib/libCore.so
#31 0xb712f8c4 in Cint::G__ExceptionWrapper (funcp=0xb7b8183d <G__G__Base1_80_0_3(G__value*, char const*, G__param*, int)>,
    result7=0xbffcd4f8, funcname=0x811bf20 "\001", libp=0xbffc70b4, hash=0) at cint/cint/src/Api.cxx:381
#32 0xb720a66e in G__execute_call (result7=0xbffcd4f8, libp=0xbffc70b4, ifunc=0x811bf20, ifn=0) at cint/cint/src/newlink.cxx:2329
#33 0xb7211b84 in G__call_cppfunc (result7=0xbffcd4f8, libp=0xbffc70b4, ifunc=0x811bf20, ifn=0) at cint/cint/src/newlink.cxx:2515
#34 0xb71d0c2b in G__interpret_func (result7=0xbffcd4f8, funcname=0xbffccef8 "TBrowser", libp=0xbffc70b4, hash=824, p_ifunc=0x811bf20,
    funcmatch=1, memfunc_flag=4) at cint/cint/src/ifunc.cxx:5271
#35 0xb71bc47a in G__getfunction (item=0xbffcda74 "TBrowser()", known3=0xbffce724, memfunc_flag=4) at cint/cint/src/func.cxx:2534
#36 0xb7180732 in G__define_var (tagnum=143, typenum=-1) at cint/cint/src/decl.cxx:2885
#37 0xb72231c8 in G__defined_type (type_name=0xbffcf03c "TBrowser", len=8) at cint/cint/src/parse.cxx:4444
#38 0xb7228b80 in G__exec_statement (mparen=0xbffd69f8) at cint/cint/src/parse.cxx:6412
#39 0xb7176f17 in G__exec_tempfile_core (file=0x0, fp=0x82e0390) at cint/cint/src/debug.cxx:251
#40 0xb7177283 in G__exec_tempfile_fp (fp=0x82e0390) at cint/cint/src/debug.cxx:791
#41 0xb723cf1e in G__process_cmd (line=0x82daff8 "TBrowser t", prompt=0x80e6174 "", more=0x80e616c, err=0xbffd9364, rslt=0xbffd9330)
    at cint/cint/src/pause.cxx:3240
#42 0xb7a78eb8 in TCint::ProcessLine (this=0x80e6150, line=0x82daff8 "TBrowser t", error=0x0) at core/meta/src/TCint.cxx:420
#43 0xb7977819 in TApplication::ProcessLine (this=0x81098d8, line=0x82daff8 "TBrowser t", sync=false, err=0x0)
    at core/base/src/TApplication.cxx:829
#44 0xb6ede4ea in TRint::HandleTermInput (this=0x81098d8) at core/rint/src/TRint.cxx:514
#45 0xb6eddd9e in TTermInputHandler::Notify (this=0x82cc680) at core/rint/src/TRint.cxx:123
#46 0xb6ee0d84 in TTermInputHandler::ReadNotify (this=0x82cc680) at core/rint/src/TRint.cxx:115
#47 0xb7a8fa42 in TUnixSystem::CheckDescriptors (this=0x80e2430) at core/unix/src/TUnixSystem.cxx:1190
#48 0xb7a901c4 in TUnixSystem::DispatchOneEvent (this=0x80e2430, pendingOnly=false) at core/unix/src/TUnixSystem.cxx:897
#49 0xb79e6393 in TSystem::InnerLoop (this=0x80e2430) at core/base/src/TSystem.cxx:392
#50 0xb79f36fb in TSystem::Run (this=0x80e2430) at core/base/src/TSystem.cxx:342
#51 0xb79733cc in TApplication::Run (this=0x81098d8, retrn=false) at core/base/src/TApplication.cxx:968
#52 0xb6edf4f7 in TRint::Run (this=0x81098d8, retrn=false) at core/rint/src/TRint.cxx:386
#53 0x08048f57 in main (argc=1, argv=0xbffdb834) at main/src/rmain.cxx:29
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/16329/exe, process 16329

I tried to change in the ./root/etc/system.rootrc the Gui.Backend and Gui.Factory to native but this configuration also produces a segmentation fault.

Thanks Stephan

Do I understand correctly that you have problems running the standard version of ROOT without Qt? If yes, could you clarify if you installed from source yourself, took a binary tar ball from xxx?
Did you try installing from source (tar file or from SVN trunk)? we have no reports of problems on Suse with this procedure?

Qt is known to be a huge source of problems. We strongly recommend the standard version of ROOT without Qt.

Rene

Hello,
both configurations does not work. With qt or native Qui.backends ROOT crashes with a seg. fault.
The ROOT source code was downloaded by the INSTALL-QTROOT script. It seems to be the the normal source package and not the svn version:

INSTALL_QTROOT.sh:

 echo ">>>>> DOWNLOADING  ........ ROOT $ROOT_VERSION.  Be patient..."
  if [ "x$ROOT_VERSION" == "xtrunk" ]; then
    svn co https://root.cern.ch/svn/root/trunk root
    touch $MYWD/done.unpackroot
  else
     $GET ftp://root.cern.ch/root/root_v$(echo $ROOT_VERSION).source.tar.gz
     ls -lh root_v$(echo $ROOT_VERSION).source.tar.gz
  fi

My idea was to write an application that embeds the ROOT Histograms into the GUI. Therefore I thought of a Qt4 application for the GUI and the ROOT part for the analysis.

I do not know what is “INSTALL-QTROOT” and do not want to know, nothing coming from the ROOT support team. To install ROOT, follow the normal instructions at our Install page, ie
-download the source tar ball (I suggest taking the recently released version 5.22

  • ./configure
  • make

You don’t need Qt to embed histograms into the browser.

Rene

The INSTALL script was posted by Valeri Fine
http://root.cern.ch/phpBB2/viewtopic.php?t=7711&highlight=qtroot. I didn’t know that it is not an official script.

[quote=“s.schneider”]The INSTALL script was posted by Valeri Fine
http://root.cern.ch/phpBB2/viewtopic.php?t=7711&highlight=qtroot. I didn’t know that it is not an official script.[/quote]Sorry, I was away I missed the message. I am investigating let you know asap.

[quote=“s.schneider”]
My idea was to write an application that embeds the ROOT Histograms into the GUI. Therefore I thought of a Qt4 application for the GUI and the ROOT part for the analysis.[/quote]
Please check the example. qtRoot/qtExamples/Qt4/HelloFileBrowser/
It does what you want.
See root.cern.ch/phpBB2/viewtopic.ph … ilebrowser also

[quote=“brun”]
Qt is known to be a huge source of problems. We strongly recommend the standard version of ROOT without Qt.
Rene[/quote]Rene, please give an example of the problem. Do not keep it as a secret. Thank you

[quote=“s.schneider”]Good Morning,
yesterday I tried to install ROOT with Qt4 support.
The system is running a OpenSUSE 11.0 Linux with gcc 4.3.1.
First I downloaded the INSTALL_QTROOT.sh mentioned in http://root.cern.ch/phpBB2/viewtopic.php?t=7711&highlight=qtroot installation script and started the compilation. The ROOT version was changed to ROOT_VERSION_MAJOR=5.21 and ROOT_VERSION_MIINOR=06. There were some compilation errors, for example in …
[/quote]Can you provide further information?
Did you use the latest version of the script
( you can find it under qtRoot/root.diff/qtUtil/ directory you are supposed to check out.

The script you mentioned should install Qt 4.4.3 by default. Did you install Qt with the script or opted to use the pre-installed one?
If you build QtRoot against of Qt 4.3.1 it may be harder for me to help, because I need to reproduce the issue. I did not use the old Qt version 4.3.1. to test things yet.
I would appreciate if you can install the latest Qt version (in the other words run the INSTALL_QTROOT script from the scratch)
You should see NO compilation error. If your find one, please report it via list lists.bnl.gov/mailman/listinfo/qt-root-l

Thank you

[quote=“s.schneider”]The INSTALL script was posted by Valeri Fine
http://root.cern.ch/phpBB2/viewtopic.php?t=7711&highlight=qtroot. I didn’t know that it is not an official script.[/quote]To build ROOT the script invokes

./configure make
So, it does build ROOT the very official way whatsoever from the official ROOT source tarball or from the ROOT official SVN trunk from CERN.

[quote=“brun”]I do not know what is “INSTALL-QTROOT” and do not want to know, nothing coming from the ROOT support team. To install ROOT, follow the normal instructions at our Install page, ie
-download the source tar ball (I suggest taking the recently released version 5.22

  • ./configure
  • make
    [/quote]Yes, it is exactly what that script does as soon as the ROOT installation is concern. It does implement the Install page step by step root.cern.ch/root/Install.html :

[quote] 1. downloads the tarbar from the CERN server
2. invokes "./configure"
3. invokes “make”[/quote]It just combines the 3 shell commands above within one shell script. What a pity “nothing coming from the CERN support team” yet.
Are you saying everybody MUST TYPE those commands “by hand” to be entitled for the CERN team support. Is it the way ROOT is installed at LCG area of CERN :unamused: ?

[quote=“s.schneider”]I tried to change in the ./root/etc/system.rootrc the Gui.Backend and Gui.Factory to native but this configuration also produces a segmentation fault. [/quote]If you apply the “native” configuration then the Qt plugin is not loaded and you use the regular X11 version of ROOT with X11 plugin built by the regular “official” ROOT “configure/make” tool from the regular ROOT source.
This sounds your problem has nothing to do with Qt and QtRoot. The reason for your troubles is elsewhere.

[quote=“fine”]Can you provide further information?
Did you use the latest version of the script
( you can find it under qtRoot/root.diff/qtUtil/ directory you are supposed to check out. [/quote]
Yes it is the latest version.

[quote=“fine”]The script you mentioned should install Qt 4.4.3 by default. Did you install Qt with the script or opted to use the pre-installed one?
If you build QtRoot against of Qt 4.3.1 it may be harder for me to help, because I need to reproduce the issue. I did not use the old Qt version 4.3.1. to test things yet.
[/quote]
I used Qt 4.4.3, my g++ compiler is 4.3.1.

In the next days I will try it again with a clean installation.

Thanks for your help…

Ohh yes :blush: , 4.3.1 is the version of your compiler.
I still suspect the problem you faced is not Qt-related. The code was crashed within X11 system. It can be X-server related issue. Is it new machine / new OS installation?
Anyway, to separate things:
[ul]1. Make sure you can run the “qtdemo” application from $QTDIR/bin (i.e. you can use Qt with no ROOT)
2. Make sure you can run ROOT with the “native” Backend. (i.e you can use ROOT with no Qt)
3. To avoid controversy do not use the script. Print it down onto the piece of the paper and type all commands found in that script “by hand”. As Rene mentioned it is not too trouble indeed[/ul]