G4IStore::GetImportance() crashes with null G4VPhysicalVolume

Dear experts,
although using geometric biasing frequently, I just had the issue described in 2017 here:
https://bugzilla-geant4.kek.jp/show_bug.cgi?id=1991

Is there an easy fix for this? In one of my simulations, the crash is very reproducible, although I use almost the same code for various geometries…
Since the bug is open since 2017, it does appear to be a really rare phenomenon?

edit: my mistake was placing the source outside of the world volume. increasing the size of the volume makes the crash disappear.

That makes sense, I think. Since the source is only identified by a position in global coordinates, the biasing code must have to use a G4Navigator instance to map that to the correct physical volume. If the coordinates are outside the World, it seems reasonable for the Navigator to return a null pointer (“there is no volume!”). The client code (here, importance biasing) should test for the possible null pointer, and generate a proper G4Exception rather than a segfault.

I’m not sure this is fixable on the user side, except for not making the mistake of putting your source out in the multiverse :-). It should probably be added to Bugzilla #1991 so that it can be fixed on the developer side.