TBrowser crashing in ubuntu

Hi, this may be a stupid question, but I can’t run a TBrowser from the command line or script in root 5.08 and 5.10, compiled on ubuntu/debian breezy (g++ 4.02).

When I run:

on the command line, the browser appears but does not respond to clicking. Also the command line continues to throw out segmentation faults, and doesn’t respond to control+c. The only way to get rid of it is to close the terminal altogether.

This used to work with root 4.08.

one the segfaults:

Root > *** Break *** segmentation violation Generating stack trace... 0xb632a925 in TGLVEntry::DrawCopy(unsigned long, int, int) + 0xb7 from /home/andrzej/cern/root/lib/libGui.so 0xb62dddc2 in TGContainer::DrawRegion(int, int, unsigned int, unsigned int) + 0xc2 from /home/andrzej/cern/root/lib/libGui.so 0xb62da2bb in TGContainer::DoRedraw() + 0x1f from /home/andrzej/cern/root/lib/libGui.so 0xb62e04c5 in TGClient::DoRedraw() + 0x45 from /home/andrzej/cern/root/lib/libGui.so 0xb62e094b in TGClient::ProcessOneEvent() + 0xd1 from /home/andrzej/cern/root/lib/libGui.so 0xb62e099c in TGClient::HandleInput() + 0x26 from /home/andrzej/cern/root/lib/libGui.so 0xb62e09d8 in TGInputHandler::Notify() + 0x1e from /home/andrzej/cern/root/lib/libGui.so 0xb7aa2996 in TUnixSystem::DispatchOneEvent(bool) + 0x52 from /home/andrzej/cern/root/lib/libCore.so 0xb79bb768 in TSystem::InnerLoop() + 0x18 from /home/andrzej/cern/root/lib/libCore.so 0xb79bb70e in TSystem::Run() + 0x6e from /home/andrzej/cern/root/lib/libCore.so 0xb793f427 in TApplication::Run(bool) + 0x37 from /home/andrzej/cern/root/lib/libCore.so 0xb6ad594f in TRint::Run(bool) + 0x37b from /home/andrzej/cern/root/lib/libRint.so 0x08048e30 in main + 0x68 from /home/andrzej/cern/root/bin/root.exe 0xb6870ec2 in __libc_start_main + 0xd2 from /lib/tls/i686/cmov/libc.so.6 0x08048d31 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x31 from /home/andrzej/cern/root/bin/root.exe Root >

What I can do to make this work?
Thanks,
Andrzej

Hi,

first of all could you try with the cvs head version. Next when you rebuilt can you use ./configure --enable-debug and trace the segv in gdb. Let us know.

Cheers, Fons.

Oops, must be ./configure --build=debug

– Fons

I installed the CVS head. It still segmentation faults, but I can operate the window, in the sense that I can open the roll down menus and use the one called “close ROOT”. Which it does.

it then spills out an error:

Error in <TGHScrollBar>: arrow_*.xpm not found Error in <TGVScrollBar>: arrow_*.xpm not found

The files seem to be there:

locate arrow |grep root

gives:
/home/andrzej/cern/root/icons/arrow.xpm
/home/andrzej/cern/root/icons/arrow_down.xpm
/home/andrzej/cern/root/icons/arrow_left.xpm
/home/andrzej/cern/root/icons/arrow_right.xpm
/home/andrzej/cern/root/icons/arrow_right2.xpm
/home/andrzej/cern/root/icons/arrow_up.xpm
/home/andrzej/cern/root/tutorials/arrow.C

and just in case:

env |grep ROOT gives
CVSROOT=:pserver:cvs@root.cern.ch:/user/cvs
ROOTSYS=/home/andrzej/cern/root

I’ll start with the build_debug option now.
Thanks for the quick response.
Andrzej

I recompiled the newest cvs with the debug option. I’m not sure if I did the right thing with gdb, but I managed to get the first segmentation error message (test.C , has one line of code: void test() { TBrowser bb;} ):

