Gerry Kan |
July 31, 2020 10:12 |
Seg Fault using DynamicList
Howdy Foamers:
I have a very simple OF application using OF 7.
Code:
#include "fvCFD.H"
#include "uniformDimensionedFields.H"
#include "turbulentFluidThermoModel.H"
#include "rhoReactionThermo.H"
#include "ReactionModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
DynamicList<Foam::word> wordDynList(0);
int main ( int argc, char *argv[] ) {
wordDynList.append ( "one" );
wordDynList.append ( "two" );
Info << wordDynList << endl;
}
The code compiled but at the end of execution it gave me a seg fault:
Code:
2
(
one
two
)
Segmentation fault
Looking at test suite (Test-DynamicList.C) I could not do anything obvious that would cause the code to crash, nor did I see any any dynamic list being explicitly deallocated (not that it solved the problem). What else did I miss?
Thanks in advance, Gerry.
|