Bug #5163

There is a seg fault when Spice::getDouble is called and index is out of bounds

Added by Kristin Berry about 1 year ago. Updated 9 months ago.

Christopher Combs
Target version:
Software Version:
Test Reviewer:


When calling: p_camera->getDouble("SPICE_KEYWORD_NAME", i) seg faults when "SPICE_KEYWORD_NAME" is not found in the spice keyword pool.

Not sure if the seg fault happens:
1. because keyword has not been furnished and can't be found in pool
2. because the index is out of bounds

To get this seg fault to occur:
1. copy tgo iak file to local directory
2. remove the _OD keywords from your copy
3. run spiceinit with your new iak (be sure to set ckpredict = true = spkpredict for this mission)


#1 Updated by Tammy Becker about 1 year ago

  • Status changed from New to Acknowledged

#2 Updated by Stuart Sides 10 months ago

  • Status changed from Acknowledged to Assigned
  • Assignee set to Christopher Combs
  • Target version set to 3.5.2 (2017-01-31 Jan)

#3 Updated by Christopher Combs 10 months ago

  • Status changed from Assigned to Feedback

I don't believe this is due to the index being out of bounds.

I followed your instructions to reproduce the error and found that the segfault occurs in Spice::readValue's call to gdpool_c

The getDouble call with the iteration is in TgoCassisDistortionMap's constructor. The segfault occurs regardless of the index being used. (If the keyword does not exist)

Is this something we should follow up on? gdpool_c belongs to NAIF, so there is not much we can do to check preemptively.

#4 Updated by Makayla Shepherd 10 months ago

  • Status changed from Feedback to In Progress

#5 Updated by Christopher Combs 9 months ago

  • Status changed from In Progress to Resolved

This turned out to be a problem with a try that destructed an incomplete object while looking for a catch.

Built for CentOS and available for testing at /work/projects/isis/latest/m05163.

I tested using the following command from the spiceinit directory:

spiceinit from= CAS-MCO-2016-11-22T16.38.39.354-NIR-02036-00.cub iak= ./tgocassisAddendum005.ti ik= em16_tgo_cassis_v06.ti spkpredict= true ckpredict= true

#6 Updated by Kristin Berry 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF