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

Fix error reading concatenated pdfs #5910

Merged
merged 1 commit into from
May 13, 2015

Conversation

jordan-thoms
Copy link
Contributor

This fixes issue #5909

@Snuffleupagus
Copy link
Collaborator

It's great that you've included a test-case in the patch, but looking at it I'm not sure that we're actually allowed to include (and redistribute) the PDF file in the PDF.js repo. At the top of the pages, it says:

This document is being provided for the exclusive use of HONG YUN YONG at [FIRM]. Not for redistribution."

Would you be able to create a reduced test-case, without any potentially private data?

@jordan-thoms
Copy link
Contributor Author

I tried to and didn't manage to create quite the same problem - I created one which exhibited the same behavior in PDF.js, but it caused Adobe Reader to segfault (whereas Adobe reads the one I attached fine). I think it has to do with the object IDs in the two files, and if they are overlapping.

I'll try again to create one which has the same behavior, perhaps taking the current PDF and removing some of the streams.

@jordan-thoms
Copy link
Contributor Author

I've replaced it with a new test file. It's got the same structure, but I've snipped out the content streams.

"file": "pdfs/issue5909.pdf",
"md5": "65c169b6f540b27ac0ff2738a80d1e14",
"rounds": 1,
"type": "eq"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can change this to a load test instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, yeah I can seeing as it's just a blank PDF - it's not going to render anything anyway. I'll make that change and push up a new commit.

@jordan-thoms
Copy link
Contributor Author

Updated the test to just a load test.

@jordan-thoms
Copy link
Contributor Author

Looks like the windows failure is false, some file locking issue?

@timvandermeij
Copy link
Contributor

@jordan-thoms Yes, that is not your fault. It has to be corrected on the Windows bot.

},
{ "id": "issue5909",
"file": "pdfs/issue5909.pdf",
"md5": "65c169b6f540b27ac0ff2738a80d1e14",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bots complain:

WARNING: MD5 of file "pdfs/issue5909.pdf" does not match file. Expected "65c169b6f540b27ac0ff2738a80d1e14" computed "51a724136c0c10008bd061a78ea4b8fc"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jordan-thoms Perhaps you forgot to update the MD5 hash after updating the test file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes. I'll push up a new commit.

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/25064c4eb05e32b/output.txt

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/a6a728e3c4c0bce/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.22.172.223:8877/7fc423f0409923b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/7fc423f0409923b/output.txt

Total script time: 18.16 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/a6a728e3c4c0bce/output.txt

Total script time: 23.26 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

timvandermeij added a commit that referenced this pull request May 13, 2015
@timvandermeij timvandermeij merged commit d484ebd into mozilla:master May 13, 2015
@timvandermeij
Copy link
Contributor

Nice, thank you!

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

Successfully merging this pull request may close these issues.

4 participants