Root crashes when opening a saved TCanvas

Pretty much what the title says. But I do want to emphasize that this isn’t just one particular TCanvas that might have been corrupted or something – this happens with every single TCanvas that has been previously saved to a .root file, and these TCanvases are perfectly readable on other people’s computers, so it surely must be something specific to my computer/installation/setup/whatever.

So. I’m running Root 5.34/34 on Mac OS 10.8.5. I also have a semi-functional installation of Root 6 on this machine which I suspect might be messing everything up, but I do need to keep both of those installations around (and it took me ages to get them both working at the same time), so I’m really hoping this can be fixed with something more targetted than “just do a clean install for everything.”

So without further ado, here’s what the input and output when I try to open a TCanvas from within the interpreter:

root [3] TCanvas * t = f -> Get("canvas2");
root.exe(5769,0x7fff7a4d0180) malloc: *** error for object 0x7fff7b19c570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

That’s also what happens when I try to open a TCanvas via a TBrowser. But it still seems to do fine with opening a TH1D for example, or a TTree – so presumably it’s only TCanvases that are an issue.

Anyway. I don’t really know how to approach a problem like this, troubleshooting-wise. So if you folks have ideas, I would super-appreciate the help.


Two way of approaching the problem. One hinted at by the error message is to attach a debugger to the running process before it fails and setting up a break point on malloc_error_break and see what the stack trace is when the problem occur.

Another is to investigate more what does and does not work. For example does it work if you create the brand new Canvas? What if you plot something in this canvas. Does it work if you try reading the canvas in batch mode?


Hi Philippe, thanks for helping.

I am able to create a new canvas and plot one or more TH1Ds on the canvas, both in batch mode and in interactive mode. I cannot, however, reliably save the TCanvas in a .root file – either in batch mode or in interactive mode. (I can, however, save the TCanvas successfully as a PDF, I am also able to save a TH1D to a .root file.) And I also cannot read a canvas from within batch mode either. The error message always looks about the same, too – eg, here’s what I got from trying to read a canvas from within batch mode:

/Users/spiffyzha/Desktop/PreProcessor$ ./test test(6385) malloc: *** error for object 0x7fff7b19c570: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6

So I tried setting up a break point in GDB. I don’t think it worked:

[code]/Users/spiffyzha/Desktop/PreProcessor/Output$ gdb root
GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “x86_64-apple-darwin”…Reading symbols for shared libraries … done

(gdb) break malloc_error_break
Function “malloc_error_break” not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (malloc_error_break) pending.
(gdb) run -l
Starting program: /Users/spiffyzha/Packages/root5/bin/root -l
Reading symbols for shared libraries ++++++++… done
Breakpoint 1 at 0x7fff8ebc5588
Pending breakpoint 1 - “malloc_error_break” resolved
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
root [0] TFile * f = new TFile(“recoils415_promptcombos_zoom.root”)
root [1] TCanvas * t = f -> Get(“canvas2”);
root.exe(6039,0x7fff7a4d0180) malloc: *** error for object 0x7fff7b19c570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Program exited with code 06.

Then I tried in LLDB, with a similar result:

