Application has invalid write with G4RunManager

Hello Geant4 Forum, I hope you’re doing well!

I’m working with a Geant4 application where Geant4 was installed using conda (v10.6.2). The application seemed to build successfully with make, but when I try to run the application, nothing happens. I used valgrind and got the following output (full output in the attached file):

==22391== Memcheck, a memory error detector
==22391== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==22391== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==22391== Command: ./CENNS -m run_marley.mac
SEED: 1602889905
==22391== Invalid write of size 8
==22391==    at 0x58C21EE: G4RunManager::G4RunManager() (in /home/erinecon/software/anaconda3/envs/my_root_env/lib/
==22391==    by 0x12C31C: main (in /home/erinecon/cenns10geant4-high_energy/CENNS)
==22391==  Address 0x1421c3b0 is 32 bytes before an unallocated block of size 961,552 in arena "client"

I verified that I can compile and run example B1 using the conda Geant4, and I call the RunManager in the same way as B1.

Does anyone know what’s causing the issue? Thanks in advance for any suggestions.valgrind_output.txt (28.9 KB) (2.1 KB)

The only thing I can spot is the use of _GLIBCXX_USE_CXX11_ABI. Is this also present in your build of exampleB1. I’m not aware of it being needed.

1 Like

Hi, I commented out that line and the application now runs. Thanks so much for your help!

1 Like