Appendix D. Messages and Errors

Table of Contents

D.1. ML Error Codes

Error messages and other messages are usually sent to the ML ErrorOuput class, where they are sent to all registered handlers which need to handle them (see Section 5.4, “The Class ErrorOutput and Configuring Message Outputs”). Not only messages and errors from modules or from the ML are sent to those handlers but also messages from other libraries or applications. In MeVisLab, for example, MeVisLab itself and the Open Inventor™ library redirect their outputs to the ML ErrorOutput. Hence, there is a large variety of messages. The following list only describes the currently known predefined messages and errors.

D.1. ML Error Codes

The following list explains each predefined ML error code. Note that other error codes may appear which are registered by applications or modules for advanced error handling. Refer to the corresponding documentation in such cases.

  1. (MLErrorCode 0) ML_RESULT_OK - "Ok"

    No error. Everything seems to be okay.

  2. (MLErrorCode 1) ML_UNKNOWN_EXCEPTION - "Unknown exception occurred"

    An unknown exception has been detected and caught. This usually means that something - for an unknown reason - went absolutely wrong and which should normally result in a program crash which is detected by the ML or a module. Look for previous errors, they may give more precise information. Try to reproduce this error and report it to the developer.

  3. (MLErrorCode 2) ML_NO_MEMORY - "Memory allocation failed"

    The system does not have enough memory to perform the desired operation. Try to reduce application data and/or complexity, try to replace modules which load an entire image into the memory, terminate other applications running at the same time, buy more memory, etc.

  4. (MLErrorCode 3) ML_DISCONNECTED_GRAPH - "Operator graph disconnected"

    The module/operator graph is obviously disconnected but expected to be connected for this operation.

  5. (MLErrorCode 4) ML_CYCLIC_GRAPH - "Operator graph has cycle"

    The module/operator graph is connected cyclically. The ML cannot handle this. Search for the cyclic connections and remove them. Normally, this error should not occur.

  6. (MLErrorCode 5) ML_BAD_OPERATOR_POINTER - "Bad operator pointer"

    A NULL, an invalid or a wrong module/operator pointer has been passed to an algorithm.

  7. (MLErrorCode 6) ML_BAD_OPERATOR_OUTPUT_INDEX - "Bad index of output image"

    A bad output index of a module/operator has been specified.

  8. (MLErrorCode 7) ML_BAD_FIELD - "Bad field pointer or name"

    A NULL, an invalid or badly/wrongly typed or named field has been passed to an algorithm.

  9. (MLErrorCode 8) ML_IMAGE_DATA_CALCULATION_FAILED - "Calculation of image data failed"

    The requested image data could not be calculated. There is a variety of possible reasons. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  10. (MLErrorCode 9) ML_NO_IMAGE_INPUT_EXTENSION - "Calculation of required image input extension failed"

    Currently not used.

  11. (MLErrorCode 10) ML_NO_IMAGE_PROPS - "Calculation of image properties failed"

    The calculation of image properties failed. There is a variety of possible reasons. Normally, this is a return code of functions accessing modules which cannot calculate a valid output image (this is often a legal state). If this is reported as an error or even a fatal error, look for previous errors, they may give more precise information. Report it to the developer if it seems to be a technical problem and not the report of a normal output state of a module.

  12. (MLErrorCode 11) ML_BAD_OPERATOR_INPUT_INDEX - "Index to operator input is invalid"

    A bad input index of a module/operator has been specified.

  13. (MLErrorCode 12) ML_BAD_INPUT_IMAGE_POINTER - "Pointer to input image is invalid"

    A NULL, an invalid or badly/wrong sized/typed image pointer has been passed to an algorithm. If no previous errors occurred, it might indicate a programming error or missing checks for invalid input connections, bad in/output indices, etc.

  14. (MLErrorCode 13) ML_BAD_DATA_TYPE - "Bad data type"

    A wrong or unexpected data type has been passed to an algorithm. This is often a programming error. There is a variety of possible reasons. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  15. (MLErrorCode 14) ML_PROGRAMMING_ERROR - "Programming error"

    A situation occurred which should not appear. There is a variety of possible reasons; typically, it is a programming error in a module. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  16. (MLErrorCode 15) ML_EMPTY_MESSAGE - "<No Error Message>"

    The following error message describes more precisely what has happened. If not, a non-registered error occurred which is only known in the module where the error appeared. Have a look at the documentation of the module that produced the error. This code might also be passed with messages which are of another type, e.g. with debug information or user information.

  17. (MLErrorCode 16) ML_PAGE_CALCULATION_ERROR_IN_MODULE - "Page calculation error in module"

    An image page could not be calculated. There is a variety of possible reasons. Often, this is a programming error in a module, but it can also be a result of an interrupted image processing in a module pipeline. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer if the error is not the result of a controlled interruption.

  18. (MLErrorCode 17) ML_PROPERTY_CALCULATION_ERROR_IN_MODULE - "Property calculation error in module"

    Image properties could not be calculated correctly. There is a variety of possible reasons. Often, this is a programming error within a module. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  19. (MLErrorCode 18) ML_INBOX_CALCULATION_ERROR_IN_MODULE - "Inbox calculation error in module"

    The input image region required the calculation of an image page which, however, could not be calculated correctly. This is often a programming error within a module leading to a crash and MLErrorCodes which was detected by the ML. There is a variety of possible reasons. Look for previous errors, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  20. (MLErrorCode 19) ML_BAD_PARAMETER - "Bad parameter"

    A bad/invalid parameter (or even an inappropriate image) has been passed to a module or an algorithm. This usually means that an invalid or inappropriate parameter has been passed to an algorithm, that the developer has forgotten to implement a certain case or that a parameter is out of range. Read the subsequent error information on how to handle this error.

  21. (MLErrorCode 20) ML_CALCULATION_ERROR - "Calculation error"

    This is an error code used in some cases when the error is not very specific. There is a variety of possible reasons. Often, a programming error in a module caused a crash which was detected and handled by the ML. Some diagnostic modules also use this error code, e.g., to notify of an error about invalid calculation results, for example. Look for previous errors and additional error information shown with this error, they may give more precise information. Try to reproduce this error and its circumstances and report them to the developer.

  22. (MLErrorCode 21) ML_BAD_DIMENSION - "Bad image dimension"

    The image or data structure has a wrong extent or wrong dimensions.

  23. (MLErrorCode 22) ML_RECURSION_ERROR - "Invalid recursion"

    An invalid recursion occurred. When detected, it is usually broken to avoid subsequent crashes, but it usually also returns invalid results which also might lead to further errors. Often, this error occurs when ML image data is converted/rendered into a 3D OpenGL or Inventor Scene (e.g., by volume or iso surface rendering) which again is converted to an ML image (e.g., by snapshot or rasterization modules). This leads to invalid reentrances into the ML during image processing which are broken and commented by this error.

    A solution might be to reconfigure your module network so that module connections (image or node) from Inventor to ML and again to an Inventor node do not exist anymore. It also could help to complete an ML image calculation depending on Inventor node(s) before another Inventor/Viewer module requests image data from that ML module.

  24. (MLErrorCode 23) ML_LIBRARY_LOAD_ERROR - "Library load/init failed."

    Loading or initialization of an ML module library failed. The shared library file may not exist at the searched place, a path to the libraries may be wrong, the library may not be up to date, symbols in the library interface may be missing or the library is of another or outdated version. The installation could be incomplete or damaged.

  25. (MLErrorCode 24) ML_FILE_IO_ERROR - "File IO error" Opening, closing, reading, writing or searching of any file failed.

    There is a variety of possible reasons: A wrong file path may have been specified, other applications may use the file, file permission may be wrong, disk space may be not sufficient, etc.

  26. (MLErrorCode 25) ML_AFTER_EFFECT - "Error due to previous error(s)"

    This is a typical error that occurs when another previous error has left an incomplete or undefined state. Look for previous errors, they may give more precise information.

  27. (MLErrorCode 26) ML_BAD_INDEX - "Bad index"

    The index given to the algorithm is out of range. Sometimes, this is a programming error or due to an (user) interface that has been sloppily implemented and passes invalid user inputs.

  28. (MLErrorCode 27) ML_OUT_OF_RANGE - "Out of Range"

    A coordinate or value is out of range, often a voxel address which is outside of an image. Often, this is a programming error or caused by using an image with an invalid content.

  29. (MLErrorCode 28) ML_MISSING_VOXEL_TYPE_OPERATIONS - "Missing voxel type operations"

    A voxel data type does not implement the required arithmetic operations. Often, this is a programming error. This error also indicates that a module does not support calculations on the connected input voxel type.

  30. (MLErrorCode 29) ML_BAD_FIELD_TYPE - "Bad field type"

    The passed parameter is not derived from the class field or is not of the expected field type. This can be a programming error.

  31. (MLErrorCode 30) ML_BAD_FIELD_POINTER_OR_NO_MEMORY - "Bad field pointer or memory allocation failed"

    The passed parameter is not of an expected (field) type or the allocation of memory failed.

  32. (MLErrorCode 31) ML_FIELD_CREATION_ERROR_OR_NO_MEMORY - "Field creation error or memory allocation failed"

    A field could not be created (e.g., because the field type is still not registered in the runtime type system or the corresponding shared library is still not loaded) or the field creation failed due to lack of memory.

  33. (MLErrorCode 32) ML_TYPE_INITIALIZATION_ERROR - "Type initialization error"

    A (runtime or voxel data) type could not be initialized correctly.

  34. (MLErrorCode 33) ML_CONSTRUCTOR_EXCEPTION - "Exception in new"

    Creating an object failed due to a programming error in a constructor or due to lack of memory.

  35. (MLErrorCode 34) ML_DESTRUCTOR_EXCEPTION - "Exception in delete"

    The destruction of a C++ object failed, e.g., due to a programming error or because it was destroyed by other buggy code.

  36. (MLErrorCode 35) ML_TABLE_FULL - "Table full"

    A table is full and nothing can be inserted anymore.

  37. (MLErrorCode 36) ML_EXTERNAL_ERROR - "Error from external library or application"

    Error messages from other libraries are delivered with this error code if more specific error information from the external library is not available.

  38. (MLErrorCode 37) ML_BAD_BASE_FIELD - "Bad base field type"

    The (runtime) type of a Base field is not the expected one, the Base field pointer is invalid (NULL) or it is not (derived from) a Base field.

  39. (MLErrorCode 38) ML_BAD_BASE_FIELD_CONTENT - "Bad content in base field"

    The pointer content of the Base field is invalid, i.e., it should not be NULL or it does not point to an object derived from Base.

  40. (MLErrorCode 39) ML_TYPE_NOT_REGISTERED - "Required type not registered"

    The required or used type is (still) not registered. You probably forgot to call "YourClassName::initClass" in your initialization file, or there is a missing linked library which contains the type but which has not been loaded yet. Maybe a library dependency has been forgotten in the project (make) file or types are initialized in the wrong order in a library init file.

  41. (MLErrorCode 40) ML_LIBRARY_INIT_ERROR - "Library init failed"

    The initialization code of a library failed. This is a typical error when the ML, an application or a linked library has detected an initialization problem. This can, for example, be due to an invalid version number (i.e., a binary incompatibility), forgotten recompilations of self-defined libraries, paths to (outdated) linked libraries, etc. or the usage of incompatible library and application installers.

  42. (MLErrorCode 41) ML_BAD_POINTER_OR_0 - "Bad pointer or 0"

    A pointer is NULL or a value is NULL or 0 where it should not be. This sometimes indicates a memory allocation error, a programming error, a forgotten NULL pointer check at function entries or also bad function results or objects which have not been found.

  43. (MLErrorCode 42) ML_BAD_STATE - "Bad state"

    The current state of an object is not appropriate for an operation. Maybe it is not initialized or in a valid but inadequate state. This also might indicate that the program ran into an undefined state which should not be possible.

  44. (MLErrorCode 43) ML_TOO_MANY_PUSHES_OR_ADDS - "Too Many Pushes Or Adds"

    Too many elements were pushed or added onto a stack, array or another container type.

  45. (MLErrorCode 44) ML_TOO_MANY_POPS_OR_REMOVES - "Too Many Pops Or Removes"

    Too many elements were removed from a stack, an array or another container type.

  46. (MLErrorCode 45) ML_STACK_TABLE_OR_BUFFER_EMPTY - "Stack Table Or Buffer Empty"

    The access to a table, stack or container or its elements failed, because it is empty.

  47. (MLErrorCode 46) ML_STACK_TABLE_OR_BUFFER_NOT_EMPTY - "Stack Table Or Buffer Not Empty"

    A table, stack, or another container was expected to be empty, but it is not.

  48. (MLErrorCode 47) ML_ELEMENT_NOT_FOUND - "Element Not Found"

    An expected entry or element was not found.

  49. (MLErrorCode 48) ML_ - "InvalidFileName"

    The specified file name is not valid, for example, because it is empty or because it contains invalid characters or path specifications or simply because it does not specify a correct file.

  50. (MLErrorCode 49) ML_INVALID_FILE_DESCRIPTOR - "InvalidFileDescriptor"

    The descriptor used to manage a file is invalid or denotes a closed file.

  51. (MLErrorCode 50) ML_FILE_NOT_OPEN - "FileNotOpen"

    The specified file is not open.

  52. (MLErrorCode 51) ML_NO_OR_INVALID_PERMISSIONS - "NoOrInvalidPermissions"

    The operation cannot or could not be executed because the user or the process does not have appropriate permissions or the permissions of the object to manipulate are not set correctly.

  53. (MLErrorCode 52) ML_DISK_OR_RESSOURCE_FULL - "DiskOrResourceFull"

    There are not enough resources left to execute the desired operation. This typically indicates that the disk is full or that there is not sufficient memory for this operation.

  54. (MLErrorCode 53) ML_FILE_OR_DATA_STRUCTURE_CORRUPTED - "FileOrDataStructureCorrupted"

    The content of a file or another data structure is not organized as expected by the program. This may indicate a broken file, an overwritten data structure or sometimes a newer and still unknown version of a file. It could also indicate a file or data structure created by another application which uses the same named types or files.

  55. (MLErrorCode 54) ML_INVALID_VERSION - "InvalidVersion"

    The version of a data structure of file is invalid; maybe the version is newer than expected. An update of the software could help.

  56. (MLErrorCode 55) ML_UNKNOWN_OR_INVALID_COMPRESSION_SCHEME - "UnknownOrInvalidCompressionScheme"

    The compression scheme is invalid, too old, too new or not known on your system. A compression scheme could have been used on another system to store a file which cannot be loaded on the local system, because the (de)compressor is not known on the local system. It could also indicate a corrupted data structure or file, or even a library that is missing or has not been installed..

  57. (MLErrorCode 56) ML_TYPE_ALREADY_REGISTERED - "TypeAlreadyRegistered"

    This error occurs on an attempt to register a type whose name is already registered. This might, for example, happen when the system detects backup copies of modules or libraries and tries to load them, when a type initialization is called more than once, when older library paths are besides the current ones or when two developers independently developed types or classes with the same name.

  58. (MLErrorCode 57) ML_TYPE_IS_ABSTRACT - "TypeIsAbstract"

    The runtime type to be used is abstract and cannot be used (an object of that type, for example, cannot be created then).

  59. (MLErrorCode 58) ML_TYPE_NOT_DERIVED_FROM_EXPECTED_PARENT_CLASS - "TypeNotDerivedFromExpectedParentClass"

    The used class type is not of the expected type and/or is not derived from the expected parent/base class.

  60. (MLErrorCode 59) ML_OPERATION_INTERRUPTED - "OperationInterrupted"

    The operation was interrupted, either by a user or another signal.

  61. (MLErrorCode 60) ML_BAD_PAGE_ID - "BadPageId"

    This error comments the attempt to use an identifier or index to an (image) page which does not exist or which is out of range.

  62. (MLErrorCode 61) ML_OUT_OF_RESSOURCES - "OutOfRessources"

    There are not enough resources to execute the desired operation. This might, for example, happen when the maximum number of open files, processes, threads, etc. is exceeded, or when the operating system does not have sufficient memory for the desired operation.

  63. (MLErrorCode 62) ML_OBJECT_OR_FILE_EXISTS - "ObjectOrFileExists"

    The object or file to be created already exists.

  64. (MLErrorCode 63) ML_OBJECT_OR_FILE_DOES_NOT_EXIST - "ObjectOrFileDoesNotExist"

    The expected object or file does not exist or is not found.

  65. (MLErrorCode 64) ML_DEADLOCK_WOULD_OCCURR - "DeadlockWouldOccurr"

    The operation cannot be executed because it would lead to a deadlock.

  66. (MLErrorCode 65) ML_COULD_NOT_OPEN_FILE - "CouldNotOpenFile"

    The file could not be opened because, for example, the permissions are not sufficient, resources for opening are not available, the file could not be found, or the file is already open.