/Users/spiffyzha/Desktop/PreProcessor/Output$ lldb root Current executable set to 'root' (x86_64). (lldb) breakpoint set -n malloc_error_break Breakpoint 1: where = libsystem_c.dylib`malloc_error_break, address = 0x000000000002c584 (lldb) run -l Process 6043 launched: '/Users/spiffyzha/Packages/root5/bin/root' (x86_64) 1 location added to breakpoint 1 TFile * f = new TFile("recoils415_promptcombos_zoom.root") TCanvas * t = f -> Get("canvas2"); root.exe(6046,0x7fff7a4d0180) malloc: *** error for object 0x7fff7b19c570: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Process 6043 exited with status = 6 (0x00000006)

Sometimes (but not always) when I run root outside of a debugger and try to open a TCanvas the whole thing will crash and the OS will give me a “Problem report” pop up window. Not sure if any of this info is useful to anyone but Apple, but here it is just in case:

[code]Process: root.exe [6111]
Path: /Users/USER/*/root.exe
Identifier: root.exe
Version: 0
Code Type: X86-64 (Native)
Parent Process: root [6110]
User ID: 501

Date/Time: 2016-02-26 16:33:49.312 -0600
OS Version: Mac OS X 10.8.5 (12F2560)
Report Version: 10

Interval Since Last Report: 78623 sec
Crashes Since Last Report: 12
Per-App Crashes Since Last Report: 12
Anonymous UUID: 699191B6-FD23-C767-A38A-CBD079C5188F

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** error for object 0x7fff7b19c570: pointer being freed was not allocated

Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff8c939212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8ebaeb24 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff8ebf2f61 abort + 143
3 libsystem_c.dylib 0x00007fff8ebc6989 free + 392
4 libstdc++.6.dylib 0x0000000107c99518 std::string::_M_mutate(unsigned long, unsigned long, unsigned long) + 392
5 ??? 0x00007fd3ebf67548 0 + 140548173624648
6 ??? 0x00007fd3ebbf2580 0 + 140548169999744

Thread 1:
0 libsystem_kernel.dylib 0x00007fff8c939d16 kevent + 10
1 libdispatch.dylib 0x00007fff959cadea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff959ca9ee _dispatch_mgr_thread + 54

Thread 2:
0 libsystem_kernel.dylib 0x00007fff8c9396d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ebaff1c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ebafce3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8eb9a191 start_wqthread + 13

Thread 3:
0 libsystem_kernel.dylib 0x00007fff8c9396d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ebaff1c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ebafce3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8eb9a191 start_wqthread + 13

Thread 4:
0 libsystem_kernel.dylib 0x00007fff8c9396d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ebaff1c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ebafce3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8eb9a191 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5903dbc8 rdx: 0x0000000000000000
rdi: 0x0000000000000707 rsi: 0x0000000000000006 rbp: 0x00007fff5903dbf0 rsp: 0x00007fff5903dbc8
r8: 0x00007fff7a4cf278 r9: 0x0000000000000000 r10: 0x0000000020000000 r11: 0x0000000000000206
r12: 0x00007fd3eb00ee00 r13: 0x0000000106bc2000 r14: 0x00007fff7a4d0180 r15: 0x0000000000000006
rip: 0x00007fff8c939212 rfl: 0x0000000000000206 cr2: 0x00007fff7a4c8ff0
Logical CPU: 0

Binary Images:
0x106bbd000 - 0x106bbdfff +root.exe (0) <9FBFE3D5-BFCD-380A-B7F8-665F07AB018F> /Users/USER//root.exe
0x106bc5000 - 0x1071f8ff7 (0) <6DBB8F94-C6F4-3FCA-9A1D-2B1CD4A28C99> /Users/USER/
0x10743d000 - 0x10763fff7 (0) /Users/USER//
0x107b69000 - 0x107b91fff (0) <194FE0FB-E9D2-3C88-8C78-3FAD45844A00> /Users/USER/
0x107ba7000 - 0x107bc4ff7 +liblzma.5.dylib (0) /usr/local/lib/liblzma.5.dylib
0x107bca000 - 0x107c26fff +libpcre.1.dylib (0) <773F4826-AAE4-3DF6-AAF2-F24A8E3DFBC6> /opt/local/lib/libpcre.1.dylib
0x107c2d000 - 0x107cd6fe7 +libstdc++.6.dylib (0) /usr/local/lib/libstdc++.6.dylib
0x107ddc000 - 0x107df0fe7 +libgcc_s.1.dylib (0) <582556D9-380E-3BC9-9972-43EDA3278636> /usr/local/lib/libgcc_s.1.dylib
0x207dfe000 - 0x207e2afff Security (55109.1) <8DFDE940-BFBC-30F6-AFA9-51C1118019F8> /usr/bin/Security
0x207ec5000 - 0x208089fff (0) /Users/USER//
0x208147000 - 0x20814fff7 (0) <4671A96C-4318-30EF-9324-0EF467CE3F99> /Users/USER/
0x208353000 - 0x208397fff (0) /Users/USER//
0x2083bb000 - 0x2083ccff7 +libz.1.dylib (0) /opt/local/lib/libz.1.dylib
0x209758000 - 0x2099afff7 (0) /Users/USER/
0x209a6b000 - 0x209c9dff7 (0) /Users/USER//
0x209d38000 - 0x209dcbfff (0) <92D0C79D-3A01-3283-933C-0B17BF7B86B3> /Users/USER/
0x20b5c9000 - 0x20b9c8ff7 (0) /Users/USER//
0x20bb09000 - 0x20bdc4fff (0) /Users/USER/
0x20bebd000 - 0x20bf95ff7 (0) /Users/USER//
0x20c3dd000 - 0x20cad2fff (0) <6CD17ECC-2B77-32A6-B6BA-1D7F868E82A5> /Users/USER/
0x20d0de000 - 0x20d1bcff7 (0) <793C2EC1-14BB-3DDF-9E03-2D58A085FC81> /Users/USER//
0x20e307000 - 0x20e441fff (0) <6554DD9C-EB35-3309-829F-25B9E290DAF1> /Users/USER/
0x20e4b6000 - 0x20e4fcff7 +libssl.1.0.0.dylib (0) <274AF799-AB68-316F-8018-92A9FB9D725C> /opt/local/lib/libssl.1.0.0.dylib
0x20e516000 - 0x20e654fcf +libcrypto.1.0.0.dylib (0) <75ED19E4-0B8B-3BB7-9BBE-7913FE5BFDD1> /opt/local/lib/libcrypto.1.0.0.dylib
0x20e6c5000 - 0x20e70cfff (0) <176FC56D-1BFB-303D-A892-23F431BB61A3> /Users/USER/*/
0x7fff667bd000 - 0x7fff667f193f dyld (210.2.3) <36CAA36E-72BC-3E48-96D9-B96A2DF77730> /usr/lib/dyld
0x7fff897b9000 - 0x7fff898d192f libobjc.A.dylib (532.2) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib
0x7fff898d2000 - 0x7fff89b76ff7 (8.4.0 - 1.0.1) /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage
0x7fff89c7a000 - 0x7fff89cb0fff (98 - 98) <14E788B1-4EB2-3FD7-934B-849534DFC198> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
0x7fff89d40000 - 0x7fff89e3dff7 libxml2.2.dylib (22.3) <47B09CB2-C636-3024-8B55-6040F7829B4C> /usr/lib/libxml2.2.dylib
0x7fff89e3e000 - 0x7fff8a03efff libicucore.A.dylib (491.11.3) <5783D305-04E8-3D17-94F7-1CEAFA975240> /usr/lib/libicucore.A.dylib
0x7fff8a0c8000 - 0x7fff8a166ff7 (10.8.2 - 150) <84B9825C-3822-375F-BE58-A753444FBDE2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff8a69e000 - 0x7fff8a7aaff7 libFontParser.dylib (84.11) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff8a7ab000 - 0x7fff8a7faff7 libFontRegistry.dylib (100.1) <0537E4AD-6CC5-37D1-9846-4F6C46735387> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x7fff8a848000 - 0x7fff8a8a2fff (8.3 - 387.2) <5BA0CBED-4D80-386A-9646-F835C9805B71> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff8a926000 - 0x7fff8a93dfff (1.1 - 132.3) /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
0x7fff8a982000 - 0x7fff8a9a2fff libPng.dylib (854) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff8b026000 - 0x7fff8b028ff7 libunc.dylib (25) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib
0x7fff8b1ef000 - 0x7fff8b1f2fff libRadiance.dylib (854) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff8b43c000 - 0x7fff8b539fff libsqlite3.dylib (138.1) /usr/lib/libsqlite3.dylib
0x7fff8b545000 - 0x7fff8b5e0ff7 (3.0 - 117.3) <7722470A-2BA5-3526-9D3B-D3B9E5B517A7> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
0x7fff8b60d000 - 0x7fff8b637ff7 (1.8 - 99.4) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff8b638000 - 0x7fff8b677ff7 (3.42.1 - 285.1) <77A20C25-EBB5-341C-A05C-5D458B97AD5C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff8b685000 - 0x7fff8b77afff libiconv.2.dylib (34) /usr/lib/libiconv.2.dylib
0x7fff8b77b000 - 0x7fff8bb72fff libLAPACK.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff8bb73000 - 0x7fff8bb7dfff (4.1.5 - 4.1.5) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff8bb7e000 - 0x7fff8bdb3ff7 (106.1 - 407.7) <24E0A6B4-9ECA-3D12-B26A-72B9DCF09768> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff8bdb4000 - 0x7fff8bddbff7 (1.16 - 16) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
0x7fff8bddc000 - 0x7fff8bde2ff7 libunwind.dylib (35.1) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib
0x7fff8bde3000 - 0x7fff8bf7efef (6.0 - 6.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff8c302000 - 0x7fff8c454fff (1.9.2 - 1.9.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff8c457000 - 0x7fff8c463fff (10.8.3 - 418) /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
0x7fff8c464000 - 0x7fff8c46ffff libsystem_notify.dylib (98.6) <1E490CB2-9311-3B36-8372-37D3FB0FD818> /usr/lib/system/libsystem_notify.dylib
0x7fff8c58b000 - 0x7fff8c6abfff (1.7.4 - 1.7.4) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff8c6ac000 - 0x7fff8c746fff libvMisc.dylib (380.10) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff8c8ee000 - 0x7fff8c8f5fff (5.0 - 4.0) <82E24B9A-7742-3DA3-9E99-ED267D98C05E> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff8c8f6000 - 0x7fff8c917fff (1.2 - 243.15) /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity
0x7fff8c927000 - 0x7fff8c942ff7 libsystem_kernel.dylib (2050.48.19) <81945B94-D6CB-3B77-9E95-0429540B0DF0> /usr/lib/system/libsystem_kernel.dylib
0x7fff8c943000 - 0x7fff8c948fff libcache.dylib (57) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib
0x7fff8c949000 - 0x7fff8c94dfff libpam.2.dylib (20) /usr/lib/libpam.2.dylib
0x7fff8c9b1000 - 0x7fff8cc8efff (7.0 - 55719.16.12) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff8cc9b000 - 0x7fff8cc9bfff (3.8 - vecLib 3.8) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8cc9e000 - 0x7fff8cd78fff (1.4.3 - 1.4.3) <6B65C44C-7777-3331-AD9D-438D10AAC777> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
0x7fff8d031000 - 0x7fff8d043ff7 libz.1.dylib (43) <2A1551E8-A272-3DE5-B692-955974FE1416> /usr/lib/libz.1.dylib
0x7fff8d08e000 - 0x7fff8d0d8ff7 libGLU.dylib (8.10.1) <6699DEA6-9EEB-3B84-A57F-B25AE44EC584> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff8d114000 - 0x7fff8d473fff (6.8 - 945.19) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff8d4b2000 - 0x7fff8d4b2fff (1.8 - Accelerate 1.8) <878A6E7E-CB34-380F-8212-47FBF12C7C96> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff8d4f0000 - 0x7fff8d50fff7 libresolv.9.dylib (51) <0882DC2D-A892-31FF-AD8C-0BB518C48B23> /usr/lib/libresolv.9.dylib
0x7fff8d510000 - 0x7fff8d51dfff libbz2.1.0.dylib (29) /usr/lib/libbz2.1.0.dylib
0x7fff8d51e000 - 0x7fff8d522fff (86.0.5 - 86.0.5) <4841B89D-501E-306D-8891-3651AA9326E6> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff8d523000 - 0x7fff8d54afff (4.1 - 410) <50F5A52C-8FB6-300A-977D-5CFDE4D5796B> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x7fff8d5ae000 - 0x7fff8d5b9fff (3.0 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
0x7fff8d5ba000 - 0x7fff8d5c7fff (49 - 1.0) <5508344A-2A7E-3122-9562-6F363910A80E> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
0x7fff8d8db000 - 0x7fff8d8e2ff7 libcopyfile.dylib (89.0.70) <30824A67-6743-3D99-8DC3-92578FA9D7CB> /usr/lib/system/libcopyfile.dylib
0x7fff8d8e3000 - 0x7fff8d8f2fff (1.8.10 - 1.8.10) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff8d8f3000 - 0x7fff8d8fffff libCSync.A.dylib (340.4) <5F39E159-09E7-387F-8604-0BFE284DCC43> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x7fff8d900000 - 0x7fff8d96efff (2.0.1 - 755.42.2) <18E64CC5-2671-3C47-B2C6-0EEEDF899461> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff8d9ae000 - 0x7fff8d9ebfef libGLImage.dylib (8.10.1) <91E31B9B-4141-36D5-ABDC-20F1D6D1D0CF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff8e2a2000 - 0x7fff8e2a2ffd (1.9.2 - 1.9.2) <6D314680-7409-3BC7-A807-36341411AF9A> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff8e2a3000 - 0x7fff8e2a7fff libCGXType.A.dylib (340.4) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
0x7fff8e2a8000 - 0x7fff8e492ff7 (6.8 - 744.19) <0F7403CA-2CB8-3D0A-992B-679701DF27CA> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8e493000 - 0x7fff8e497fff libGIF.dylib (854) <21F4F4A3-6F84-3BC3-A736-AB990CE4AD3C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff8e598000 - 0x7fff8e805fff (4.07 - 697) <1588CEC6-012E-30E5-BF38-5BBDABB2F48F> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
0x7fff8ea96000 - 0x7fff8eaa5ff7 libxar.1.dylib (105) <370ED355-E516-311E-BAFD-D80633A84BE1> /usr/lib/libxar.1.dylib
0x7fff8eaa6000 - 0x7fff8eaa7fff liblangid.dylib (116) <864C409D-D56B-383E-9B44-A435A47F2346> /usr/lib/liblangid.dylib
0x7fff8eaa8000 - 0x7fff8eaebff7 (12.0 - 192) <0BF1F2D2-3648-36B7-BE4B-551A0173209B> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x7fff8eaec000 - 0x7fff8eb6bff7 (6.0 - 55115.4) <8676E0DF-295F-3690-BDAA-6C9C1D210B88> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff8eb6c000 - 0x7fff8eb98ff7 libRIP.A.dylib (340.4) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x7fff8eb99000 - 0x7fff8ec65ff7 libsystem_c.dylib (825.40.1) <543B05AE-CFA5-3EFE-8E58-77225411BA6B> /usr/lib/system/libsystem_c.dylib
0x7fff8ec90000 - 0x7fff8eca7fff libGL.dylib (8.10.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff8ed7e000 - 0x7fff8ed83fff libcompiler_rt.dylib (30) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib
0x7fff8ed8d000 - 0x7fff8ed90ff7 libdyld.dylib (210.2.3) /usr/lib/system/libdyld.dylib
0x7fff8f100000 - 0x7fff8f151ff7 (1.12.2 - 1.12.2) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff8f152000 - 0x7fff8f1b1fff (645.6 - 645.7) <2F1E192C-DF34-3903-9F30-27B896699CA4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff8f1b2000 - 0x7fff8f1b2fff (3.8 - vecLib 3.8) <6CBBFDC4-415C-3910-9558-B67176447789> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8f1c6000 - 0x7fff8f1c7ff7 libdnsinfo.dylib (453.19) <14202FFB-C3CA-3FCC-94B0-14611BF8692D> /usr/lib/system/libdnsinfo.dylib
0x7fff8f739000 - 0x7fff8f7c6ff7 (1.4.0 - 1.4.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff8f7c7000 - 0x7fff8f7e8ff7 libCRFSuite.dylib (33) <736ABE58-8DED-3289-A042-C25AF7AE5B23> /usr/lib/libCRFSuite.dylib
0x7fff8f939000 - 0x7fff8fd56fff FaceCoreLight (2.4.1) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight
0x7fff8fd57000 - 0x7fff8fd88ff7 (1.2 - 184.4) <054F2D6F-9CFF-3EF1-9778-25C551B616C1> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff8fd89000 - 0x7fff8fda0fff (10.8 - 151.10) <10F41DA4-AD54-3F52-B898-588D9A117171> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x7fff8fdbf000 - 0x7fff8fdf5fff libsystem_info.dylib (406.18) <32D9AC7E-3906-3EA7-9FEB-4BD333F14A01> /usr/lib/system/libsystem_info.dylib
0x7fff8ff6c000 - 0x7fff8ff6dff7 libsystem_sandbox.dylib (220.4) /usr/lib/system/libsystem_sandbox.dylib
0x7fff8ff6e000 - 0x7fff8ff9cff7 libsystem_m.dylib (3022.6) /usr/lib/system/libsystem_m.dylib
0x7fff8ff9d000 - 0x7fff8ffa3fff libmacho.dylib (829) /usr/lib/system/libmacho.dylib
0x7fff8ffa4000 - 0x7fff8ffa5fff libDiagnosticMessagesClient.dylib (8) <8548E0DC-0D2F-30B6-B045-FE8A038E76D8> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff8ffd8000 - 0x7fff8ffdefff (2.5.2 - 2.5.2) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff8ffef000 - 0x7fff8fff3ff7 (1.0 - 1) /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x7fff8fff4000 - 0x7fff8fff5ff7 libremovefile.dylib (23.2) <6763BC8E-18B8-3AD9-8FFA-B43713A7264F> /usr/lib/system/libremovefile.dylib
0x7fff90043000 - 0x7fff9006bfff libJPEG.dylib (854) <000ADF07-A59C-36F8-9894-CD03F6CFBC1E> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff90084000 - 0x7fff90088fff libCoreVMClient.dylib (32.5) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff900a5000 - 0x7fff900aefff (1.0 - 26.3) <870C7810-0D27-3AC5-95A0-3224BB4890C0> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore
0x7fff900af000 - 0x7fff9010efff libTIFF.dylib (854) <29014639-6085-3F19-AE47-1026F70A3D0D> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff9010f000 - 0x7fff9011dfff libcommonCrypto.dylib (60027) /usr/lib/system/libcommonCrypto.dylib
0x7fff9016f000 - 0x7fff901beff7 libcorecrypto.dylib (106.2) /usr/lib/system/libcorecrypto.dylib
0x7fff901bf000 - 0x7fff901bffff (45 - 45) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff90201000 - 0x7fff90283fff (3.0 - 2.0) <716C152F-D299-3ACB-BCB0-E51F2D604BD1> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
0x7fff90284000 - 0x7fff902a3ff7 (2.0 - 133.3) <8BEC9AFB-DCAA-37E8-A5AB-24422B234ECF> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
0x7fff902a4000 - 0x7fff90361ff7 (4.8.0 - 4.8.0) <6CE333AE-EDDB-3768-9598-9DB38041DC55> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff90362000 - 0x7fff903b9ff7 (1.0 - 1) /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface
0x7fff906d7000 - 0x7fff907f0fff (3.2.2 - 854) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff90834000 - 0x7fff90834fff (57 - 57) <9DD44CB0-C644-35C3-8F57-0B41B3EC147D> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff9106f000 - 0x7fff91121ff7 (539.14 - 539.14) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff91122000 - 0x7fff91124fff libquarantine.dylib (52.1) <143B726E-DF47-37A8-90AA-F059CFD1A2E4> /usr/lib/system/libquarantine.dylib
0x7fff9117b000 - 0x7fff91180fff (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff914f0000 - 0x7fff91807ff7 (1037.6 - 1037.6) <1E567A52-677F-3168-979F-5FBB0818D52B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff91808000 - 0x7fff91842ff7 (3.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS
0x7fff91848000 - 0x7fff91b78fff (2.0 - 626.1) <656D08C2-9068-3532-ABDD-32EC5057CCB2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff91b79000 - 0x7fff91b87ff7 libkxld.dylib (2050.48.19) /usr/lib/system/libkxld.dylib
0x7fff91ba2000 - 0x7fff91bcdfff libxslt.1.dylib (11.3) <441776B8-9130-3893-956F-39C85FFA644F> /usr/lib/libxslt.1.dylib
0x7fff91c26000 - 0x7fff91c34ff7 libsystem_network.dylib (77.10) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib
0x7fff91c50000 - 0x7fff91c5bff7 (2.0 - 2.0) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x7fff91c5c000 - 0x7fff91c8afff (154.4 - 154.4) /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
0x7fff91c8b000 - 0x7fff91c93fff liblaunch.dylib (442.26.2) <2F71CAF8-6524-329E-AC56-C506658B4C0C> /usr/lib/system/liblaunch.dylib
0x7fff91d7a000 - 0x7fff91de7ff7 (4.1 - 269.3) <5775F0DB-87D6-310D-8B03-E2AD729EFB28> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
0x7fff91de8000 - 0x7fff91de9ff7 libSystem.B.dylib (169.3) <9089D72D-E714-31E1-80C8-698A8E8B05AD> /usr/lib/libSystem.B.dylib
0x7fff92dd9000 - 0x7fff92e35ff7 (1.3 - 93) <97F3B1D2-D81D-3F37-87B3-B9A686124CF5> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
0x7fff92e36000 - 0x7fff92e58ff7 libxpc.dylib (140.43) <70BC645B-6952-3264-930C-C835010CCEF9> /usr/lib/system/libxpc.dylib
0x7fff92e83000 - 0x7fff92e99fff (237.4 - 237.4) <0F7FEE29-161B-3D8E-BE91-308CBD354461> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff930bd000 - 0x7fff93a57a97 (1.600.0 - 340.4) <1B66B1D3-C371-329C-92AB-45C262241649> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff93a5c000 - 0x7fff93ac4fff libvDSP.dylib (380.10) <3CA154A3-1BE5-3CF4-BE48-F0A719A963BB> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff93ac7000 - 0x7fff93b48fff (10.7.0 - 707.13) <4F3EAB8E-CF5E-320E-A452-6CAFB96CF590> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff93b49000 - 0x7fff93ccffff libBLAS.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff93cd0000 - 0x7fff93dd2fff libJP2.dylib (854) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x7fff93dd3000 - 0x7fff93e1fff7 libauto.dylib (185.4) /usr/lib/libauto.dylib
0x7fff93e23000 - 0x7fff93e7dff7 (2.2.19 - 2.2.19) <3C7DFB2C-B3F9-3447-A1FC-EAAA42181A6E> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff93e7e000 - 0x7fff93e85fff libGFXShared.dylib (8.10.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff93eee000 - 0x7fff93f01ff7 libbsm.0.dylib (32) /usr/lib/libbsm.0.dylib
0x7fff93f44000 - 0x7fff93f46fff libCVMSPluginSupport.dylib (8.10.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
0x7fff943c7000 - 0x7fff9446dff7 (557.6 - 557.6) <1BDB5456-0CE9-301C-99C1-8EFD0D2BFCCD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff94472000 - 0x7fff9447aff7 libsystem_dnssd.dylib (379.38.1) /usr/lib/system/libsystem_dnssd.dylib
0x7fff9447b000 - 0x7fff944d1fff (1.20 - 417) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff94563000 - 0x7fff94564fff libsystem_blocks.dylib (59) /usr/lib/system/libsystem_blocks.dylib
0x7fff94565000 - 0x7fff945a9fff libcups.2.dylib (327.9) /usr/lib/libcups.2.dylib
0x7fff945aa000 - 0x7fff945bdff7 (1.7.0 - 1.7.0) <2F2694E9-A7BC-33C7-B4CF-8EC907DF0FEB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff946bf000 - 0x7fff946bffff libOpenScriptingUtil.dylib (148.3) /usr/lib/libOpenScriptingUtil.dylib
0x7fff946c0000 - 0x7fff946c2fff (2.0 - 23) /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x7fff946c3000 - 0x7fff946c3fff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib
0x7fff946c4000 - 0x7fff94839fff (596.6.4 - 596.6.4) <23B87D38-D2C1-38FE-8407-471F0CEB2748> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff9483a000 - 0x7fff9484efff (4.1.12 - 4.1.12) <94EDF2AB-809C-3D15-BED5-7AD45B2A7C16> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff948fc000 - 0x7fff94909ff7 (4.0 - 4.0) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
0x7fff949c3000 - 0x7fff949d1fff (1.1 - 1) <5AC28666-7642-395F-A923-C6F8A274BBBD> /System/Library/PrivateFrameworks/Librarian.framework/Versions/A/Librarian
0x7fff949d2000 - 0x7fff949f4ff7 (2.0 - 1) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff949f5000 - 0x7fff94ac7ff7 (275.18 - 275.18) <1574E725-4AED-3439-B6AA-E30F6BD7A9ED> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff94ac8000 - 0x7fff94b46fff (341.2 - 341.5) <6B5001BF-101E-3135-9D1A-AD83ECD73C7A> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff94b47000 - 0x7fff94bafff7 libc++.1.dylib (65.1) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib
0x7fff94c07000 - 0x7fff95834fff (6.8 - 1187.40) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff95896000 - 0x7fff958fffff libstdc++.6.dylib (56) /usr/lib/libstdc++.6.dylib
0x7fff95900000 - 0x7fff959c5ff7 (2.0 - 181.1) <83D2C92D-6842-3C9D-9289-39D5B4554C3A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff959c6000 - 0x7fff959dbff7 libdispatch.dylib (228.23) /usr/lib/system/libdispatch.dylib
0x7fff95a2c000 - 0x7fff95a6fff7 (2.0 - 80.6) <5CFA361D-4853-3ACC-9EFC-A2AC1F43BA4B> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
0x7fff95a70000 - 0x7fff95ad3fff (4.1.2 - 4.1.2) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff96107000 - 0x7fff962b5fff (1.8 - 304.5) <5674D50C-D96C-3A2D-95C5-C93311C7FB56> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff962bf000 - 0x7fff962e4ff7 libc++abi.dylib (26) /usr/lib/libc++abi.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 55
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 7534233
thread_create: 1
thread_set_state: 180

VM Region Summary:
ReadOnly portion of Libraries: Total=190.7M resident=144.9M(76%) swapped_out_or_unallocated=45.8M(24%)
Writable regions: Total=4.1G written=22.4M(1%) resident=31.6M(1%) swapped_out=188K(0%) unallocated=4.1G(99%)

=========== =======
(null) (reserved) 4.0G reserved VM address space (unallocated)
CG backing stores 1824K
CG image 4K
CG shared images 1248K
CoreServices 7956K
MALLOC guard page 48K
Memory tag=242 12K
Stack 10.0M
__DATA 17.7M
__IMAGE 528K
__TEXT 128.4M
mapped file 43.6M
shared memory 308K
=========== =======
TOTAL, minus reserved VM space 394.6M

Model: MacBookPro3,1, BootROM MBP31.0070.B07, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.16f11
Graphics: NVIDIA GeForce 8600M GT, GeForce 8600M GT, PCIe, 256 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR2 SDRAM, 667 MHz, 0xCE00000000000000, 0x4D342037305435363633435A332D43453620
Memory Module: BANK 1/DIMM1, 2 GB, DDR2 SDRAM, 667 MHz, 0xCE00000000000000, 0x4D342037305435363633435A332D43453620
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x87), Atheros 5416:
Bluetooth: Version 6.1.7f5 15859, 3 service, 12 devices, 3 incoming serial ports
Network Service: AirPort, AirPort, en1
PCI Card: pci168c,24, sppci_othernetwork, PCI Slot 5
Serial ATA Device: ST9500420ASG, 500.11 GB
Parallel ATA Device: MATSHITADVD-R UJ-857E
USB Device: Built-in iSight, apple_vendor_id, 0x8502, 0xfd400000 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8205, 0x1a100000 / 2
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x021a, 0x5d200000 / 3
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x5d100000 / 2

[quote]gdb root[/quote]You should run gdb on the executable literally named root.exe:[quote]gdb root.exe[/quote]as ‘root’ is a simple wrapper that turn out and starts root.exe


Hm. It certainly gave me a lot more warning messages, but I don’t think this set the breakpoint properly either. Output is attached.
gdb_output.txt (55.7 KB)


Try setting the break after the first failing run and, without exiting gdb, run a second time.


Hi Philippe,

Thanks (again!) for your help. I tried your suggestion where I ran root.exe in gdb, let it fail at opening a TCanvas, then set the breakpoint and ran it again without exiting gdb, but the results look pretty similar. (I’m attaching the output anyway.) This is getting weird – could I have somehow managed to compile/install root without its debug information maybe?
gdb_output2.txt (56.9 KB)


code backtrace
#0 0x00007fff8ebc5588 in malloc_error_break ()
#1 0x00007fff8ebc6942 in free ()
(gdb) q[/code]Yes, this most likely indicates you have an optimized build. Rebuilding on debug will/should provide more information. It could also be that your gdb is ‘too old’ in which lldb should provide more information.


Aaaand down the rabbit hole I go. :slight_smile:

I installed a new copy of Root 5.34/34 in a different directory, with these options:

./configure --all --fail-on-missing --enable-mysql --enable-soversion --enable-rpath --enable-x11 --enable-xft --enable-gsl-shared --enable-roofit --with-clang --prefix=/Users/spiffyzha/Packages/root5_ --etcdir=/Users/spiffyzha/Packages/root5_/etc/root --libdir=/Users/spiffyzha/Packages/root5_/lib --incdir=/Users/spiffyzha/Packages/root5_/include --mandir=/Users/spiffyzha/Packages/root5_/share/man --build=debug

Sadly, this didn’t fix my issue with TCanvases though, as I was secretly hoping it might. And my copy of gdb does indeed appear to be too old, or at least it doesn’t offer me anything new. So LLDB it is, for the moment at least. Here’s what I’ve got:

[code]/Users/spiffyzha/Desktop/PreProcessor$ lldb /Users/spiffyzha/Packages/root5_/bin/root.exe
Current executable set to ‘/Users/spiffyzha/Packages/root5_/bin/root.exe’ (x86_64).
(lldb) breakpoint set -n malloc_error_break
Breakpoint 1: where = libsystem_c.dylib`malloc_error_break, address = 0x000000000002c584
(lldb) run -l
Process 92570 launched: ‘/Users/spiffyzha/Packages/root5_/bin/root.exe’ (x86_64)
1 location added to breakpoint 1
TFile * f = new TFile(“acanvas.root”);
TCanvas * t = f -> Get(“canvas1”);
root.exe(92570,0x7fff71031180) malloc: *** error for object 0x7fff71cfd570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Process 92570 stopped

  • thread #1: tid = 0x2aaa4, 0x00007fff85726584 libsystem_c.dylibmalloc_error_break, queue = '', stop reason = breakpoint 1.2 frame #0: 0x00007fff85726584 libsystem_c.dylibmalloc_error_break
    -> 0x7fff85726584: pushq %rbp
    0x7fff85726585: movq %rsp, %rbp
    0x7fff85726588: nop
    0x7fff85726589: nopl (%rax)

