SDWebImage / SDWebImageSVGCoder

A SVG coder plugin for SDWebImage, using Apple's built-in framework
MIT License
103 stars 34 forks source link

Crash on [SVGKParser addParserExtension:] + 408 #7

Closed neobie closed 5 years ago

neobie commented 5 years ago

I am using this on uitableview. Notice a huge crash logs from Fabric. Can anyone help?

Crashed: com.hackemist.SDWebImageDownloaderOperationCoderQueue
0  libobjc.A.dylib                0x1e2f93bf0 objc_retain + 16
1  SVGKit                         0x104e627ec -[SVGKParser addParserExtension:] + 408
2  SVGKit                         0x104e625f0 -[SVGKParser addDefaultSVGParserExtensions] + 284
3  SVGKit                         0x104e62354 +[SVGKParser newParserWithDefaultSVGKParserExtensions:] + 100
4  SVGKit                         0x104e62380 +[SVGKParser parseSourceUsingDefaultSVGKParser:] + 24
5  SVGKit                         0x104e5f6f0 -[SVGKImage initWithSource:] + 64
6  SVGKit                         0x104e5f8b4 -[SVGKImage initWithData:] + 184
7  SDWebImageSVGCoder             0x104e2b880 -[SDImageSVGCoder decodedImageWithData:options:] + 100
8  SDWebImage                     0x104d8755c -[SDImageCodersManager decodedImageWithData:options:] + 348
9  SDWebImage                     0x104d89f3c SDImageLoaderDecodeImageData + 828
10 SDWebImage                     0x104d940b4 __70-[SDWebImageDownloaderOperation URLSession:task:didCompleteWithError:]_block_invoke.198 + 216
11 libdispatch.dylib              0x1e37e0a38 _dispatch_call_block_and_release + 24
12 libdispatch.dylib              0x1e37e17d4 _dispatch_client_callout + 16
13 libdispatch.dylib              0x1e378a324 _dispatch_lane_serial_drain$VARIANT$mp + 592
14 libdispatch.dylib              0x1e378ae40 _dispatch_lane_invoke$VARIANT$mp + 428
15 libdispatch.dylib              0x1e37934ac _dispatch_workloop_worker_thread + 596
16 libsystem_pthread.dylib        0x1e39c2114 _pthread_wqthread + 304
17 libsystem_pthread.dylib        0x1e39c4cd4 start_wqthread + 4
dreampiggy commented 5 years ago

Seems something logic related to SVGKit.

This coder is just a Wrapper to use SVGKit with SDWebImage. Any SVG parser or logic should report to that repo instead. I have no enough experience or domain knowledge to help with this.

dreampiggy commented 5 years ago

You can try to find the issue SVG files, and don't deploy that to your end-user client. Maybe it's the bug of SVG parser used by SVGKit.

neobie commented 5 years ago

You can try to find the issue SVG files, and don't deploy that to your end-user client. Maybe it's the bug of SVG parser used by SVGKit.

I can't replicate the issue myself. Just got the massive crash report when released to production.

dreampiggy commented 5 years ago

Related to this issue ?

https://github.com/SVGKit/SVGKit/issues/551

neobie commented 5 years ago

Related to this issue ?

SVGKit/SVGKit#551

Yea most probably, but I am unsure how to resolve it.

julien-baillon commented 5 years ago

I've got the exact same issue.

dreampiggy commented 5 years ago

@neobie @AnarionII I've found the crash reason for SVGKit. See comment: https://github.com/SVGKit/SVGKit/issues/551#issuecomment-527986599

This need a fix on SVGKit, but not SDWebImage's SVG plugin. If you need a temporary solution, I can try to help using a fork repo of SVGKit for quick fix.

dreampiggy commented 5 years ago

@neobie @AnarionII This issue should be solved by that SVGKit MR. It's already merged. You can try to pod update the latest git commit.

Or, if you need the version, I bumped the SVGKit 3.0.0-beta3 version for CocoaPods.

julien-baillon commented 5 years ago

@dreampiggy Thank you very much, you saved my day.