Bug #1064

Geant4 Visualisation Core Dumps

Added by Lane, Peter almost 12 years ago. Updated almost 12 years ago.

Target version:
Start date:
25 July 2012
Due date:
% Done:


Estimated time:
Awaiting Merge


When I add the option "-geant4_visualisation True" to in the trunk I get the following error:

  • G4Exception : KeyExists
    issued by : G4VisListManager<T>::Register(T* ptr)
    Key Unspecified already registered
  • Fatal Error In Argument * core dump *
  • G4Exception: Aborting execution ***
    Aborted (core dumped)


MAUSVisManager.patch (1.69 KB) MAUSVisManager.patch Lane, Peter, 01 August 2012 17:50

Updated by Rogers, Chris almost 12 years ago

  • Category set to Simulation
  • Assignee set to Littlefield, Matthew
  • Target version set to Future MAUS release

Updated by Littlefield, Matthew almost 12 years ago

I never got the bottom of this bug as it is a pointer to an unspecified object in Geant4. Perhaps we should go to G4 with this one?


Updated by Lane, Peter almost 12 years ago

GDB back trace:

(gdb) bt
#0 0x0000003fe7e328a5 in raise () from /lib64/
#1 0x0000003fe7e34085 in abort () from /lib64/
#2 0x00007fffe6040c98 in G4Exception(char const*, char const*, G4ExceptionSeverity, char const*) ()
from /home/lane/Development/maus/maus/third_party/build/geant4.9.2.p04/lib/Linux-g++/
#3 0x00007fffdb0327b9 in G4VisListManager<G4VTrajectoryModel>::Register(G4VTrajectoryModel*) ()
from /home/lane/Development/maus/maus/third_party/build/geant4.9.2.p04/lib/Linux-g++/
#4 0x00007fffda2fb579 in MAUS::MAUSVisManager::SetupRun() ()
from /home/lane/Development/maus/maus/build/
#5 0x00007fffd6283c88 in MAUS::MapCppSimulation::process(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
from /home/lane/Development/maus/maus/build/
#6 0x00007fffd6288a77 in _wrap_MapCppSimulation_process ()
from /home/lane/Development/maus/maus/build/
#7 0x00007ffff7d07864 in ext_do_call (f=<value optimized out>,
throwflag=<value optimized out>) at Python/ceval.c:4323


Updated by Lane, Peter almost 12 years ago

The problem is that a new G4TrajectoryDrawByParticleID instance with the same default name ("Unspecified") is being registered every time MAUSVisManager::SetupRun() is called. I've come up with a fix that provides a descriptive name and then checks to see if a model with that name is the current model before trying to create a new instance and register it. It would be more appropriate to unregister the model in TearDownRun(), but there doesn't seem to be a way to do that.

Attached is the diff of so that someone with commit writes can patch it in the trunk.


Updated by Rogers, Chris almost 12 years ago

  • Workflow changed from New Issue to Awaiting Merge

You now have write privileges to the trunk... want to try to do the merge?


Updated by Lane, Peter almost 12 years ago

  • Assignee changed from Littlefield, Matthew to Lane, Peter

That's fine. I'll do the merge.


Updated by Lane, Peter almost 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Fix committed to lp:maus/merge.


Updated by Rogers, Chris almost 12 years ago

  • Target version changed from Future MAUS release to MAUS-v0.3.2

Also available in: Atom PDF