{"record":{"id":"c5dbcf0567abfa09","repo":"airbnb/lottie-android","slug":"missing-values-for-keyframe-c5dbcf","errorCode":null,"errorMessage":"Missing values for keyframe.","messagePattern":"Missing values for keyframe\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"lottie/src/main/java/com/airbnb/lottie/animation/keyframe/IntegerKeyframeAnimation.java","lineNumber":24,"sourceCode":"import java.util.List;\n\npublic class IntegerKeyframeAnimation extends KeyframeAnimation<Integer> {\n\n  public IntegerKeyframeAnimation(List<Keyframe<Integer>> keyframes) {\n    super(keyframes);\n  }\n\n  @Override\n  Integer getValue(Keyframe<Integer> keyframe, float keyframeProgress) {\n    return getIntValue(keyframe, keyframeProgress);\n  }\n\n  /**\n   * Optimization to avoid autoboxing.\n   */\n  int getIntValue(Keyframe<Integer> keyframe, float keyframeProgress) {\n    if (keyframe.startValue == null) {\n      throw new IllegalStateException(\"Missing values for keyframe.\");\n    }\n\n    int endValue = keyframe.endValue == null ? keyframe.getStartValueInt() : keyframe.getEndValueInt();\n\n    if (valueCallback != null) {\n      //noinspection ConstantConditions\n      Integer value = valueCallback.getValueInternal(keyframe.startFrame, keyframe.endFrame,\n          keyframe.startValue, endValue,\n          keyframeProgress, getLinearCurrentKeyframeProgress(), getProgress());\n      if (value != null) {\n        return value;\n      }\n    }\n\n    return MiscUtils.lerp(keyframe.getStartValueInt(), endValue, keyframeProgress);\n  }\n\n  /**","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/airbnb/lottie-android/blob/05ea92e90381eb8a8ae06855ea2b74f322bebbec/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/IntegerKeyframeAnimation.java#L6-L42","documentation":"Thrown by IntegerKeyframeAnimation#getIntValue when a keyframe's startValue is null. Unlike the color/float variants, this animation tolerates a null endValue by falling back to the start value; only a null startValue is fatal because there is no baseline integer to interpolate from.","triggerScenarios":"Evaluating an integer keyframe whose startValue (\"s\") is absent/null in the JSON while the end value may or may not be present. The fallback endValue = endValue != null ? end : start cannot recover because start itself is null.","commonSituations":"Malformed keyframe in the JSON missing its start integer; export bug; schema incompatibility between the file and the library version.","solutions":["Inspect the JSON keyframe and ensure a start integer value (\"s\") is present.","Re-export the animation.","Align lottie-android with the file's schema.","Remove or simplify the affected property's keyframes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"lottieAnimationView.setFailureListener(t -> {\n  if (t instanceof IllegalStateException && \"Missing values for keyframe.\".equals(t.getMessage())) {\n    Log.w(TAG, \"integer keyframe missing start value\", t);\n  } else throw new RuntimeException(t);\n});","preventionTips":["Ensure each integer keyframe has a start value (\"s\").","Re-export and align lottie-android with the schema."],"tags":["keyframe","integer","parsing","animation"],"backgroundTag":null,"analyzedSha":"05ea92e90381eb8a8ae06855ea2b74f322bebbec","analyzedAt":"2026-08-14T00:51:35.636Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}