So that’s more information at least, but I don’t know how to interpret it.

What is the stack trace at the point of failure?

Attach your ROOT file so that we can try it.
You write that you have two ROOT versions installed simultaneously.
How did you build them?
When building the second version, did you make sure that the libraries and executables belonging to the first version were not seen at all?
How do you switch between these two versions now?
Is is possible that one version sees libraries and/or executables which belong to the other one?
See also: Missing Canvas

The stack trace output and (one of) the root file(s) I’ve been using are both attached.

As far as my two builds of ROOT – I certainly tried to keep everything separated, but it was sort-of a process of trial and error, so it wouldn’t surprise me to learn that I overlooked something. I switch between them by calling the “” script associated with the installation I want to use.

As for the specifics of the installations: I first installed ROOT v6.04.08 using gcc 5.1.0. In particular, I used these options:

cmake ../root-6.04.08_ -DCMAKE_INSTALL_PREFIX=/Users/spiffyzha/Packages/root6 -Dgminimal=ON -Droofit=ON -Dmysql=ON -Dcocoa=OFF -Dcxx11=ON -Dgsl-shared=OFF -DCMAKE_C_COMPILER=/usr/gcc-5.1.0/bin/gcc-5.1.0 -DCMAKE_CXX_COMPILER=/usr/gcc-5.1.0/bin/g++-5.1.0 -Dx11=ON -Dbuiltin-freetype=ON -Drpath=ON -Dsoversion=ON -Dfail-on-missing=ON -Dxft=ON -Dcling=ON

Basically, I need the ROOT libraries to link with things that use C++11, and I couldn’t make it work with a clang-based install of ROOT. The Root 6 interpreter actually seems to crash when I do pretty much anything, but I don’t care too much about that as long as I can link with its libraries.

Then, I went on to install Root 5 using clang, as described in my previous post (though previously without the “debug” option) – and this seems to work fine most of the time. This build is my default, I can link to its libraries with way less fuss than it takes for the GCC-based build, and the interpreter works nicely for most of the things.
acanvas.root (84.3 KB)
lldb_output.txt (10.2 KB)

That other thread has a lot of good information. I don’t know at this point whether or not I reset my environment variables prior to installing root 5 and root 6 previously, but I definitely didn’t do it when I reinstalled root 5 yesterday. I also found some ancient root files living in /opt/local/share and /opt/local/include . Based on their dates, they’re from an old install of root version 5.x (as well as from a simpler time when TCanvases still worked).

So, I’m going to try this: I’ll delete those files, delete both copies of root 5, get rid of anything pointing to a root installation within my environment variables (Do I need to worry about anything other than $ROOTSYS, $PATH, and $LD_LIBRARY_PATH??), and then reinstall root 5.

I had no problems on my Linux machine to open your file with ROOT 5.34/35 and 6.06/00.

Check “/usr/local/bin” (ROOT 5 produces up to about 29 executables and scripts), “/usr/local/lib”, “/usr/local/lib/root”, “/usr/local/etc/root”, “/etc/root” for any remnants of your old ROOT 5.
Looking at your “lldb_output.txt” file, “”, “”, “” are without version numbers while another libraries are “*”, so it is possible that they come from different ROOT versions.

Check “CMAKE_PREFIX_PATH”, “DYLD_LIBRARY_PATH”, “LD_LIBRARY_PATH”, “LIBPATH”, “MANPATH”, “PATH”, “PYTHONPATH”, “ROOTSYS” (note: it seems that you actually want to “unset ROOTSYS” when building both versions), “SHLIB_PATH”.

(Also, always use “–enable-soversion” for ROOT 5 and “-Dsoversion=ON” for ROOT 6.)

BTW. I’m not sure if you are allowed to compile ROOT 6 with gcc on Mac OS X (I think it requires clang).


In lldb in the failing case, what does the lldb command ‘image list’ prints?


Yeah, I think I’m not really supposed to. Alas, clang won’t do everything I need (or, more likely, I was insufficiently persuasive). It certainly took me long enough to get anything working with gcc, so I can see why folks would want to discontinue supporting this. :slight_smile:

So. I’ve left my semi-functional gcc-based installation of root 6 alone. It seems to at least be nicely contained within one particular directory. I removed all references to anything that looked ROOT-like from all of those environment variables, and I trashed all the ROOT files I found outside the ROOT 6 install directory. And then I re-built and reinstalled ROOT 5, as before, with these options:

./configure --all --fail-on-missing --enable-mysql --enable-soversion --enable-rpath --enable-x11 --enable-xft --enable-gsl-shared --enable-roofit --with-clang --prefix=/Users/spiffyzha/Packages/root5_ --etcdir=/Users/spiffyzha/Packages/root5_/etc/root --libdir=/Users/spiffyzha/Packages/root5_/lib --incdir=/Users/spiffyzha/Packages/root5_/include --mandir=/Users/spiffyzha/Packages/root5_/share/man --build=debug

When it was done installing, I called its “” script and loaded up ROOT. It still won’t open a TCanvas for me though.

I’ve attached lldb output from my shiny new installation, complete with a ‘thread backtrace’ and ‘image list’.

It’s interesting what you noticed about the versions on some of my libraries. It looks like ‘’, ‘’, and ‘’ are indeed associated with Root 6. (At least … I think?? Root 5 and Root 6 install locations both contain a file called “” (and etc), but for the Root 6 install it’s a “real” library file, where as for Root 5 it’s just an alias to “” – but the trace would probably find the original and not just the symbolic link that got called, right?)

But … the Root5 copies of “” and “” both live in the Root5 ‘libdir’ as specified above during the installation, so I don’t know why Root5 would try to look elsewhere. In fact, there’s nothing involving Root6 in any of the environment variables I checked:

