Description: The delete messa
The delete messageStreamPtr_; line in error::~error() triggers crash after handling *this object thrown in error::exit() twice if throwExceptions_ is set to true. I think this is because throw *this; in error::exit() actually throws a temporary bitwise copy of *this (even if the object is caught by reference), and the destructor of the temporary object deletes *messageStreamPtr_ of the static object FatalError or FatalIOError (which must not be deleted except when the application terminates). Thus, the first exception handling deletes *messageStreamPtr_, while the second one triggers crash trying to delete the already deleted *messageStreamPtr_.
All that sets FatalError.throwExceptions() and FatalIOError.throwExceptions().
I'm not sure if you get the description above... I'll be posting a testcase if that is the case.
Thanks for the detailed bug re
Thanks for the detailed bug report. To fix this bug in OpenFOAM version 1.4.1 replace OpenFOAM-1.4.1/src/OpenFOAM/db/error/error.H with http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif error.H , OpenFOAM-1.4.1/src/OpenFOAM/db/error/error.C with http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif error.C and OpenFOAM-1.4.1/src/OpenFOAM/db/IOstreams/StringStreams/OStringStream.H with http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif OStringStream.H and recompile the OpenFOAM library.
Tried the fix with 1.4.1. It w
Tried the fix with 1.4.1. It works perfectly. Thanks!
|All times are GMT -4. The time now is 18:20.|