EVE tutorial crashes in ROOT 6

I am trying to run calorimeter.C from the EVE tutorials directory. It works for ROOT 5, but not ROOT 6. The transcript:

> root $ROOTSYS/tutorials/eve/calorimeters.C 
   ------------------------------------------------------------
  | Welcome to ROOT 6.08/00                http://root.cern.ch |
  |                               (c) 1995-2016, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-08-00, 4 November 2016                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 
Processing /home/gluex/gluex_top/root/root-6.08.00/tutorials/eve/calorimeters.C...
Info in <TFile::OpenFromCache>: using local cache copy of http://amraktad.web.cern.ch/amraktad/cms_calo_hist.root [./amraktad/cms_calo_hist.root]

Thread 2 (Thread 0x7f60efe9b700 (LWP 30179)):
#0  0x00007f611355d6d5 in pthread_cond_wait

GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f60f27902d3 in radeon_drm_cs_emit_ioctl () from /usr/lib64/dri/r600_dri.so
#2  0x00007f60f278fa07 in impl_thrd_routine () from /usr/lib64/dri/r600_dri.so
#3  0x00007f6113559dc5 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f611328873d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f6114976980 (LWP 30164)):
#0  0x00007f611324f2c9 in waitpid () from /lib64/libc.so.6
#1  0x00007f61131d2c72 in do_system () from /lib64/libc.so.6
#2  0x00007f61131d3021 in system () from /lib64/libc.so.6
#3  0x00007f611424e409 in TUnixSystem::StackTrace (this=0x1e908e0) at /home/gluex/gluex_top/root/root-6.08.00/core/unix/src/TUnixSystem.cxx:2403
#4  0x00007f610fb6db55 in cling::MultiplexInterpreterCallbacks::PrintStackTrace() () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#5  0x00007f610fb6d517 in cling_runtime_internal_throwIfInvalidPointer () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#6  0x00007f61149970d1 in ?? ()
#7  0x0000000006916c10 in ?? ()
#8  0x00007f60fbdfdcc8 in TGListTree::AdjustPosition (this=0x7ffc68823830, this
entry=0x5c61fa0, item=item
entry=0x6916c10) at /home/gluex/gluex_top/root/root-6.08.00/gui/gui/src/TGListTree.cxx:1310
#9  0x00007f60fbdfde0d in TGListTree::OpenItem (this=this
entry=0x5c61fa0, item=item
entry=0x6916c10) at /home/gluex/gluex_top/root/root-6.08.00/gui/gui/src/TGListTree.cxx:2044
#10 0x00007f60fe5f05fd in TEveManager::AddToListTree (this=<optimized out>, re=0x6915930, open=<optimized out>, lt=0x5c61fa0) at /home/gluex/gluex_top/root/root-6.08.00/graf3d/eve/src/TEveManager.cxx:495
#11 0x00007f6114997c17 in ?? ()
#12 0x0000000006916c10 in ?? ()
#13 0x00007f610fb6d480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#14 0x0000000001ef6250 in ?? ()
#15 0x00000000069f1130 in ?? ()
#16 0x00000000069f1130 in ?? ()
#17 0x401921fb54442d18 in ?? ()
#18 0x00007f610fb6d480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#19 0x0000000001ef6250 in ?? ()
#20 0x00000000069f0d70 in ?? ()
#21 0x00000000069f0d70 in ?? ()
#22 0x00000000065793a0 in ?? ()
#23 0x00007f610fb6d480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#24 0x0000000001ef6250 in ?? ()
#25 0x0000000005a275d0 in ?? ()
#26 0x0000000005adf6c8 in ?? ()
#27 0x000000000690fa40 in ?? ()
#28 0x0000000006915750 in ?? ()
#29 0x0000000006915750 in ?? ()
#30 0x00007f60fe5fb220 in ?? () at /home/gluex/gluex_top/root/root-6.08.00/build_dir/include/TEveProjectionAxes.h:69 from /home/gluex/gluex_top/root/root-6.08.00/lib/libEve.so
#31 0x00007ffc688237c8 in ?? ()
#32 0x00007ffc688237d0 in ?? ()
#33 0x00007f6114997c80 in ?? ()
#34 0x00000000069f1130 in ?? ()
#35 0x0000000000000000 in ?? ()
Error in <HandleInterpreterException>: Trying to access a pointer that points to an invalid memory address..
Execution of your code was aborted.
In file included from input_line_8:1:
/home/gluex/gluex_top/root/root-6.08.00/tutorials/eve/calorimeters.C:113:4: warning: invalid memory pointer passed to a callee:
   glv->AddOverlayElement(overlay);
   ^~~
