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

Exception in Conversion Does Not Lead to Dangerzone Failing #309

Closed
deeplow opened this issue Jan 17, 2023 · 0 comments · Fixed by #313
Closed

Exception in Conversion Does Not Lead to Dangerzone Failing #309

deeplow opened this issue Jan 17, 2023 · 0 comments · Fixed by #313

Comments

@deeplow
Copy link
Contributor

deeplow commented Jan 17, 2023

To reproduce this, I raised an exception at the end of the conversion process (in container.py). However, the program would run fine and not report the exception at all (exit code 0):

$ ./dev_scripts/dangerzone-cli ./tests/test_docs/sample.pdf 
[doc 1i6ll0] 0.0% Converting to PDF using GraphicsMagick
[doc 1i6ll0] 3.0% Separating document into pages
[doc 1i6ll0] 5.0% Converting page 1/1 to pixels
[doc 1i6ll0] 50.0% Converted document to pixels
[doc 1i6ll0] 50.0% Converting page 1/1 from pixels to PDF
[doc 1i6ll0] 95.0% Merging 1 pages into a single PDF
[doc 1i6ll0] 97.0% Compressing PDF
[doc 1i6ll0] 100.0% Safe PDF created

This can lead to false positives in our testing environment (which currently relies primarily in checking the exit code -- which will need to be revisited soon).

deeplow added a commit that referenced this issue Jan 17, 2023
Exceptions raised during the document conversion process would be
silently hidden. This was because ThreadPoolExecuter created various
threads and hid any exceptions raised.

Fixes #309
deeplow added a commit that referenced this issue Jan 17, 2023
Exceptions raised during the document conversion process would be
silently hidden. This was because ThreadPoolExecuter created various
threads and hid any exceptions raised.

Fixes #309
deeplow added a commit that referenced this issue Jan 20, 2023
Exceptions raised during the document conversion process would be
silently hidden. This was because ThreadPoolExecuter in logic.py created
various contexts and hid any exceptions raised.

Fixes #309
deeplow added a commit that referenced this issue Jan 26, 2023
Exceptions raised during the document conversion process would be
silently hidden. This was because ThreadPoolExecuter in logic.py created
various contexts and hid any exceptions raised.

Fixes #309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant