Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

UIImage+FloodFill.m:423 #38

Open
goharika opened this issue Aug 28, 2018 · 6 comments
Open

UIImage+FloodFill.m:423 #38

goharika opened this issue Aug 28, 2018 · 6 comments

Comments

@goharika
Copy link

goharika commented Aug 28, 2018

Or may be memory issue,
App is crashing when trying to multiple fill.
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

Seems this is the same issue
https://stackoverflow.com/questions/50522424/scanline-flood-fill-thread-1-exc-bad-access-code-1-address-0x10b48427c/52051942#52051942

Does anybody fix this?

@goharika
Copy link
Author

goharika commented Aug 29, 2018

Hi Chintan Dave,
Seems we can fix this issue by adding thread on setting image,
And now I am getting thread issue on 71 row
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
Also getting thread issue, trying to fix with async thread on main thread, but no results.

screen shot 2018-08-29 at 5 33 51 pm

Can you please help me fix this?

@Chintan-Dave
Copy link
Owner

Can you provide me image for which you are getting this issue?

@goharika
Copy link
Author

I am trying to draw something like this, and when filling this boxes.
And in image above you can see the message error.

img_1197

@Chintan-Dave
Copy link
Owner

I tried playing with that image is working ok for me.

img_0138 img_0137 img_0139

Can you give more specific detail so that we can reproduce it?

@goharika
Copy link
Author

It doesn't happen always.
Sometimes when I doing much fills, that brings me this issue
Crashed: com.apple.main-thread
0 0x102a76838 -[UIImage(FloodFill) floodFillFromPoint:withColor:andTolerance:useAntiAlias:] (UIImage+FloodFill.m:423)
1 0x102a75044 -[UIImage(FloodFill) floodFillFromPoint:withColor:andTolerance:] (UIImage+FloodFill.m:28)

I have tried to fix this by add set image part in thread, and give for him a time. See in screenshot
But that gives me some time, and after again the same.

screen shot 2018-08-31 at 11 24 25 am

@alexappsnet
Copy link

Please, see the fix at https://github.com/alexappsnet/UIImageScanlineFloodfill

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants