| Summary: | G4 crash in G4ExcitationHandler.cc | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | porosev |
| Component: | processes/hadronic/models/de_excitation | Assignee: | alexander.howard |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | critical | CC: | alexander.howard |
| Priority: | P5 | ||
| Version: | 8.2 | ||
| Hardware: | All | ||
| OS: | All | ||
*** This problem has been marked as a duplicate of problem 947 *** Hi, This is a duplicate bug as #947, however, could you indicate which platform and compiler you are running with? Thanks, Alex |
Hello all! I have found strange place in G4ExcitationHandler.cc Ln.224 (function G4ExcitationHandler::BreakItUp(const G4Fragment &theInitialState) const) .. for (j = theResultList.begin(); j != theResultList.end(); j++) { if ((*j)->GetA() > 1 && (*j)->GetExcitationEnergy() > 0.1*eV) { .... // Remove excited fragment from the result delete (*j); theResultList.erase(j--); <<<<BUG HAPPENS HERE!!!!!!!! .... } } Description: It happens when "theResultList" contains only ONE!!! element. The command delete(*j) delete this element and after that when you try decrement "j--" in the command "theResultList.erase(j--)", the GEANT4 crash in "--" _Myt_iter operator--(int) { // postdecrement _Myt_iter _Tmp = *this; --*this; return (_Tmp); } because nothing to iterate!!!!!! Sincerely Yours, Viacheslav Porosev