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

Random crash (exc bad access) #42

Open
pavelgubarev opened this issue Jan 15, 2019 · 1 comment
Open

Random crash (exc bad access) #42

pavelgubarev opened this issue Jan 15, 2019 · 1 comment

Comments

@pavelgubarev
Copy link

Hi guys. Thank you for the algorithm.

I have found out that it crashes randomly when running on device with one particular picture.

If you fix this line

if (y<height)
                    {
                        byteIndex = (bytesPerRow * MIN(height,roundf(y + 1))) + roundf(x) * bytesPerPixel;
                        color = getColorCode(byteIndex, imageData);

to

if (y<height-2)
                    {
                        byteIndex = (bytesPerRow * MIN(height,roundf(y + 1))) + roundf(x) * bytesPerPixel;
                        color = getColorCode(byteIndex, imageData);

It is stable.

I have no idea why does it happen, but it does :)

cheers.

@adrianorezena
Copy link

It is more stable, but still happening to me.

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

2 participants