X11 related crash Mac OS X (a new one;)

Hi,

I get a crash when I try to draw a 2D histo from a tree without giving the name of the histo. I include a small script that reproduces the bug. Also some extra info and a stacktrace from gdb. To test the
script run it with

.L triggbug.cxx

root> triggbug() //should work
roo> triggbug(true) //should crash

root-config --version --svn-revision
5.33/01 41764
uname -a
Darwin csnpor136.in2p3.fr 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
g++ --version
i686-apple-darwin10-g+±4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright © 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Program received signal SIGABRT, Aborted.
0x00007fff800d80b6 in __kill ()
(gdb) bt
#0 0x00007fff800d80b6 in __kill ()
#1 0x00007fff801789f6 in abort ()
#2 0x00007fff80090195 in free ()
#3 0x00000001043ff1ca in _XDestroyImage ()
#4 0x000000010439389d in XRotCreateTextItem (dpy=0x101931800, font=0x105020ba0, angle=1.57079637, text=0x105781500 “b1”, align=7) at /Users/joa/root-debug/graf2d/x11/src/Rotated.cxx:1084
#5 0x0000000104393c75 in XRotRetrieveFromCache (dpy=0x101931800, font=0x105020ba0, angle=1.57079637, text=0x105781500 “b1”, align=7) at /Users/joa/root-debug/graf2d/x11/src/Rotated.cxx:746
#6 0x000000010439422b in XRotPaintAlignedString (dpy=0x101931800, font=0x105020ba0, angle=1.57079637, drawable=4194429, gc=0x105020880, x=37, y=65, text=0x105781500 “b1”, align=7, bg=0) at /Users/joa/root-debug/graf2d/x11/src/Rotated.cxx:366
#7 0x0000000104394cb3 in XRotDrawAlignedString (dpy=0x101931800, font=0x105020ba0, angle=90, drawable=4194429, gc=0x105020880, x=37, y=65, text=0x105781500 “b1”, align=7) at /Users/joa/root-debug/graf2d/x11/src/Rotated.cxx:317
#8 0x000000010439d30e in TGX11::DrawText (this=0x1038d0980, x=37, y=65, angle=90, mgn=1, text=0x105781500 “b1”, mode=TVirtualX::kClear) at /Users/joa/root-debug/graf2d/x11/src/TGX11.cxx:722
#9 0x0000000104294e30 in TPadPainter::DrawText (this=0x10572f190, x=-0.064111000493024872, y=1.043381892982437, text=0x105781500 “b1”, mode=TVirtualPadPainter::kClear) at /Users/joa/root-debug/graf2d/gpad/src/TPadPainter.cxx:473
#10 0x000000010427a000 in TPad::PaintText (this=0x1050ab930, x=-0.064111000493024872, y=1.043381892982437, text=0x105781500 “b1”) at /Users/joa/root-debug/graf2d/gpad/src/TPad.cxx:3909
#11 0x00000001040713a1 in TLatex::Analyse (this=0x1057853c0, x=12, y=54.5, spec={fAngle = 90, fSize = 0.035000000149011612, fColor = 1, fFont = 42}, t=0x7fff5fbfba49 “b1”, length=2) at /Users/joa/root-debug/graf2d/graf/src/TLatex.cxx:1664
#12 0x0000000104072d86 in TLatex::PaintLatex (this=0x1057853c0, x=12, y=54.5, angle=90, size=0.035000000149011612, text1=0x7fff5fbfc959 “b1”) at /Users/joa/root-debug/graf2d/graf/src/TLatex.cxx:1884
#13 0x0000000104051961 in TGaxis::PaintAxis (this=0x7fff5fbfc890, xmin=0, ymin=0, xmax=0, ymax=1.0950000000000002, wmin=@0x7fff5fbfc848, wmax=@0x7fff5fbfc840, ndiv=@0x7fff5fbfc888, chopt=0x106f90a10 “SDH”, gridlength=0, drawGridOnly=false) at /Users/joa/root-debug/graf2d/graf/src/TGaxis.cxx:1048
#14 0x0000000106f31e6c in THistPainter::PaintAxis (this=0x10577c950, drawGridOnly=false) at /Users/joa/root-debug/hist/histpainter/src/THistPainter.cxx:4157
#15 0x0000000106f17fb7 in THistPainter::PaintTable (this=0x10577c950, option=0x1057682d9 “col”) at /Users/joa/root-debug/hist/histpainter/src/THistPainter.cxx:7899
#16 0x0000000106f326c5 in THistPainter::Paint (this=0x10577c950, option=0x1057682d9 “col”) at /Users/joa/root-debug/hist/histpainter/src/THistPainter.cxx:3685
#17 0x00000001039daac3 in TH1::Paint (this=0x1057855c0, option=0x1057682d9 “col”) at /Users/joa/root-debug/hist/hist/src/TH1.cxx:5511
#18 0x0000000104287ab1 in TPad::PaintModified (this=0x1050ab930) at /Users/joa/rsers/joa/root-debug/core/rint/src/TRint.cxx:117
#27 0x000000010017349a in TUnixSystem::CheckDescriptors (this=0x1017040f0) at /Users/joa/root-debug/core/unix/src/TUnixSystem.cxx:1285
#28 0x0000000100173ba7 in TUnixSystem::DispatchOneEvent (this=0x1017040f0, pendingOnly=false) at /Users/joa/root-debug/core/unix/src/TUnixSystem.cxx:992
#29 0x00000001000d6e0c in TSystem::InnerLoop (this=0x1017040f0) at /Users/joa/root-debug/core/base/src/TSystem.cxx:406
#30 0x00000001000e5b21 in TSystem::Run (this=0x1017040f0) at /Users/joa/root-debug/core/base/src/TSystem.cxx:356
#31 0x00000001000738c3 in TApplication::Run (this=0x1017edd60, retrn=false) at /Users/joa/root-debug/core/base/src/TApplication.cxx:1039
#32 0x0000000101537293 in TRint::Run (this=0x1017edd60, retrn=false) at /Users/joa/root-debug/core/rint/src/TRint.cxx:449
#33 0x000000010000177c in main (argc=1, argv=0x7fff5fbff390) at /Users/joa/root-debug/main/src/rmain.cxx:29

cheers

Joa
triggbug.cxx (357 Bytes)

I see the crash only If I have

Unix.*.Root.UseTTFonts: false

In the file $ROOTSYS/etc/system.rootrc

which is normal given the place it crashes. Turning this flag to true makes it work.
Anyway It should not crash. I’ll check.

PS: you really don’t what to use TTF fonts ?

Now fixed in the SVN trunk.
Thanks for reporting.