Bug #1064
Geant4 Visualisation Core Dumps
100%
Description
When I add the option "-geant4_visualisation True" to simulate_mice.py 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)
Files
Updated by Rogers, Chris over 11 years ago
- Category set to Simulation
- Assignee set to Littlefield, Matthew
- Target version set to Future MAUS release
Updated by Littlefield, Matthew over 11 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 over 11 years ago
GDB back trace:
(gdb) bt
#0 0x0000003fe7e328a5 in raise () from /lib64/libc.so.6
#1 0x0000003fe7e34085 in abort () from /lib64/libc.so.6
#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++/libG4globman.so
#3 0x00007fffdb0327b9 in G4VisListManager<G4VTrajectoryModel>::Register(G4VTrajectoryModel*) ()
from /home/lane/Development/maus/maus/third_party/build/geant4.9.2.p04/lib/Linux-g++/libG4vis_management.so
#4 0x00007fffda2fb579 in MAUS::MAUSVisManager::SetupRun() ()
from /home/lane/Development/maus/maus/build/libMausCpp.so
#5 0x00007fffd6283c88 in MAUS::MapCppSimulation::process(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
from /home/lane/Development/maus/maus/build/_MapCppSimulation.so
#6 0x00007fffd6288a77 in _wrap_MapCppSimulation_process ()
from /home/lane/Development/maus/maus/build/_MapCppSimulation.so
#7 0x00007ffff7d07864 in ext_do_call (f=<value optimized out>,
throwflag=<value optimized out>) at Python/ceval.c:4323
Updated by Lane, Peter over 11 years ago
- File MAUSVisManager.patch MAUSVisManager.patch added
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 MAUSVisManager.cc so that someone with commit writes can patch it in the trunk.
Updated by Rogers, Chris over 11 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 over 11 years ago
- Assignee changed from Littlefield, Matthew to Lane, Peter
That's fine. I'll do the merge.
Updated by Lane, Peter over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Fix committed to lp:maus/merge.
Updated by Rogers, Chris over 11 years ago
- Target version changed from Future MAUS release to MAUS-v0.3.2