|Line 24:||Line 24:|
Revision as of 16:16, 8 January 2010
Typical Errors are errors that occur frequently to novice users who develop their own Applications in KRATOS. This Article is intended to act as a kind of updated collection of errors that have a simple solution that is, however, hard to find. This list is oriented at the phenotype of an occurring error rather than at the origin of it. Therefore, the list is divided into the following groups of errors:
- Compiler Errors Error messages from the compiler that are not obviously understandable but have a rather trivial origin.
- Runtime Errors Errors that occur despite of a flawless compilation and result in Python runtime errors or Segmentation Faults.
- Behaviour Errors Errors that do not cause the program to fail but produce incorrect and/or strange results of the calculation.
Base class function called instead of derived one
Phenotype: The program terminates with an error like "Calling virtual / base class function for ... instead of derived class one".
Explanation: Some functions have to be defined in the derived classes (e.g. of ConstitutiveLaw or Element) to perform with the desired effect. If, for example, a certain value should be returned that cannot be sensibly retrieved from the base class, the developers might have put an error message in the base class, that is thrown if the (virtual) function in the base class should be accessed by accident. This may happen if there is no (or a wrong) implementation for this actual function in the used derived class.
Solution: Check carefully the implementation of the derived class for any missing implementation of virtual functions in its base class. Warnings on compile time may give a hint on where to look at.
Results depend on whether the Python script is recompiled
Phenotype: The (in this case usually erroneous) output or calculation behaviour (e.g. convergence) changes depending on whether the Python script of the calculation is newly written or re-used.
Explanation: Python code is compiled to byte code prior to its execution. However, this is done only if the Python source code has been changed, i.e. it has a younger time stamp than the respective byte code (.pyc).