From de04b3f0368f7016d3c48c16dbec7357a3cc67f2 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Sat, 15 Feb 2020 16:31:41 +0100 Subject: [PATCH] eventHandler test cleanup. Furthermore move make -> cmake. --- src/tests/eventHandler/CMakeLists.txt | 93 +++++++++++++++++++ src/tests/eventHandler/Makefile | 92 ------------------ .../eventHandlerTest-crash-F13.log | 65 ------------- .../eventHandlerTest-crash-MacOSX10.6.4.log | 68 -------------- .../eventHandler/eventHandlerTest-crash.log | 76 --------------- .../eventHandlerTest-valgrind.log | 75 --------------- src/tests/eventHandler/eventHandlerTest.cpp | 3 +- 7 files changed, 94 insertions(+), 378 deletions(-) create mode 100644 src/tests/eventHandler/CMakeLists.txt delete mode 100644 src/tests/eventHandler/Makefile delete mode 100644 src/tests/eventHandler/eventHandlerTest-crash-F13.log delete mode 100644 src/tests/eventHandler/eventHandlerTest-crash-MacOSX10.6.4.log delete mode 100644 src/tests/eventHandler/eventHandlerTest-crash.log delete mode 100644 src/tests/eventHandler/eventHandlerTest-valgrind.log diff --git a/src/tests/eventHandler/CMakeLists.txt b/src/tests/eventHandler/CMakeLists.txt new file mode 100644 index 00000000..165aeba5 --- /dev/null +++ b/src/tests/eventHandler/CMakeLists.txt @@ -0,0 +1,93 @@ +# - musrfit +cmake_minimum_required(VERSION 3.9) + +if (CMAKE_VERSION GREATER_EQUAL 3.12) + cmake_policy(SET CMP0075 NEW) +endif (CMAKE_VERSION GREATER_EQUAL 3.12) + +project(eventHandler VERSION 1.0.0 LANGUAGES C CXX) + +#--- set a default build type if none was specified --------------------------- +set(default_build_type "Release") + +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +#--- perform some checks and generate the config.h ---------------------------- + +#--- the next two lines are needed that the math functions are found ---------- +set(CMAKE_REQUIRED_INCLUDES math.h) +set(CMAKE_REQUIRED_LIBRARIES m) + +include(CheckTypeSize) +include(CheckIncludeFiles) +include(CheckFunctionExists) +check_include_files(alloca.h HAVE_ALLOCA_H) +check_include_files("sys/ipc.h;sys/shm.h" HAVE_SHMGET) +check_include_files(dlfcn.h HAVE_DLFCN_H) +check_function_exists(erf HAVE_ERF) +check_function_exists(getloadavg HAVE_GETLOADAVG) +check_include_files(inttypes.h HAVE_INTTYPES_H) +check_include_files(memory.h HAVE_MEMORY_H) +check_function_exists(powl HAVE_POWL) +check_include_files(memory.h HAVE_MEMORY_H) +check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(stdlib.h HAVE_STDLIB_H) +check_include_files(string.h HAVE_STRING_H) +check_include_files(strings.h HAVE_STRINGS_H) +check_include_files(sys/stat.h HAVE_SYS_STAT_H) +check_include_files(sys/types.h HAVE_SYS_TYPES_H) +check_include_files(sys/unistd.h HAVE_UNISTD_H) +check_type_size("long double" LONG_DOUBLE) +check_type_size("double" DOUBLE) +if (${LONG_DOUBLE} GREATER ${DOUBLE}) + set(HAVE_LONG_DOUBLE 1) + set(HAVE_LONG_DOUBLE_WIDER 1) +endif (${LONG_DOUBLE} GREATER ${DOUBLE}) + +#--- check for all the needed packages ---------------------------------------- + +#--- check for git ------------------------------------------------------------ +find_package(Git REQUIRED) + +#--- check for ROOT ----------------------------------------------------------- +find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser) +if (ROOT_mathmore_FOUND) + execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR) + string(STRIP ${ROOT_BINDIR} ROOT_BINDIR) + execute_process(COMMAND root-config --version OUTPUT_VARIABLE ROOT_VERSION) + string(STRIP ${ROOT_VERSION} ROOT_VERSION) + message("-- Found ROOT: ${ROOT_BINDIR} (found version: ${ROOT_VERSION})") + #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY) + include(${ROOT_USE_FILE}) +endif (ROOT_mathmore_FOUND) + +#--- generate necessary dictionaries ------------------------------------------ +root_generate_dictionary( + PEventHandlerTestDict + PEventHandlerTest.h + OPTIONS + -inlineInputHeader + LINKDEF PEventHandlerTestLinkDef.h + MODULE PEventHandlerTest +) + +#--- add all executables ------------------------------------------------------ +add_executable(eventHandler + PEventHandlerTest.cpp + PEventHandlerTestDict.cxx + eventHandlerTest.cpp +) +target_include_directories(eventHandler + BEFORE PRIVATE + $ +) +target_link_libraries(eventHandler ${ROOT_LIBRARIES}) + +#--- end ---------------------------------------------------------------------- diff --git a/src/tests/eventHandler/Makefile b/src/tests/eventHandler/Makefile deleted file mode 100644 index 5c96065e..00000000 --- a/src/tests/eventHandler/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -#--------------------------------------------------- -# Makefile -# -# Author: Andreas Suter -# e-mail: andreas.suter@psi.ch -# -# $Id$ -# -#--------------------------------------------------- - -#--------------------------------------------------- -# get compilation and library flags from root-config - -ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags) -ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs) -ROOTGLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) - -#--------------------------------------------------- -# depending on the architecture, choose the compiler, -# linker, and the flags to use -# - -OSTYPE = $(shell uname) - -ifeq ($(OSTYPE),Linux) -OS = LINUX -endif -ifeq ($(OSTYPE),Linux-gnu) -OS = LINUX -endif -ifeq ($(OSTYPE),Darwin) -OS = DARWIN -endif - -# -- Linux -ifeq ($(OS),LINUX) -CXX = g++ -CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC -INCLUDES = -I./ -LD = g++ -LDFLAGS = -g -SOFLAGS = -O -shared -endif - -# -- Darwin -ifeq ($(OS),DARWIN) -CXX = g++ -CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC -INCLUDES = -I../include -LD = g++ -LDFLAGS = -g -SOFLAGS = -dynamic -endif - -# the output from the root-config script: -CXXFLAGS += $(ROOTCFLAGS) -LDFLAGS += - -# the ROOT libraries (G = graphic) -LIBS = $(ROOTLIBS) -lXMLParser -GLIBS = $(ROOTGLIBS) -lXMLParser - -EXEC = eventHandlerTest - -# some definitions: headers (used to generate *Dict* stuff), sources, objects,... -OBJS = -OBJS += $(EXEC).o -OBJS += PEventHandlerTest.o PEventHandlerTestDict.o - -# make the executable: -# -all: $(EXEC) - -$(EXEC): $(OBJS) - @echo "---> Building $(EXEC) ..." - $(LD) $(OBJS) -o $(EXEC) $(GLIBS) - @echo "done" - -# clean up: remove all object file (and core files) -# semicolon needed to tell make there is no source -# for this target! -# -clean:; @rm -f $(OBJS) *Dict* core* - @echo "---> removing $(OBJS)" - -# -$(OBJS): %.o: %.cpp - $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< - -PEventHandlerTestDict.cpp: ./PEventHandlerTest.h ./PEventHandlerTestLinkDef.h - @echo "Generating dictionary $@..." - rootcint -v -f $@ -c -p $^ diff --git a/src/tests/eventHandler/eventHandlerTest-crash-F13.log b/src/tests/eventHandler/eventHandlerTest-crash-F13.log deleted file mode 100644 index bbee1ef0..00000000 --- a/src/tests/eventHandler/eventHandlerTest-crash-F13.log +++ /dev/null @@ -1,65 +0,0 @@ -INFO -System: Fedora 13 -Compiler: gcc/g++ (GCC) 4.4.4 20100630 -ROOT: ROOT 5.27/07 trunk@36421 - -=========================================================== - - *** Break *** segmentation violation - - - -=========================================================== -There was a crash (#7 0x00e7fb6d in SigHandler(ESignals) () from /opt/cern/root/lib/libCore.so). -This is the entire stack trace of all threads: -=========================================================== -#0 0x00ca7416 in __kernel_vsyscall () -#1 0x014ae463 in __waitpid_nocancel () from /lib/libc.so.6 -#2 0x0144a753 in do_system () from /lib/libc.so.6 -#3 0x0140475d in system () from /lib/libpthread.so.0 -#4 0x00e7891d in TUnixSystem::Exec(char const*) () from /opt/cern/root/lib/libCore.so -#5 0x00e7e750 in TUnixSystem::StackTrace() () from /opt/cern/root/lib/libCore.so -#6 0x00e7fa5f in TUnixSystem::DispatchSignals(ESignals) () from /opt/cern/root/lib/libCore.so -#7 0x00e7fb6d in SigHandler(ESignals) () from /opt/cern/root/lib/libCore.so -#8 0x00e754e2 in sighandler(int) () from /opt/cern/root/lib/libCore.so -#9 -#10 0x0159a49b in main_arena () from /lib/libc.so.6 -#11 0x0a5a04c0 in ?? () -#12 0x00be6bd3 in TCanvas::HandleInput(EEventType, int, int) () from /opt/cern/root/lib/libGpad.so -#13 0x0205dea3 in TRootCanvas::HandleContainerMotion(Event_t*) () from /opt/cern/root/lib/libGui.so -#14 0x020648ea in TRootContainer::HandleMotion(Event_t*) () from /opt/cern/root/lib/libGui.so -#15 0x01f9bd38 in TGFrame::HandleEvent(Event_t*) () from /opt/cern/root/lib/libGui.so -#16 0x01f69c0b in TGClient::HandleEvent(Event_t*) () from /opt/cern/root/lib/libGui.so -#17 0x01f6a934 in TGClient::ProcessOneEvent() () from /opt/cern/root/lib/libGui.so -#18 0x01f6a99d in TGClient::HandleInput() () from /opt/cern/root/lib/libGui.so -#19 0x01f6a9d0 in TGInputHandler::Notify() () from /opt/cern/root/lib/libGui.so -#20 0x00e7c6bd in TUnixSystem::DispatchOneEvent(bool) () from /opt/cern/root/lib/libCore.so -#21 0x00dfd271 in TSystem::InnerLoop() () from /opt/cern/root/lib/libCore.so -#22 0x00dff569 in TSystem::Run() () from /opt/cern/root/lib/libCore.so -#23 0x00da48f7 in TApplication::Run(bool) () from /opt/cern/root/lib/libCore.so -#24 0x08051d0f in main (argc=1, argv=0xbff04da4) at eventHandlerTest.cpp:52 -=========================================================== - - -The lines below might hint at the cause of the crash. -If they do not help you then please submit a bug report at -http://root.cern.ch/bugs. Please post the ENTIRE stack trace -from above as an attachment in addition to anything else -that might help us fixing this issue. -=========================================================== -#10 0x0159a49b in main_arena () from /lib/libc.so.6 -#11 0x0a5a04c0 in ?? () -#12 0x00be6bd3 in TCanvas::HandleInput(EEventType, int, int) () from /opt/cern/root/lib/libGpad.so -#13 0x0205dea3 in TRootCanvas::HandleContainerMotion(Event_t*) () from /opt/cern/root/lib/libGui.so -#14 0x020648ea in TRootContainer::HandleMotion(Event_t*) () from /opt/cern/root/lib/libGui.so -#15 0x01f9bd38 in TGFrame::HandleEvent(Event_t*) () from /opt/cern/root/lib/libGui.so -#16 0x01f69c0b in TGClient::HandleEvent(Event_t*) () from /opt/cern/root/lib/libGui.so -#17 0x01f6a934 in TGClient::ProcessOneEvent() () from /opt/cern/root/lib/libGui.so -#18 0x01f6a99d in TGClient::HandleInput() () from /opt/cern/root/lib/libGui.so -#19 0x01f6a9d0 in TGInputHandler::Notify() () from /opt/cern/root/lib/libGui.so -#20 0x00e7c6bd in TUnixSystem::DispatchOneEvent(bool) () from /opt/cern/root/lib/libCore.so -#21 0x00dfd271 in TSystem::InnerLoop() () from /opt/cern/root/lib/libCore.so -#22 0x00dff569 in TSystem::Run() () from /opt/cern/root/lib/libCore.so -#23 0x00da48f7 in TApplication::Run(bool) () from /opt/cern/root/lib/libCore.so -#24 0x08051d0f in main (argc=1, argv=0xbff04da4) at eventHandlerTest.cpp:52 -=========================================================== diff --git a/src/tests/eventHandler/eventHandlerTest-crash-MacOSX10.6.4.log b/src/tests/eventHandler/eventHandlerTest-crash-MacOSX10.6.4.log deleted file mode 100644 index d3cea0af..00000000 --- a/src/tests/eventHandler/eventHandlerTest-crash-MacOSX10.6.4.log +++ /dev/null @@ -1,68 +0,0 @@ -INFO: -System: MacOS X 10.6.4 -Compiler: gcc/g++ 4.2.1 (build 5664) -ROOT: 5.27/06 (trunk@35856) - -========================================================== - - *** Break *** segmentation violation - - - -=========================================================== -There was a crash. -This is the entire stack trace of all threads: -=========================================================== - -Thread 2 (process 218): -#0 0x00007fff8407208a in kevent () -#1 0x00007fff84073f5d in _dispatch_mgr_invoke () -#2 0x00007fff84073c34 in _dispatch_queue_invoke () -#3 0x00007fff8407375e in _dispatch_worker_thread2 () -#4 0x00007fff84073088 in _pthread_wqthread () -#5 0x00007fff84072f25 in start_wqthread () - -Thread 1 (process 218): -#0 0x00007fff840d6c90 in wait4 () -#1 0x00007fff840eb23e in system () -#2 0x0000000100128ab5 in TUnixSystem::StackTrace () -#3 0x0000000100126431 in TUnixSystem::DispatchSignals () -#4 -#5 0x0000000101a576c6 in TCanvas::EnterLeave () -#6 0x0000000101a5b1a2 in TCanvas::HandleInput () -#7 0x00000001024e955b in TRootCanvas::HandleContainerMotion () -#8 0x00000001024ef6e0 in TRootContainer::HandleMotion () -#9 0x0000000102443390 in TGFrame::HandleEvent () -#10 0x0000000102413570 in TGClient::HandleEvent () -#11 0x0000000102413e6b in TGClient::ProcessOneEvent () -#12 0x0000000102413ede in TGClient::HandleInput () -#13 0x0000000102413efd in TGInputHandler::Notify () -#14 0x000000010012655c in TUnixSystem::DispatchOneEvent () -#15 0x00000001000bef6d in TSystem::InnerLoop () -#16 0x00000001000c1213 in TSystem::Run () -#17 0x0000000100080867 in TApplication::Run () -#18 0x0000000100001aaf in main () -=========================================================== - - -The lines below might hint at the cause of the crash. -If they do not help you then please submit a bug report at -http://root.cern.ch/bugs. Please post the ENTIRE stack trace -from above as an attachment in addition to anything else -that might help us fixing this issue. -=========================================================== -#5 0x0000000101a576c6 in TCanvas::EnterLeave () -#6 0x0000000101a5b1a2 in TCanvas::HandleInput () -#7 0x00000001024e955b in TRootCanvas::HandleContainerMotion () -#8 0x00000001024ef6e0 in TRootContainer::HandleMotion () -#9 0x0000000102443390 in TGFrame::HandleEvent () -#10 0x0000000102413570 in TGClient::HandleEvent () -#11 0x0000000102413e6b in TGClient::ProcessOneEvent () -#12 0x0000000102413ede in TGClient::HandleInput () -#13 0x0000000102413efd in TGInputHandler::Notify () -#14 0x000000010012655c in TUnixSystem::DispatchOneEvent () -#15 0x00000001000bef6d in TSystem::InnerLoop () -#16 0x00000001000c1213 in TSystem::Run () -#17 0x0000000100080867 in TApplication::Run () -#18 0x0000000100001aaf in main () -=========================================================== diff --git a/src/tests/eventHandler/eventHandlerTest-crash.log b/src/tests/eventHandler/eventHandlerTest-crash.log deleted file mode 100644 index ab4a91fb..00000000 --- a/src/tests/eventHandler/eventHandlerTest-crash.log +++ /dev/null @@ -1,76 +0,0 @@ -INFO -System: Scientific Linux 5.1 -Compiler: gcc/g++ (GCC) 4.1.2 20080704 -ROOT: ROOT 5.27/07 trunk@36261 - -=========================================================== - - - *** Break *** segmentation violation - - - -=========================================================== -There was a crash (#7 0x00d6569d in SigHandler () from /apps/cern/root/lib/libCore.so). -This is the entire stack trace of all threads: -=========================================================== -#0 0x004b4410 in __kernel_vsyscall () -#1 0x03f8c353 in __waitpid_nocancel () from /lib/libc.so.6 -#2 0x03f33bbf in do_system () from /lib/libc.so.6 -#3 0x062031ad in system () from /lib/libpthread.so.0 -#4 0x00d60e1d in TUnixSystem::Exec () from /apps/cern/root/lib/libCore.so -#5 0x00d6805d in TUnixSystem::StackTrace () - from /apps/cern/root/lib/libCore.so -#6 0x00d655ce in TUnixSystem::DispatchSignals () - from /apps/cern/root/lib/libCore.so -#7 0x00d6569d in SigHandler () from /apps/cern/root/lib/libCore.so -#8 0x00d5e6c4 in sighandler () from /apps/cern/root/lib/libCore.so -#9 -#10 0x08914070 in ?? () -#11 0x003ed6fb in TCanvas::EnterLeave () from /apps/cern/root/lib/libGpad.so -#12 0x003f1ed7 in TCanvas::HandleInput () from /apps/cern/root/lib/libGpad.so -#13 0x01522c04 in TRootCanvas::HandleContainerMotion () - from /apps/cern/root/lib/libGui.so -#14 0x0152a0aa in TRootContainer::HandleMotion () - from /apps/cern/root/lib/libGui.so -#15 0x014525be in TGFrame::HandleEvent () from /apps/cern/root/lib/libGui.so -#16 0x0141633d in TGClient::HandleEvent () from /apps/cern/root/lib/libGui.so -#17 0x0141668e in TGClient::ProcessOneEvent () - from /apps/cern/root/lib/libGui.so -#18 0x014166fd in TGClient::HandleInput () from /apps/cern/root/lib/libGui.so -#19 0x01416730 in TGInputHandler::Notify () from /apps/cern/root/lib/libGui.so -#20 0x00d64edd in TUnixSystem::DispatchOneEvent () - from /apps/cern/root/lib/libCore.so -#21 0x00cd56b1 in TSystem::InnerLoop () from /apps/cern/root/lib/libCore.so -#22 0x00cd9381 in TSystem::Run () from /apps/cern/root/lib/libCore.so -#23 0x00c73308 in TApplication::Run () from /apps/cern/root/lib/libCore.so -#24 0x08051de9 in main (argc=0, argv=0x1c35) at eventHandlerTest.cpp:52 -=========================================================== - - -The lines below might hint at the cause of the crash. -If they do not help you then please submit a bug report at -http://root.cern.ch/bugs. Please post the ENTIRE stack trace -from above as an attachment in addition to anything else -that might help us fixing this issue. -=========================================================== -#10 0x08914070 in ?? () -#11 0x003ed6fb in TCanvas::EnterLeave () from /apps/cern/root/lib/libGpad.so -#12 0x003f1ed7 in TCanvas::HandleInput () from /apps/cern/root/lib/libGpad.so -#13 0x01522c04 in TRootCanvas::HandleContainerMotion () - from /apps/cern/root/lib/libGui.so -#14 0x0152a0aa in TRootContainer::HandleMotion () - from /apps/cern/root/lib/libGui.so -#15 0x014525be in TGFrame::HandleEvent () from /apps/cern/root/lib/libGui.so -#16 0x0141633d in TGClient::HandleEvent () from /apps/cern/root/lib/libGui.so -#17 0x0141668e in TGClient::ProcessOneEvent () - from /apps/cern/root/lib/libGui.so -#18 0x014166fd in TGClient::HandleInput () from /apps/cern/root/lib/libGui.so -#19 0x01416730 in TGInputHandler::Notify () from /apps/cern/root/lib/libGui.so -#20 0x00d64edd in TUnixSystem::DispatchOneEvent () - from /apps/cern/root/lib/libCore.so -#21 0x00cd56b1 in TSystem::InnerLoop () from /apps/cern/root/lib/libCore.so -#22 0x00cd9381 in TSystem::Run () from /apps/cern/root/lib/libCore.so -#23 0x00c73308 in TApplication::Run () from /apps/cern/root/lib/libCore.so -#24 0x08051de9 in main (argc=0, argv=0x1c35) at eventHandlerTest.cpp:52 -=========================================================== diff --git a/src/tests/eventHandler/eventHandlerTest-valgrind.log b/src/tests/eventHandler/eventHandlerTest-valgrind.log deleted file mode 100644 index f5c0efe1..00000000 --- a/src/tests/eventHandler/eventHandlerTest-valgrind.log +++ /dev/null @@ -1,75 +0,0 @@ -==30642== Memcheck, a memory error detector. -==30642== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. -==30642== Using LibVEX rev 1658, a library for dynamic binary translation. -==30642== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. -==30642== Using valgrind-3.2.1, a dynamic binary instrumentation framework. -==30642== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. -==30642== For more details, rerun with: -v -==30642== -==30642== My PID = 30642, parent PID = 19037. Prog and args are: -==30642== ./eventHandlerTest -==30642== -==30642== Syscall param writev(vector[...]) points to uninitialised byte(s) -==30642== at 0xC188B8: writev (in /lib/libc-2.5.so) -==30642== by 0xD30A2D: (within /usr/lib/libX11.so.6.2.0) -==30642== by 0xD3081E: _X11TransWritev (in /usr/lib/libX11.so.6.2.0) -==30642== by 0xD36508: _XSend (in /usr/lib/libX11.so.6.2.0) -==30642== by 0xD2742A: XQueryExtension (in /usr/lib/libX11.so.6.2.0) -==30642== by 0xD1BD4A: XInitExtension (in /usr/lib/libX11.so.6.2.0) -==30642== by 0x238C3F: XFixesFindDisplay (in /usr/lib/libXfixes.so.3.1.0) -==30642== by 0x23769E: XFixesSetCursorName (in /usr/lib/libXfixes.so.3.1.0) -==30642== by 0x22D8E6: XcursorImagesLoadCursor (in /usr/lib/libXcursor.so.1.0.2) -==30642== by 0x230F79: XcursorTryShapeCursor (in /usr/lib/libXcursor.so.1.0.2) -==30642== by 0xD0FCE1: XCreateGlyphCursor (in /usr/lib/libX11.so.6.2.0) -==30642== by 0xD1016C: XCreateFontCursor (in /usr/lib/libX11.so.6.2.0) -==30642== Address 0x7674690 is 256 bytes inside a block of size 16,384 alloc'd -==30642== at 0x40046FF: calloc (vg_replace_malloc.c:279) -==30642== by 0xD214A6: XOpenDisplay (in /usr/lib/libX11.so.6.2.0) -==30642== by 0x76A52DD: TGX11::OpenDisplay(char const*) (in /apps/cern/root-5.27.04/lib/libGX11.so) -==30642== by 0x608CED8: TGClient::TGClient(char const*) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x6186B83: TRootApplication::TRootApplication(char const*, int*, char**) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x61A9094: TRootGuiFactory::CreateApplicationImp(char const*, int*, char**) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x4151C8E: TApplication::InitializeGraphics() (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x4154065: TApplication::TApplication(char const*, int*, char**, void*, int) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x8051D74: main (eventHandlerTest.cpp:41) -==30642== -==30642== Invalid read of size 4 -==30642== at 0x57356DD: TCanvas::EnterLeave(TPad*, TObject*) (in /apps/cern/root-5.27.04/lib/libGpad.so) -==30642== by 0x5739ED6: TCanvas::HandleInput(EEventType, int, int) (in /apps/cern/root-5.27.04/lib/libGpad.so) -==30642== by 0x6199C03: TRootCanvas::HandleContainerMotion(Event_t*) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x61A10A9: TRootContainer::HandleMotion(Event_t*) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x60C95BD: TGFrame::HandleEvent(Event_t*) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x608D33C: TGClient::HandleEvent(Event_t*) (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x608D68D: TGClient::ProcessOneEvent() (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x608D6FC: TGClient::HandleInput() (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x608D72F: TGInputHandler::Notify() (in /apps/cern/root-5.27.04/lib/libGui.so) -==30642== by 0x4242EDC: TUnixSystem::DispatchOneEvent(bool) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x41B36B0: TSystem::InnerLoop() (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x41B7380: TSystem::Run() (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== Address 0x6EF0BF0 is 0 bytes inside a block of size 100 free'd -==30642== at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244) -==30642== by 0x41A38C3: TStorage::ObjectDealloc(void*) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x4182296: TObject::operator delete(void*) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x516E46A: TGraph::~TGraph() (in /apps/cern/root-5.27.04/lib/libHist.so) -==30642== by 0x41E8279: TCollection::GarbageCollect(TObject*) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x41EF1A6: TList::Delete(char const*) (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== by 0x51E7D67: TMultiGraph::~TMultiGraph() (in /apps/cern/root-5.27.04/lib/libHist.so) -==30642== by 0x805249C: PEventHandlerTest::SwitchGraph() (PEventHandlerTest.cpp:129) -==30642== by 0x8052267: PEventHandlerTest::HandleCmdKey(int, int, int, TObject*) (PEventHandlerTest.cpp:108) -==30642== by 0x8056979: G__PEventHandlerTestDict_274_0_3(G__value*, char const*, G__param*, int) (PEventHandlerTestDict.cpp:286) -==30642== by 0x4833B9E: Cint::G__CallFunc::Execute(void*) (in /apps/cern/root-5.27.04/lib/libCint.so) -==30642== by 0x41FDD0A: TCint::CallFunc_Exec(void*, void*) const (in /apps/cern/root-5.27.04/lib/libCore.so) -==30642== -==30642== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 87 from 2) -==30642== malloc/free: in use at exit: 3,484,199 bytes in 72,209 blocks. -==30642== malloc/free: 204,308 allocs, 132,099 frees, 15,526,505 bytes allocated. -==30642== For counts of detected errors, rerun with: -v -==30642== searching for pointers to 72,209 not-freed blocks. -==30642== checked 8,510,996 bytes. -==30642== -==30642== LEAK SUMMARY: -==30642== definitely lost: 2,426 bytes in 41 blocks. -==30642== possibly lost: 164,286 bytes in 3,612 blocks. -==30642== still reachable: 3,317,487 bytes in 68,556 blocks. -==30642== suppressed: 0 bytes in 0 blocks. -==30642== Use --leak-check=full to see details of leaked memory. diff --git a/src/tests/eventHandler/eventHandlerTest.cpp b/src/tests/eventHandler/eventHandlerTest.cpp index 657c8328..fb3bbf87 100644 --- a/src/tests/eventHandler/eventHandlerTest.cpp +++ b/src/tests/eventHandler/eventHandlerTest.cpp @@ -30,7 +30,6 @@ ***************************************************************************/ #include -using namespace std; #include "TApplication.h" @@ -42,7 +41,7 @@ int main(int argc, char *argv[]) PEventHandlerTest *eht = new PEventHandlerTest(); if (eht == 0) { - cerr << endl << "**ERROR** couldn't invoke eht ..." << endl; + std::cerr << std::endl << "**ERROR** couldn't invoke eht ..." << std::endl; return 0; }