Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This image causes datamatrix decode to hard crash #62

Open
raylutz opened this issue Apr 18, 2021 · 4 comments
Open

This image causes datamatrix decode to hard crash #62

raylutz opened this issue Apr 18, 2021 · 4 comments

Comments

@raylutz
Copy link

raylutz commented Apr 18, 2021

I found I had to wrap the pylibdmtx in an external subprocess (i.e. copy the source image to a file and then have a CLI envoked script that calls pylibdmtx and writes the result to a file) because this image causes everything to just hard stop, with no error messages or exceptions raised. I always treasure this sort of test data because it should be fairly easy for someone familiar with the code to fix the problem, but it isn't something I have the knowledge to do.

datamatrix_temp_09992_00008_000024_0

Enjoy!

@tusharj333
Copy link

Hi, @raylutz Did you find any fix for this issue?

@tyctor
Copy link

tyctor commented Oct 13, 2021

hi
i have image example, that causes hard crash of python script
it cant be handled in try: except block

invalid_dmtx

@raylutz
Copy link
Author

raylutz commented Dec 4, 2021

Hi, @raylutz Did you find any fix for this issue?

No, the datamatrix code still crashes, but by wrapping it in a subprocess, it will not cause the calling program to crash. Try/Except block does not work in this example. I don't know the datamatrix code well enough to propose a change. But of course we can do a better job of clipping out the correct region and avoid the issue altogether.

@MathijsNL
Copy link

Interesting find.

Using the library (dmtxread) also crashes, so the problem lies in the lib and not in the wrapper.

+++ exited with 40 +++

Adding a 10 pixel white border seems to fix the issue. Maybe someone more experienced with C code can shed light on this?

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

No branches or pull requests

4 participants