Lottie-ios: Expectations Breakpoint issue

Created on 22 Jun 2019  路  7Comments  路  Source: airbnb/lottie-ios

Check these before submitting:

  • [x] The issue doesn't involve an Unsupported Feature
  • [x] This issue isn't related to another open issue

This issue is a:

  • [x] Non-Crashing Bug (Visual or otherwise)

Which Version of Lottie are you using?

Lottie 3.0

What Platform are you on?

  • [x] iOS

What Language are you in?

  • [x] Swift

Expected Behavior

  • The application should not stop due to debug breakpoint

Actual Behavior

Exceptatino Breakpoint

Application has enabled Debug breakpoint and there is Lottie animation on the start screen, hence the application will hit this exception breakpoint on each run.

Code Example

public init(from decoder: Decoder) throws {
    var container = try decoder.unkeyedContainer()

    if !container.isAtEnd {
      self.x = try container.decode(Double.self)
    } else {
      self.x = 0
    }

}

Animation JSON

https://lottiefiles.com/3015-man-and-phone

Most helpful comment

Please consider this issue with a bit more priority, dynamic apps with heavy lottie usage at startup make it very annoying to run with a debugger attached.

All 7 comments

Another Exception Breakpoint issue -

Screenshot
Keyframe group

Code Example

required init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: KeyframeWrapperKey.self)

    if let keyframeData: T = try? container.decode(T.self, forKey: .keyframeData) {
      /// Try to decode raw value; No keyframe data.
      self.keyframes = [Keyframe<T>(keyframeData)]
    } else 

File Name
KeyframeGroup.swift

This is well known and unfortunately theres really no work around. This is how the codable container handles optional values...

I have the same issue with the KeyframeGroup. How can I solve it?

Have you tried decodeIfPresent()?
try? container. decodeIfPresent(T.self, forKey: .key)

This will not hit the Swift error breakpoint.

Please consider this issue with a bit more priority, dynamic apps with heavy lottie usage at startup make it very annoying to run with a debugger attached.

Is this issus resolved?

stll not resolved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdd7 picture rdd7  路  4Comments

loganblevins picture loganblevins  路  3Comments

chrisballinger picture chrisballinger  路  4Comments

rajeshbeats picture rajeshbeats  路  3Comments

awschuerholz picture awschuerholz  路  3Comments