root [0]
Processing test.C...
269        do {
(gdb) Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGComboBox>: arrow_down.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGHScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGFileContainer>: required pixmap(s) missing

Warning in <TASImage>: No image
Warning in <TASImage>: No image

 *** Break *** segmentation violation
step Generating stack trace...
 0xb6092b0c in TGPicture::GetWidth() const at include/TGPicture.h:75 from /home/ andrzej/cern/root/lib/libGui.so
 0xb60ffa39 in TGListTreeItem::TGListTreeItem(TGClient*, char const*, TGPicture const*, TGPicture const*, bool) at gui/src/TGListTree.cxx:123 from /home/andrzej /cern/root/lib/libGui.so
 0xb6103e62 in TGListTree::AddItem(TGListTreeItem*, char const*, TGPicture const *, TGPicture const*, bool) at gui/src/TGListTree.cxx:1488 from /home/andrzej/cer n/root/lib/libGui.so
 0xb6103f84 in TGListTree::AddItem(TGListTreeItem*, char const*, void*, TGPictur e const*, TGPicture const*, bool) at gui/src/TGListTree.cxx:1507 from /home/andr zej/cern/root/lib/libGui.so
 0xb618bf64 in TRootBrowser::AddToTree(TObject*, char const*, int) at gui/src/TR ootBrowser.cxx:1304 from /home/andrzej/cern/root/lib/libGui.so
 0xb618b78b in TRootBrowser::Add(TObject*, char const*, int) at gui/src/TRootBro wser.cxx:1187 from /home/andrzej/cern/root/lib/libGui.so
 0xb78b1f40 in TBrowser::Add(TObject*, char const*, int) at base/src/TBrowser.cx x:234 from /home/andrzej/cern/root/lib/libCore.so
 0xb7923d50 in TROOT::Browse(TBrowser*) at base/src/TROOT.cxx:586 from /home/and rzej/cern/root/lib/libCore.so
 0xb618c21d in TRootBrowser::BrowseObj(TObject*) at gui/src/TRootBrowser.cxx:132 0 from /home/andrzej/cern/root/lib/libGui.so
 0xb78b2282 in TBrowser::Create(TObject*) at base/src/TBrowser.cxx:314 from /hom e/andrzej/cern/root/lib/libCore.so
 0xb78b2cc6 in TBrowser::TBrowser(char const*, char const*) at base/src/TBrowser .cxx:101 from /home/andrzej/cern/root/lib/libCore.so
 0xb7a9b47f in <unknown> from /home/andrzej/cern/root/lib/libCore.so
 0xb7442f1a in G__ExceptionWrapper at cint/src/Api.cxx:372 from /home/andrzej/ce rn/root/lib/libCint.so
 0xb7514b7b in G__call_cppfunc at cint/src/v6_newlink.cxx:466 from /home/andrzej /cern/root/lib/libCint.so
 0xb74f9479 in G__interpret_func at cint/src/v6_ifunc.cxx:5170 from /home/andrze j/cern/root/lib/libCint.so
 0xb74ecf85 in G__getfunction at cint/src/v6_func.cxx:2602 from /home/andrzej/ce rn/root/lib/libCint.so
 0xb74b8c98 in G__define_var at cint/src/v6_decl.cxx:2074 from /home/andrzej/cer n/root/lib/libCint.so
 0xb75814c7 in G__defined_type at cint/src/v6_typedef.cxx:1538 from /home/andrze j/cern/root/lib/libCint.so
 0xb753941d in G__exec_statement at cint/src/v6_parse.cxx:3851 from /home/andrze j/cern/root/lib/libCint.so
 0xb74fb808 in G__interpret_func at cint/src/v6_ifunc.cxx:5957 from /home/andrze j/cern/root/lib/libCint.so
 0xb74ed8bc in G__getfunction at cint/src/v6_func.cxx:2815 from /home/andrzej/ce rn/root/lib/libCint.so
 0xb74c73ab in G__getitem at cint/src/v6_expr.cxx:1864 from /home/andrzej/cern/r oot/lib/libCint.so
 0xb74d3b49 in G__getexpr at cint/src/v6_expr.cxx:1320 from /home/andrzej/cern/r oot/lib/libCint.so
 0xb74d4e54 in G__calc_internal at cint/src/v6_expr.cxx:208 from /home/andrzej/c ern/root/lib/libCint.so
 0xb7545ea9 in G__process_cmd at cint/src/v6_pause.cxx:2302 from /home/andrzej/c ern/root/lib/libCint.so
 0xb79a30c1 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) at met a/src/TCint.cxx:295 from /home/andrzej/cern/root/lib/libCore.so
 0xb79a3259 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) a t meta/src/TCint.cxx:328 from /home/andrzej/cern/root/lib/libCore.so
 0xb78a89e4 in TApplication::ProcessFile(char const*, int*) at base/src/TApplica tion.cxx:808 from /home/andrzej/cern/root/lib/libCore.so
 0xb78a8119 in TApplication::ProcessLine(char const*, bool, int*) at base/src/TA pplication.cxx:676 from /home/andrzej/cern/root/lib/libCore.so
 0xb68f30c0 in TRint::Run(bool) at rint/src/TRint.cxx:266 from /home/andrzej/cer n/root/lib/libRint.so
 0x08048e93 in main + 0x7b from /home/andrzej/cern/root/bin/root.exe
 0xb668dec2 in __libc_start_main + 0xd2 from /lib/tls/i686/cmov/libc.so.6
 0x08048d81 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x31 fro m /home/andrzej/cern/root/bin/root.exe

