Particle suddenly gains very high energy when I include a custom EM physics process

Hello,
I have created a new physics process of EM type that, when called, will run an event generator and the outcome of this is put back into the simulation. I created a custom FTFP_BERT list which in turn calls a custom EMStandardPhysics that I have added this process to. Sometimes after this process has occurred, a particle will suddenly go to very high energy after a number of additional steps. This does not happen every time and it does not even happen every time for a specific event. For example, I have run the exact same configuration and random seeds, the first time the error occurred, the second time it did not. I have several printouts to get particle information during the process and they are identical except further along in the event there is an error for one of them. I have attached an example output of the simulation with verbose tracking for one of these particles. You can see that on step 34, the proton suddenly goes to enormous energy. I am curious if anyone has seen something similar to this in the past. The fact that it is not always reproducible makes me suspect some memory issues, but I have not found anything obvious so far. Any suggestions would be greatly appreciated.

crash.txt (22.1 KB)

_Geant4 Version:11.2.2
_Operating System:Ubuntu_22.04
_CMake Version:3.22.1