FAQ/Troubleshooting

From OpenFOAMWiki
< FAQ
Revision as of 20:56, 21 September 2013 by Wyldckat (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


1 FAQ Section 8: Troubleshooting

Figuring out what went wrong


1.1 An application ends with a segmentation fault. What is wrong?

A segmentation fault usually occurs when a program trys to access memory outside its bounds (see Segmentation Fault on Wikipedia). In OpenFOAM this usually occurs when a List<> or similar is accessed with an index outside of the allocated domain. To find out where this occurs make a separate copy of the OF-sources, recompile them with the swich WM_COMPILE_OPTION set to Debug (just uncomment the right lines in the bashrc/cshrc files). This makes OF run slower, but accesses to List<> etc are checked for ranges and the program aborts if you access outside of a range (plus you get a stack trace). This won't solve your problem, but it will help you find out where it occurs.

See also General debugging tips. For recompiling OpenFOAM look at Howto_compile_OpenFOAM

1.2 My program stops with an output that starts with #0 Foam::error::printStack(Foam::Ostream&)

You encountered a program error. Upon hitting that error OpenFOAM produced a stack trace (a list of the functions that were called) which is very useful to find the location at which the problem occured. It is possible to get that stack-trace with the source files and the line numbers of the functions which might help to find out what the problem is. To do so you have to compile a debug version of OpenFOAM. (see also the segmentation fault-question above)

Facts about "FAQ/Troubleshooting"RDF feed
FaqdescriptionFiguring out what went wrong +
FaqnameTroubleshooting +
Faqnumber8 +