I hope this helps. Thanks,
Andrzej

I tried running it from the root/icons directory and setting the PATH variable, in case the problem is the path to the icons, but it still doesn’t work.

Andrzej.

I also tried with the debian packages (make debian). Same effect.
Does anyone have any idea what the problem is?
Thanks,
Andrzej

I struggled with Root and Ubuntu for some time. The more and more I wanted to do analysis and coding (i.e. real computing), Ubuntu had more and more problems. In the end, I decided to scrap Ubuntu and move to Scientific Linux – this is my best suggestion. If you are determined to use Ubuntu then I do have a suggestion to build root.

I compiled a working version by obtaining the source using apt. You just need to get the repository for it. Once you get the source from apt then build it. For some reason the source from Root pages always gave me problems.

Good luck

Could you clarify what is the difference between the source from apt
and the source from the ROOT pages?

Rene

This is what I do understand at all. Rather than investigate why I could compile and run root properly using the source obtained from apt repository, I just opted to switch to a different Linux dist. I believe the problem lies in using Ubuntu, not in Root. The reason for this can only be undercovered by the experts.
Check with the person who maintains the Root repository for debian. If I can remember who this is, I’ll post here.

Hi Andrzej,

First off. let me say that that I do not see any of these problems. I use a rather recent check-out, and the packages I build.

The packages (and sources) are available from

