ZLImageEditor icon indicating copy to clipboard operation
ZLImageEditor copied to clipboard

I am getting a crash on Done button after editing the image

Open app-arianamini opened this issue 2 years ago • 8 comments

error = vImageScale_ARGB8888(&sourceBuffer, &destBuffer, nil, numericCast(kvImageHighQualityResampling))

Unfortunately, I am unable to give more information, it happens with XCode 13.3 and iOS 15.4. Screenshot 2022-03-21 at 11 12 43 Screenshot 2022-03-21 at 11 12 58

Why are we using over 400 MB RAM by editing just 3 Images?

app-arianamini avatar Mar 21 '22 10:03 app-arianamini

Okay, I found out, that if I press on Save button (after drawing on an Image), the memory usage increase instantly from 100 to 400 and its crashes.

app-arianamini avatar Mar 21 '22 10:03 app-arianamini

Sorry, I can't fix this crash right now, you can disable the code that caused the crash first.

longitachi avatar Mar 24 '22 12:03 longitachi

You mean the entire framework...

app-arianamini avatar Mar 25 '22 13:03 app-arianamini

https://github.com/longitachi/ZLImageEditor/blob/8e5437c20d5ecbb516ee028e1c994518747bbcc9/Sources/General/ZLEditImageViewController.swift#L816-L820

longitachi avatar Mar 28 '22 02:03 longitachi

Thanks, but I thought this resizing might be more important, probably need to add a little more comments.

app-arianamini avatar Apr 16 '22 06:04 app-arianamini

Upgrade to 1.0.6, use jpegData(compressionQuality:) to compress images.

longitachi avatar Apr 18 '22 02:04 longitachi

Sometimes the screen freezes after hitting the 'done' button, I would suggest to create a loading state after tapping the 'done' button.

kockok avatar May 30 '22 09:05 kockok

OK, I'll add it in the next version.

longitachi avatar May 30 '22 10:05 longitachi