| Summary: | G4strstreambuf: bug in destructor | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Andre <andre.philippe.sailer> |
| Component: | processes/hadronic/models/de_excitation | Assignee: | Vladimir.Ivantchenko |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 10.7 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Andre
2021-03-26 10:34:08 CET
Andre, I have replaced at the end of printout "\n" by G4endl. In my test there is no difference - the line break is the same. Can you, confirm, that this fix is working for you? Vladimir Hi Vladimir, The main difference between `G4endl`(or std::endl); and `"\n"` is that the first one also causes a call to `flush()` (or equivalent), right? The change in https://github.com/AIDASoft/DD4hep/pull/799/files ``` try { return Geant4Exec::run(*this); auto result = Geant4Exec::run(*this); // flush the geant4 stream buffer G4cout << G4endl; return result; } ``` really fixes the "random" printout (also caused by that missing '\0', I believe). Having the G4endl at the end of G4DeexPrecoParameters::StreamInfo should also make this output appear at the actual time it is called and not at the end of our execution. Cheers, Andre Hello, Many thanks for this report. The problem is fixed and will be available in next public version of Geant4 and in the next patch to 10.7 Vladimir |