root [1] 

This is on a RedHat Enterprise 7 machine, ROOT 6.08.00.

Apparently, the tutorials which only access geometry information are fine. There appears to be a problem with rendering other types of objects, like hit information, perhaps having something to do with using OpenGL and/or interaction with graphics drivers.

We are about to start a new event display project and want to use EVE, but also want to use ROOT 6. We are concerned that this problem may be fundamental and prevent progress.

Any guidance appreciated.

Hi,

Add the lines:

#include "TSystem.h"
#include "TEveCalo.h"
#include "TEveWindow.h"
#include "TEveManager.h"
#include "TEveBrowser.h"
#include "TEveProjectionAxes.h"
#include "TEveScene.h"
#include "TEveViewer.h"
#include "TEveTrans.h"
#include "TEveCaloLegoOverlay.h"
#include "TEveLegoEventHandler.h"
#include "TEveGedEditor.h"
#include "TEveJetCone.h"

#include "TGLWidget.h"
#include "TGLViewer.h"
#include "TGTab.h"

#include "TFile.h"
#include "TAxis.h"

at the beginning of calorimeters.C to solve the problem.

Cheers,
Philippe.

Getting similar errors. Here is the before vs. after diff of the macro:


--- calorimeters.C~	2017-04-21 14:48:05.231153690 -0400
+++ calorimeters.C	2017-04-21 14:48:42.679948791 -0400
@@ -7,6 +7,27 @@
 ///
 /// \author Alja Mrak-Tadel
 
+#include "TSystem.h"
+#include "TEveCalo.h"
+#include "TEveWindow.h"
+#include "TEveManager.h"
+#include "TEveBrowser.h"
+#include "TEveProjectionAxes.h"
+#include "TEveScene.h"
+#include "TEveViewer.h"
+#include "TEveTrans.h"
+#include "TEveCaloLegoOverlay.h"
+#include "TEveLegoEventHandler.h"
+#include "TEveGedEditor.h"
+#include "TEveJetCone.h"
+
+#include "TGLWidget.h"
+#include "TGLViewer.h"
+#include "TGTab.h"
+
+#include "TFile.h"
+#include "TAxis.h"
+
 #include "TEveProjections.h"
 
 const char* histFile =

and the error output, essentially the same:

> root calorimeters.C
   ------------------------------------------------------------
  | Welcome to ROOT 6.08/00                http://root.cern.ch |
  |                               (c) 1995-2016, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-08-00, 4 November 2016                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 
Processing calorimeters.C...
Info in <TFile::OpenFromCache>: using local cache copy of http://amraktad.web.cern.ch/amraktad/cms_calo_hist.root [./amraktad/cms_calo_hist.root]

Thread 2 (Thread 0x7f108c1b3700 (LWP 24959)):
#0  0x00007f10af8756d5 in pthread_cond_wait

GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f108eaa82d3 in radeon_drm_cs_emit_ioctl () from /usr/lib64/dri/r600_dri.so
#2  0x00007f108eaa7a07 in impl_thrd_routine () from /usr/lib64/dri/r600_dri.so
#3  0x00007f10af871dc5 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f10af5a073d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f10b0c8e980 (LWP 24945)):
#0  0x00007f10af5672c9 in waitpid () from /lib64/libc.so.6
#1  0x00007f10af4eac72 in do_system () from /lib64/libc.so.6
#2  0x00007f10af4eb021 in system () from /lib64/libc.so.6
#3  0x00007f10b0566409 in TUnixSystem::StackTrace (this=0x7098e0) at /home/gluex/gluex_top/root/root-6.08.00/core/unix/src/TUnixSystem.cxx:2403
#4  0x00007f10abe85b55 in cling::MultiplexInterpreterCallbacks::PrintStackTrace() () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#5  0x00007f10abe85517 in cling_runtime_internal_throwIfInvalidPointer () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#6  0x00007f10b0caf061 in ?? ()
#7  0x0000000005190bb0 in ?? ()
#8  0x00007f1098115cc8 in TGListTree::AdjustPosition (this=0x7ffe6cfef9a0, this
entry=0x44fcd80, item=item
entry=0x5190bb0) at /home/gluex/gluex_top/root/root-6.08.00/gui/gui/src/TGListTree.cxx:1310
#9  0x00007f1098115e0d in TGListTree::OpenItem (this=this
entry=0x44fcd80, item=item
entry=0x5190bb0) at /home/gluex/gluex_top/root/root-6.08.00/gui/gui/src/TGListTree.cxx:2044
#10 0x00007f109a9085fd in TEveManager::AddToListTree (this=<optimized out>, re=0x5195900, open=<optimized out>, lt=0x44fcd80) at /home/gluex/gluex_top/root/root-6.08.00/graf3d/eve/src/TEveManager.cxx:495
#11 0x00007f10b0cafb07 in ?? ()
#12 0x0000000005190bb0 in ?? ()
#13 0x00007f10abe85480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#14 0x000000000076f250 in ?? ()
#15 0x000000000527c360 in ?? ()
#16 0x000000000527c360 in ?? ()
#17 0x401921fb54442d18 in ?? ()
#18 0x00007f10abe85480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#19 0x000000000076f250 in ?? ()
#20 0x000000000527bfa0 in ?? ()
#21 0x000000000527bfa0 in ?? ()
#22 0x0000000004dee410 in ?? ()
#23 0x00007f10abe85480 in ?? () from /home/gluex/gluex_top/root/root-6.08.00/lib/libCling.so
#24 0x000000000076f250 in ?? ()
#25 0x0000000002dd9f90 in ?? ()
#26 0x0000000002e8a0b8 in ?? ()
#27 0x000000000518d790 in ?? ()
#28 0x0000000005195720 in ?? ()
#29 0x0000000005195720 in ?? ()
#30 0x00007f109a913220 in ?? () at /home/gluex/gluex_top/root/root-6.08.00/build_dir/include/TEveProjectionAxes.h:69 from /home/gluex/gluex_top/root/root-6.08.00/lib/libEve.so
#31 0x00007ffe6cfef938 in ?? ()
#32 0x00007ffe6cfef940 in ?? ()
#33 0x00007f10b0cafb70 in ?? ()
#34 0x000000000527c360 in ?? ()
#35 0x0000000000000000 in ?? ()
Error in <HandleInterpreterException>: Trying to access a pointer that points to an invalid memory address..
Execution of your code was aborted.
In file included from input_line_8:1:
/home/marki/calorimeters.C:134:4: warning: invalid memory pointer passed to a callee:
   glv->AddOverlayElement(overlay);
   ^~~
root [1] 

Taking calorimeters.C from GitHub as a reference, the crash happens on line 133 inside MakeCaloLego

glv->AddOverlayElement(overlay);

on the line 97 first of void calorimeters()

lego = MakeCaloLego(data, slotRightBottom);

MakeCaloLego works by itself (if one comments everything below “first tab”). But it begins failing at some point. This is, actually, only one example of failing eve examples as Mark wrote above.

How we tested it:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.