The fpstep of G4Track is 0 when PreUserTrackingAction is called causing crashes in G4Track::GetMaterialCutsCouple() G4Track::GetNextMaterialCutsCouple() G4Track::GetMaterial() G4Track::GetNextMaterial() The information seems available through the touchable though.
These methods of G4Track are provided to get information of the material through PostStepPoint (see G4Track.icc#L152). The method of PreUserTrackingAction of G4UserTrackingAction is invoked just before the first stepping of the track (see G4TrackingManager.cc#L93). So, the PostStepPoint has no information yet. In short, it is not a bug but the limitation of tracking algorithm in Geant4. As for the touchable, situation is different between primary tracks and secondary tracks. The touchable of a primary track is set in during the first step; i.e. you can’t access the touchable in PreUserTrackingAction. In most cases, the touchable of a secondary track is set by the process which creates the secondary track; you may access the touchable in PreUserTrackingAction.
Those are good reasons for the limitations, however the current code segfaults when used, as there is no check for fpStep being null, while the check is done for fpTouchable avoiding a crash. May be one should add such checks for fpStep before using it to access PostStepPoint.