Skip Navigation: Avoid going through Home page links and jump straight to content
NASA Logo    + View the NASA Portal  

Questions About Apparent Errors in SPICE Code or Kernel Files

If you have written a program that uses SPICE modules, and that program either fails to execute or displays some sort of error message, you may have encountered:

  1. an attempt to obtain SPICE data that is not available in any of the SPICE files you have loaded into your program
  2. a secondary (and not-so-obvious) need for additional, but missing, SPICE data to support a primary computation
  3. a kernel file that was incorrectly ported between dissimilar computers
  4. an error in your own code, perhaps including an incorrect declaration for an input or output parameter in a call to a SPICE module
  5. an invalid parameter (data value) passed into a SPICE module through the calling sequence
  6. an error in SPICE code

(These problems are listed according to estimated relative frequency of occurrence.)

The first and second kinds of errors involve missing data (or an inadvertent request for the wrong data). Likely a SPICE error message and trace-back will be generated. (This message may be difficult to interpret.) Try using the various kernel summary tools and/or re-examining any associated metadata to ensure the SPICE kernel files you are using contain the information (e.g. object IDs, time spans) you need. Take a look at missing data for more information.

The third kind of error will usually result in some kind of SPICE error message being generated. Which message depends on the kind of file being ported and the version of the toolkit being used. (Erroneous interpretation of kernel data will not happen.)

The fourth kind of error could have unpredictable results, including program termination (crash).

The fifth kind of error is frequently detected by the exception handling mechanism built into SPICE code, in which case a SPICE error message and trace-back will be generated. (This message may be difficult to interpret.)

The sixth kind of error could have unpredictable results. In general the SPICE software has been highly tested, using formal test procedures and extensive use on many missions. While the occasional bug is found, this is a rather rare occurrence.

NAIF has a document summarizing commonly encountered problems that may help you self-diagnose a problem before resorting to contacting NAIF.

If your own self-diagnosis efforts have not resolved your problem and you truly need help from NAIF in diagnosing an error, please try to do the following, as appropriate.

  1. Ensure that the SPICE error handling mechanism has not been turned off. ("On" is the default state for Toolkits obtained from NAIF.)
  2. Provide a complete copy of any error message(s) you have encountered.
  3. Provide a listing of output produced from your program.
  4. Provide an accurate list of the names of the SPICE kernels your program is using.
  5. Provide a listing of your code where you believe a SPICE-related error has taken place. If this is a code fragment, also include the declarations section of your code.

NAIF staff may later ask for a complete copy of your source code and/or your executable, as well as copies of the actual kernels and other data your program was using when the problem occurred.

PDS Menu
 NASA | Caltech | Privacy | Image Policy | FAQ | JPL Feedback
o Clearance: CL#05-2438
o Site Manager: Boris Semenov
o Webmaster: Ron Baalke
o Last Updated: