|
[Sponsors] | |||||
Error%7eerror triggers crash after handling exceptions thrown by errorexit twice |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 21 ![]() |
Description:
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_. Solver/Application: All that sets FatalError.throwExceptions() and FatalIOError.throwExceptions(). Source file: src/OpenFOAM/db/error/error.C Testcase: I'm not sure if you get the description above... I'll be posting a testcase if that is the case. Platform: linux64 Version: 1.4 Notes: |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
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
|
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Energy handling with STAR | Veera | Siemens | 1 | June 20, 2004 12:06 |
| Very large martix handling | Vinay Kumar | Main CFD Forum | 5 | December 9, 2002 11:07 |
| handling conduction in CFX | Trushar | CFX | 1 | October 7, 2002 18:39 |
| macros handling vectors | sivakumar | FLUENT | 0 | January 18, 2002 17:16 |
| regarding low pressure handling | subodh kumar | Main CFD Forum | 1 | November 20, 1999 23:23 |