Problem 829 - Missing SetMotherLogical in G4PVDivision constructor
Summary: Missing SetMotherLogical in G4PVDivision constructor
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry (show other problems)
Version: other
Hardware: PC Other
: P2 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2006-01-09 07:29 CET by Paulo Mora de Freitas
Modified: 2006-01-10 06:11 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Paulo Mora de Freitas 2006-01-09 07:29:33 CET
A "SetMotherLogical(pMotherLogical)" call is missing in the G4PVDivision
constructor. It should not be a big bug except that now, with the Geant4 8.0
release, it can let to a crash. In our application I verify that, as the
flmother G4VPhysicalVolume's attribute is not set, the
G4RegionStore::SetWorldVolume() takes it as another world volume. It  lets to
bad initialized physics tables and a crash when running
G4VEmProcess::FindLambdaMax(). In this method, the call in the line 486,

 size_t n = theLambdaTable->length();

 will returns zero and the following line,

 G4PhysicsVector* pv = (*theLambdaTable)[0];

lets to the crash (there is any test against n==0).

 I just patched the G4PVDivision constructor and now the
G4VEmProcess::FindLambdaMax() doesn't crash anymore in our application. For
information, we don't use for the moment any G4Region functionality.

 Anyway, to create a G4PVDivision should not let to a new world volume...
Comment 1 Paulo Mora de Freitas 2006-01-09 07:32:59 CET
I placed at
http://polywww.in2p3.fr/~mora/Geant4/ProblemReport829/
a copy of our patched G4PVDivision.cc which fix the bug.
Comment 2 Paulo Mora de Freitas 2006-01-09 07:32:59 CET
I placed at
http://polywww.in2p3.fr/~mora/Geant4/ProblemReport829/
a copy of our patched G4PVDivision.cc which fix the bug.
Comment 3 Gabriele Cosmo 2006-01-10 06:11:59 CET
The problem is now fixed for all G4PVDivision kinds. Thanks for reporting this.
The fix is included in tag "geomdiv-V08-00-00" and will be considered for a
future patch to release 8.0.