CRI ADX  Last Updated: 2024-07-17 10:47 p
Detecting Errors


Runtime Library

Types of Errors and their Detection

If problems such as invalid access, hang-up, corrupted audio or failure to operate occur while using the runtime library, please check if a library error was reported.
Errors reported by the runtime library can be roughly categorized into two types:
  • Fatal errors (errors that should not be allowed to occur)
  • Non-fatal errors (errors that may occur, even when using the library correctly)
Fatal errors can be detected by registering error callback functions.
Non-fatal errors can be detected by checking the statuses of various handles.
For details about how to detect errors, refer to Error Handling and Error Callback .
In addition, the debug version of the libraries (whose names are suffixed with "D") provide extensive error checking functions.
Therefore, if no error is reported by the release versions of the libraries, please check with the debug versions.



Dealing with a Fatal Error (Error Callback)

If an error callback occurs due to a fatal error, check the timing and the content of the error message passed to the error callback.
  • When a program is run in a debugger
    • You can easily set the breakpoints in the registered error callback functions.
  • When the output log can be set but not the breakpoints
    • Save a log of the error messages passed to the error callback.
    • Save a log before and after the error occurs to narrow down the time period during which the error was triggered.
  • No log can be output when executing a program from ROM on the actual target device
    • Display the error message passed to the error callback function on the screen.
    • It is recommended to display the number of occurrences of the error callbacks.
Once an error message has been obtained, based on its content, check if the APIs are correctly used around the error location.
Common error messages are as follows:
  • "EXXXXXXXX:Invalid parameter."
    • A parameter passed to an API is invalid.
  • "EXXXXXXXX:Failed to allocate memory."
    • Unable to allocate the memory or insufficient size of the work area passed.
  • "EXXXXXXXX:Thread-unsafe function has been executed in parallel."
    • A thread-unsafe function has been called across multiple threads.
  • "EXXXXXXXX:Function not implemented."
    • An attempt to use a yet-unimplemented feature or function.
An error callback can be triggered from the processing loop in the runtime library or from an internal module.
If you want to understand the meaning of an error message and how to deal with it, please contact our technical support with the details about the context and the error message.
To contact us, refer to usr_support_site_contents_inqform .



Non-Fatal Error (the Status Indicates an Error)

If the status of a handle indicates an error, see the description of the handle in the API reference and the description of the GetStatus function.
If an error occurs while attempting to read a file or when a disk is ejected, the resolution of the issue may need to be platform-dependent. In such cases, please also refer to the platform-specific information.



No Error in the Runtime Library Can Be Found

Please contact our technical support with the information and the frequency of occurrence of the issue.
To contact us, refer to usr_support_site_contents_inqform .
For example, the following information is useful to investigate the problem.
  • When an invalid access or hang-up occurs
    • Debugger information
      • Disassembly around the stop location
      • Register information
      • Thread operation status
    • Core dump and other dump information
  • When audio corruption occurs
    • WAV file or movie in which the audio is recorded
When you need to send a large file, use our FTP server. (If you do not have an FTP account, please contact us.)



Tools

When an error occurs in a console tool, an error message is output to the console. In GUI-based tools, the error message is displayed in a log window or in an error message box.
Please take appropriate measures according to the error message.
The Error Manual (CRI_Error_Manual_xxx_e.chm) is located in the same folder this manual is in. For details about the errors and possible workarounds, please refer to this Error Manual.
If you want to understand the meaning of an error message or how to deal with it, please contact our technical support with details about the error and the error message itself.
To contact us, refer to usr_support_site_contents_inqform .