[code] which root /Users/spiffyzha/Packages/root5_/bin/root echo ROOTSYS /Users/spiffyzha/Packages/root5_ echo PATH /opt/X11/include:/opt/X11/bin:/Users/spiffyzha/Packages/roody/bin:/usr/local/mysql/bin:/usr/local/mysql/include:/usr/gcc-5.1.0/bin:/Users/spiffyzha/geant4_workdir/bin/Darwin-g++:/Users/spiffyzha/Packages/geant4_v964_gcc/install/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/spiffyzha/Packages/root5_/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin echo LD_LIBRARY_PATH /Users/spiffyzha/Packages/root5_/lib echo $CMAKE_PREFIX_PATH

$ echo DYLD_LIBRARY_PATH /Users/spiffyzha/Packages/MiscLibs:/usr/local/mysql/bin:/usr/local/mysql/include:/usr/local/mysql/lib:/Users/spiffyzha/Packages/roody/bin:/usr/local/mysql/bin:/usr/local/mysql/include:/usr/gcc-5.1.0/bin:/Users/spiffyzha/geant4_workdir/bin/Darwin-g++:/Users/spiffyzha/Packages/geant4_v964_gcc/install/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/spiffyzha/Packages/root5_/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/spiffyzha/Packages/geant4_v964_gcc/install/lib:/Users/spiffyzha/Packages/geant4_v964_gcc/install/lib:/Users/spiffyzha/Packages/root5_/lib echo LIBPATH /Users/spiffyzha/Packages/root5_/lib echo MANPATH /Users/spiffyzha/Packages/root5_/share:/usr/share/man:/usr/local/share/man:/opt/X11/share/man echo PYTHONPATH /Users/spiffyzha/Packages/root5_/lib echo $SHLIB_PATH
lldb_output2.txt (31.1 KB)


