Problem 454

Summary: use of uninitialized variable in G4Step
Product: Geant4 Reporter: dennis.herbert.wright
Component: trackAssignee: kurasige
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: other   
Hardware: All   
OS: Linux   

Description dennis.herbert.wright 2003-02-11 13:28:02 CET
In G4Step.icc, in the last line of the method InitializeStep(G4Track* aValue),
the post-step point is initialized to the pre-step point.  In this line, the
variable fCharge in G4StepPoint is used uninitialized.  The problem can be fixed
by inserting the line

   fpPreStepPoint->SetCharge(fpTrack->GetDynamicParticle()->GetCharge());

in the G4Step::InitializeStep method.  It looks as if this line was somehow
omitted in all versions of Geant4, including 5.0.
Comment 1 kurasige 2003-03-04 21:44:59 CET
Fixed  in tag track-V05-00-02