The biasing process G4ImportanceBiasing can end up calling G4IStore::GetImportance with a null physical volume; this causes a crash because one cannot add a null G4VPhysicalVolume to the store. G4ImportanceProcess::PostStepDoIt will call G4IStore::GetImportance with a G4GeometryCell constructed from the pre/post point volumes of a G4Step; and the G4SteppingManager uses a null volume to signify a point being on the world boundary. [The fix involving the least lines of code: default G4IStore::GetImportance to 1./world volume importance when the volume is null. Alternatively, test for a null volume in everything that might run after hitting the world boundary error messages, as they crash when trying to access properties of the null volume, for instance the G4IStore::GetImportance error message. Alternatively, constrain when the biasing is run to not happen on exiting the world volume.]
https://geant4-forum.web.cern.ch/t/g4istore-getimportance-crashes-with-null-g4vphysicalvolume/11132 Finds this problem manifested if a volume is placed outside of the world volume. Giving an anonymous segmentation fault is equally unhelpful, therefore a check should be introduced to throw a more controlled G4Exception instead. Will be added to the fix.
I couldn't reproduce a crash for this, however, I can see the hazard of accessing the pointer to the PostStep volume, therefore I have returned no change if the next volume is null. Will be included in release v11.2.