The problem is most likely:[ 6] EAA2B53E-EADE-39CF-A0EF-FB9D4940672A 0x00007fff8c3f7000 /usr/lib/libstdc++.6.dylib [ 7] DA8891C5-4FB7-3F5E-9596-B9A7B95EC1E6 0x0000000101795000 /usr/local/lib/liblzma.5.dylib [ 8] 773F4826-AAE4-3DF6-AAF2-F24A8E3DFBC6 0x00000001017b8000 /opt/local/lib/libpcre.1.dylib [ 9] DD7AADDF-3D00-34D6-846D-05C18EE67ABD 0x0000000101819000 /usr/local/lib/libstdc++.6.dylib

where we can see that two different libstdc++ are being used, one from /usr/lib and one for /usr/local/lib. They are likely different and incompatible leading to a crash in std::string: * frame #0: 0x00007fff85726584 libsystem_c.dylib`malloc_error_break frame #1: 0x00007fff85727942 libsystem_c.dylib`free + 321 frame #2: 0x0000000101885518 libstdc++.6.dylib`std::string::_M_mutate(unsigned long, unsigned long, unsigned long) + 392 frame #3: 0x000000010188598e libstdc++.6.dylib`std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) + 30.

To solve the problem, the best solution is likely to ask configure and/or cmake to use the builtin version of lzma and pcre.


I gave this a try, but I still had the same problem.

For completeness, here’s what I did: I cleaned out the environment variables, tossed my previous root5 install, and ran this for the configure script:

./configure --all --fail-on-missing --enable-mysql --enable-soversion --enable-rpath --enable-x11 --enable-xft --enable-gsl-shared --enable-roofit --with-clang --prefix=/Users/spiffyzha/Packages/root5 --etcdir=/Users/spiffyzha/Packages/root5/etc/root --libdir=/Users/spiffyzha/Packages/root5/lib --incdir=/Users/spiffyzha/Packages/root5/include --mandir=/Users/spiffyzha/Packages/root5/share/man --build=debug --enable-builtin-lzma --enable-builtin-pcre

…and the configure script came back with this:

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, cintex, cocoa, explicitlink, fink, fftw3, gviz, gdml, genvector, gsl_shared, http, krb5, ldap, mathmore, memstat, minuit2, mysql, odbc, opengl, pgsql, python, reflex, roofit, ruby, rpath, shared, soversion, sqlite, ssl, table, tmva, unuran, vc, vdt, xml.

So I built and installed it, and ran its script. Then I tried to load up a TCanvas from within the root interpreter. No luck. (See lldb_output3.txt, which is attached.)

I noticed that fink was enabled (and therefore would have been this whole time), which can’t possibly be a good idea given the nature of the problem. So I disabled it and tried again:

./configure --all --fail-on-missing --enable-mysql --enable-soversion --enable-rpath --enable-x11 --enable-xft --enable-gsl-shared --enable-roofit --with-clang --prefix=/Users/spiffyzha/Packages/root5 --etcdir=/Users/spiffyzha/Packages/root5/etc/root --libdir=/Users/spiffyzha/Packages/root5/lib --incdir=/Users/spiffyzha/Packages/root5/include --mandir=/Users/spiffyzha/Packages/root5/share/man --build=debug --enable-builtin-lzma --enable-builtin-pcre --disable-fink
Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, cintex, cocoa, explicitlink, gdml, genvector, gsl_shared, http, krb5, ldap, mathmore, memstat, minuit2, mysql, odbc, opengl, pgsql, python, reflex, roofit, ruby, rpath, shared, soversion, sqlite, ssl, table, tmva, unuran, vc, vdt, xml.

Same problem though. See lldb_output4.txt (which looks the same as lldb_output3.txt, to my untrained eye). But in particular, I notice that this is still there:

[ 6] EAA2B53E-EADE-39CF-A0EF-FB9D4940672A 0x00007fff8c3f7000 /usr/lib/libstdc++.6.dylib [ 7] DD7AADDF-3D00-34D6-846D-05C18EE67ABD 0x00000001017c4000 /usr/local/lib/libstdc++.6.dylib
lldb_output4.txt (30.9 KB)
lldb_output3.txt (30.9 KB)

Then we need to track down where it comes from …

Can you run ‘otool -L’ on each of the main ROOT libraries (,,,, and also on,,,,,,


Neat, I didn’t know you could do that! :slight_smile:

Output is attached.

It looks like is the only one that uses “/usr/local/lib/libstdc++.6.dylib”, and all the others use “/usr/lib/libstdc++.6.dylib”. …with the exception of Does that one definitely come with ROOT 5 ? Because the only copy I have of that is associated with my ROOT 6 install.
otool_output.txt (11.7 KB)