[quote] deb mirror.phy.bnl.gov/debian-root unstable root
deb-src mirror.phy.bnl.gov/debian-root unstable root
[/quote]
(see also http://mirror.phy.bnl.gov/debian-root for more information).

There are some differences between Ubuntu unstable and Debian unstable - these could be crucial - in particular differences in X. Debian unstable now uses X.org 7.0, and the default C++ compiler is GCC 4.0.2.

Now, since Ubuntu generally uses pretty new libraries for all stuff, it could be a bug in some of those libraries. It could also mean, that ROOT is not compatible with one of the newer libraries. It’s really hard to tell. That is, it doesn’t necessarily have to do with Ubuntu.

To really track down the problem, I think you need to figure out where and why you get the warnings

[quote]Error in : arrow_.xpm not found
Error in : arrow_
.xpm not found
[/quote]

It could be that the icon path is not set properly, or something like that, either in the code, or in your .rootrc file.

There’s definitely a problem in gui/src/TGScrollBar.cxx. It reads

[code] fHeadPic = fClient->GetPicture(“arrow_left.xpm”);
fTailPic = fClient->GetPicture(“arrow_right.xpm”);

if (!fHeadPic || !fTailPic)
Error(“TGHScrollBar”, “arrow_*.xpm not found”);

fHead = new TGScrollBarElement(this, fHeadPic, fgScrollBarWidth, fgScrollBarWidth,
kRaisedFrame);
fTail = new TGScrollBarElement(this, fTailPic, fgScrollBarWidth, fgScrollBarWidth,
[/code]

The error should probably be more serious.

Do note, that make debian creates DEB packages that you need to install. Please note, that you need to unset ROOTSYS and remove the corresponding bin and lib directory from your PATH and LD_LIBRARY_PATH environment variables.

Regarding the differences between the upstream sources and the sources used by Debian: Currently the differences are very few. I’ve sent a patch to Fons some time ago with those fixes. They had mainly to do with some of the packaging scripts i.e., no real code changes. I’ve attached the files to this post.

Yours,

Christian
added-5.11.03-3.tar.gz (3.03 KB)

More attached files
summary-5.11.03-3.gz (255 Bytes)
changes-5.11.03-3.patch.gz (3.41 KB)

I tried to install the debian sources fom the repositories and build them :
apt-get -b
to build I had to install a lot of other packages, and since really new ones were required, I upgraded to dapper (current unstable ubuntu release).

I was unable to build the packages because an error was thrown at me, if I remember right:
Can’t stat /debian/tmp/usr/include/MySqlResult.h

This happens (I think) at the end of the build. The file exists in the source directory, but since I don’t know much about building packages in debian I don’t really know where to look to fix this problem.

The good news is that just to check I recompiled root in the standard way, and it seems that the upgrade to dapper made it work. I can open a TBrowser. Yes!

Thanks for all the help, also if I can provide any troubleshooting information let me know.
cheers,
Andrzej

Hi Andrezej,

[quote=“Andrzej S.”]I tried to install the debian sources fom the repositories and build them :
apt-get -b
to build I had to install a lot of other packages, and since really new ones were required, I upgraded to dapper (current unstable ubuntu release).
[/quote]

Perhaps you want to do apt-get build-dep root first, to pull in all the build dependencies.

Are you sure that’s the error you got? `/debian/tmp’ is most likely not a place you can write to, and the there’s no such header in ROOT. There’s a header called TMySQLResult.h. If that’s the one it’s complaining about, then are you sure you got the libmysqlclient15-dev package installed?

It would be nice if you could post a log file of the build. If you used debuild, then you’d get the file root_5.11.03-3.i386.build that contains a log. Otherwise, you can do

apt-get -b root 2> /dev/stdout | tee build.log

I know there’s been an issue with awk on Ubuntu. You need to get the GNU one.

Good. Did you get the plugin libMySQL.so? If not, the error above might be due to a missing libmysqlclient15-dev installation.

A build log would go a long way :slight_smile:

Yours,

Christian

I’ll try that one next time, but for instance ruby1.8 was not available in breezy so I had to upgrade

[quote]

[quote]I was unable to build the packages because an error was thrown at me, if I remember right:
Can’t stat /debian/tmp/usr/include/MySqlResult.h [/quote]

Are you sure that’s the error you got? `/debian/tmp’ is most likely not a place you can write to, and the there’s no such header in ROOT. There’s a header called TMySQLResult.h. If that’s the one it’s complaining about, then are you sure you got the libmysqlclient15-dev package installed? [/quote]

my mistake, it was debian/tmp … (without the first slash). I checked this directory and the file is not there.

[quote]
Good. Did you get the plugin libMySQL.so? If not, the error above might be due to a missing libmysqlclient15-dev installation.
A build log would go a long way :slight_smile:

Yours,

Christian[/quote]

Ok. I have mysql installed, because I’m also using a different program that links to libmysqlclient and that works. Also I tried installing the Root mysql plugin, but the error was the same. The command to generate the build log that I used was:

root@nbandrei:/home/andrzej/cern/root-deb# apt-get -b source root root-common root-doc root-framework root-plugin-asimage root-plugin-fftw3 ttf-root-installer libroot-dev libroot5.11 2> /dev/stdout | tee build.log

I’m attaching the build log.
build.txt (773 KB)

I get a similar problem on my Ubuntu 6.06 amd64 with gcc 4.0.3 and root 5.12.00
downloaded as a source from CERN website and compiled the usual (not the debian) way:

$ ./configure --prefix=/usr/local
$ make
$ make install
$ export ROOTSYS=/usr/local
$ export PATH=$PATH:$ROOTSYS/bin
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib/root
$ root -l
root [0] new TBrowser
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGComboBox>: arrow_down.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGHScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGFileContainer>: required pixmap(s) missing

blinking cursor…

c-C

 *** Break *** keyboard interrupt (tmpfile):1:


 *** Break *** keyboard interrupt
Root >
root [1] new TBrowser
*** Interpreter error recovered ***
root [2] new TBrowser
Error in <TGComboBox>: arrow_down.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
Error in <TGTreeLBEntry>: icon not found for entry Current dir

 *** Break *** segmentation violation
 Generating stack trace...
 0x00002aaaae748fb1 in TGFSComboBox::TGFSComboBox(TGWindow const*, int, unsigned  int, unsigned long) + 0x161 from /usr/local/lib/root/libGui.so
 0x00002aaaae7d1ab4 in TRootBrowser::CreateBrowser(char const*) + 0xb74 from /us r/local/lib/root/libGui.so

and so on…
The segmentation fault isn’t weird, cause the first browser crashed and didn’t clean up.
But why doesn’t it see the icons? They’re were they should be (/usr/local/share/root/icons).
Oh, two more details:

  1. the Browser doesn’t show up even for a second (in case someone was interested)
  2. When I draw a TF1 I get:
root [4] TF1 f1("func1","sin(x)/x",0,10)
root [5] f1.Draw()
Error in <TGHScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar>: arrow_*.xpm not found
<TCanvas>: created default TCanvas with name c1

And the canvas shows up allright.

Maybe it’s a problem with some config file or something?

When you compile ROOT with a particular prefix, the assumption is, that the icons will be in /share/root/icons. However, if you set the environment variable ROOTSYS=, then the assumption is that the icons will live in /icons (as in the source directory - sigh).

If you prefer ROOT should look for icons in different places, pass configure the appropriate options.

Hence, the solution for you should be to unset the environment variable ROOTSYS, and simply add /usr/local/bin to your PATH environment variable.

Note, if you pass configure the option –enable-rpath then you don’t need to set LD_LIBRARY_PATH either.

Yours,

Christian

I’m really sorry to say this but it didn’t work :frowning:

[code]$ echo $ROOTSYS

$ export LD_LIBRARY_PATH=/usr/local/lib/root
$ root -l
root [0] new TBrowser
Error in : arrow_.xpm not found
Error in : arrow_down.xpm not found
Error in : arrow_
.xpm not found
Error in : arrow_.xpm not found
Error in : arrow_
.xpm not found
Error in : arrow_*.xpm not found
Error in : required pixmap(s) missing

*** Break *** keyboard interrupt (tmpfile):1:
[/code]
I’m a bit confused, cause after gEnv->Print() I get:

Gui.IconPath: /usr/local/share/root/icons [Global]
and they’re there:

$ ls /usr/local/share/root/icons/ |grep arrow arrow_down.xpm arrow_left.xpm arrow_right2.xpm arrow_right.xpm arrow_up.xpm arrow.xpm

OK, if that’s not the problem, then I’m a bit at a loss here. Perhaps you could run ROOT in GDB, and break in the line where it’s trying to get the pixmaps and investigate what’s going on. Perhaps you need to build ROOT with `–build=debug’ passed to configure.

i know this is an old thread but i had this problem on kubuntu. simply doing this solves the problem:
tar zxvf root.tar.gz
cd root
./configure --prefix=/usr/local
make
sudo make install

In my .bashrc, I add:
export LD_LIBRARY_PATH=/usr/local/lib/root:$LD_LIBRARY_PATH

and the problem is solved.

[quote=“mkoren”]I’m really sorry to say this but it didn’t work :frowning:

[code]$ echo $ROOTSYS

$ export LD_LIBRARY_PATH=/usr/local/lib/root
$ root -l
root [0] new TBrowser
Error in : arrow_.xpm not found
Error in : arrow_down.xpm not found
Error in : arrow_
.xpm not found
Error in : arrow_.xpm not found
Error in : arrow_
.xpm not found
Error in : arrow_*.xpm not found
Error in : required pixmap(s) missing

*** Break *** keyboard interrupt (tmpfile):1:
[/code]
I’m a bit confused, cause after gEnv->Print() I get:

Gui.IconPath: /usr/local/share/root/icons [Global]
and they’re there:

$ ls /usr/local/share/root/icons/ |grep arrow arrow_down.xpm arrow_left.xpm arrow_right2.xpm arrow_right.xpm arrow_up.xpm arrow.xpm [/quote]