-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Ensure that PDFDocument.documentInfo
doesn't fail during document load, when the entire XRef table hasn't been fetched yet (issue 8180)
#8183
Ensure that PDFDocument.documentInfo
doesn't fail during document load, when the entire XRef table hasn't been fetched yet (issue 8180)
#8183
Conversation
…oad, when the entire XRef table hasn't been fetched yet (issue 8180) Similar to other `try-catch` statements in `/core` code, we must re-throw `MissingDataException` to prevent issues with missing data during document loading. Note that I'm not sure if/how we can test this, which is why the patch doesn't include any test(s). Fixes 8180.
That was quick, thanks for the patch! To create a unit test for it, you could try to mock the network component and deliberately send partial data. Do you want to add the test, or should I merge the PR after manual verification? |
Unfortunately I won't have time to try and write a unit-test for this right now, so in the interest of getting this long-standing issue resolved it's probably better to just test manually for now (and we should at least run the unit-tests as well). /botio unittest |
From: Bot.io (Linux)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/89517c8637d8cf8/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/553f11a4354657c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/89517c8637d8cf8/output.txt Total script time: 2.40 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/553f11a4354657c/output.txt Total script time: 5.78 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified by applying this patch to the project from #8180 and confirming that the printed information is complete.
Fair enough, thanks for taking your time to write the patch in the first place. |
…ngDataException Ensure that `PDFDocument.documentInfo` doesn't fail during document load, when the entire XRef table hasn't been fetched yet (issue 8180)
Similar to other
try-catch
statements in/core
code, we must re-throwMissingDataException
to prevent issues with missing data during document loading.Note that I'm not sure if/how we can test this, which is why the patch doesn't include any test(s).
Fixes #8180.
@Rob--W Thank you for helping with debugging this in #8180 (comment); do you have time to review the patch?