| Summary: | SegFault for nOfCollision in realWorldLogVol | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | weller <goodluck> |
| Component: | digits_hits/utils | Assignee: | asai |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P4 | ||
| Version: | 11.0 | ||
| Hardware: | All | ||
| OS: | All | ||
Thank you for reporting this bug. The fix will be included in the coming patch release Geant4 version 11.0.p01. Kind regards, Makoto Asai |
nOfCollision scorer attached to a realWorldLogVol deterministically yields SegFault: Thread 2 "XYZ" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff4741700 (LWP 396225)] 0x00007ffff5819297 in G4TouchableHistory::GetReplicaNumber(int) const () from /.../lib/libG4digits_hits.so Analogy to the other scorers suggests the following trivial fix: diff --git a/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc b/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc index 732acf248..659904c82 100644 --- a/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc +++ b/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc @@ -634,7 +634,7 @@ void G4ScoreQuantityMessenger::SetNewValue(G4UIcommand* command, G4PSNofCollision* ps = nullptr; if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe) { - ps = new G4PSNofCollision3D(token[0], mesh->GetCopyNumberLevel()); + ps = new G4PSNofCollision(token[0], mesh->GetCopyNumberLevel()); } else {