rxing icon indicating copy to clipboard operation
rxing copied to clipboard

Index out of bounds in FitQadrilateralToPoints try_get_range

Open dankirkham opened this issue 2 years ago • 4 comments

panicked at /Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rxing-0.4.9/src/common/cpp_essentials/concentric_finder.rs:393:25:
slice index starts at 18 but ends at 17
...

This will happen occasionally while trying to detecting codes in wasm.

dankirkham avatar Oct 27 '23 17:10 dankirkham

I made sure that my luma input was a square image and I am able to scan barcodes now. I have not encountered the error since.

dankirkham avatar Oct 27 '23 19:10 dankirkham

I'll look into this. Do you happen to have any images that trigger the error?

hschimke avatar Oct 28 '23 15:10 hschimke

I have a potential solution, but it only addresses the error and not whatever root cause results in it happening. If you have an image that causes it you can safely upload to be added to the test suite that would be very helpful.

Alternatively, if your use-case is images that you do not want public and cannot share, I can provide a GitHub branch with the potential solution for you to test.

hschimke avatar Oct 28 '23 17:10 hschimke

@dankirkham I bundled this, and a few other changes, into rxing 0.4.11, which is the backing version for the NPM package version 0.1.26. If you continue to see the issue please reach out.

hschimke avatar Nov 06 '23 16:11 hschimke