Closed IsaiahJTurner closed 7 years ago
Same Problem; please help! Thank you..
This seems to happen when the Gif is invalid. Such as trying to create a Gif from this text:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>messages-data/11387/image.gif</Key><RequestId>C3DDF27CDDDDD4DD</RequestId><HostId>SDFjh/jfasd89UHFSDNlas89fdhsduIOUAEHF/sdfhiwerjD/FhjH+JJsdfJLKfdsfnkJHEkjdsfNKJw=</HostId></Error>
I get the same issue when using a protobuf compiler. Any answers to this?
Couldn't reproduce this issue on current version
I am running into the same issue if the data that is passed to init(gifData:Data)
is not a valid gif.
let s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>messages-data/11387/image.gif</Key><RequestId>C3DDF27CDDDDD4DD</RequestId><HostId>SDFjh/jfasd89UHFSDNlas89fdhsduIOUAEHF/sdfhiwerjD/FhjH+JJsdfJLKfdsfnkJHEkjdsfNKJw=</HostId></Error>"
if let data = s.data(using: .utf8) {
let gifImage = UIImage(gifData: data)
The breakpoint hits in
UIImage+SwiftyGif.swift
and the app crashes with the messageCrash: fatal error: Can't form Range with upperBound < lowerBound
I am trying to play a gif with 100 loops and memory limit 20. I've also included the gif file that caused the issue. It seems to be reproducable.