Issue 697 in pdfium: Can't render PDF file with current pdfium. But worked with old release

82 views
Skip to first unread message

henning.… via monorail

unread,
Apr 4, 2017, 9:59:11 AM4/4/17
to pdfiu...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 697 by henning....@gmail.com: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697

What steps will reproduce the problem?
1. FPDF_LoadDocument the attached file
2.
3.

What is the expected output? What do you see instead?
I expect the PDF to be loaded and be able to render it. It worked with the then current release last week. Instead i get a FPDF_ERR_FORMAT.


What version of the product are you using? On what operating system?
pdfium$ cat .git/HEAD
bb4a1bc09f92f781deefae5dc187fef21d6957fd

ubuntu 16.04

Please provide any additional information below.
I think i created it with texmaker. Maybe something nice would be a independant pdfium tool to give detailed error reporting why a certain file cannot be loaded/rendered with pdfium


Attachments:
150415-intro_cat_theory_wo_pause-hinze.pdf 889 KB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

n… via monorail

unread,
Apr 4, 2017, 3:39:46 PM4/4/17
to pdfiu...@googlegroups.com
Updates:
Owner: dsin...@chromium.org
Status: Accepted

Comment #1 on issue 697 by n...@chromium.org: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697#c1

I'm reproducing as follows:
Change pdfium_test to do
FPDF_DOCUMENT doc = FPDF_LoadDocument(filename.c_str(), nullptr);
printf("%p\n", doc);
instead of
RenderPdf(filename, file_contents.get(), file_length, options, events);

bisected to 43c1950: https://pdfium-review.googlesource.com/c/3221/

dsincl… via monorail

unread,
Apr 4, 2017, 4:12:52 PM4/4/17
to pdfiu...@googlegroups.com
Updates:
Status: Started

Comment #2 on issue 697 by dsin...@chromium.org: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697#c2

https://pdfium-review.googlesource.com/c/3711/

bugdro… via monorail

unread,
Apr 4, 2017, 8:51:09 PM4/4/17
to pdfiu...@googlegroups.com

Comment #3 on issue 697 by bugd...@chromium.org: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697#c3

The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/abf16c0682a545db4e9bae5510dd398a6ae634a3

commit abf16c0682a545db4e9bae5510dd398a6ae634a3
Author: dan sinclair <dsin...@chromium.org>
Date: Wed Apr 05 00:49:57 2017

Use correct length in guard check

When fixing https://crbug.com/672177 we added a guard that we aren't
reading off the end of the file. That guard used the file access
Position(). This is the wrong value to compare against as our read
position and the file access Position may be different. This CL updates
the check to use the correct current file position.

Bug: pdfium:697
Change-Id: I68a5eaed2f1f3d65422605f0a8474144cfa7d172
Reviewed-on: https://pdfium-review.googlesource.com/3711
Commit-Queue: dsinclair <dsin...@chromium.org>
Reviewed-by: Tom Sepez <tse...@chromium.org>

[modify] https://crrev.com/abf16c0682a545db4e9bae5510dd398a6ae634a3/core/fpdfapi/parser/cpdf_syntax_parser.cpp

bugdro… via monorail

unread,
Apr 4, 2017, 11:29:22 PM4/4/17
to pdfiu...@googlegroups.com

Comment #4 on issue 697 by bugd...@chromium.org: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697#c4


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/0fbb50c2419ee95a95f29a4e757ba2408a4bc6b0

commit 0fbb50c2419ee95a95f29a4e757ba2408a4bc6b0
Author: dan sinclair <dsin...@chromium.org>
Date: Wed Apr 05 03:28:24 2017

Fix assignment to len.

Sigh, messed up std::min conversion.

TBR=n...@chromium.org

Bug: pdfium:697
Change-Id: I0091f178b08fa537ebc3962d9349eb46d0aa8a80
Reviewed-on: https://pdfium-review.googlesource.com/3751
Reviewed-by: dsinclair <dsin...@chromium.org>
Commit-Queue: dsinclair <dsin...@chromium.org>

[modify] https://crrev.com/0fbb50c2419ee95a95f29a4e757ba2408a4bc6b0/core/fpdfapi/parser/cpdf_syntax_parser.cpp

henning...@gmail.com

unread,
Apr 5, 2017, 6:04:05 AM4/5/17
to pdfium-bugs, no_r...@monorail-prod.appspotmail.com, monorail+norep...@chromium.org
hey guys,

thanks for the quick fix. i was trying to update my sources with gclient sync which does something. but ninja yields afterwards there is nothing to compile. what would be the correct workaround with updating to the latest master and compiling all that new stuff without creating a new out and do all that stuff again?

dsincl… via monorail

unread,
Apr 5, 2017, 8:48:32 AM4/5/17
to pdfiu...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 697 by dsin...@chromium.org: Can't render PDF file with current pdfium. But worked with old release
https://bugs.chromium.org/p/pdfium/issues/detail?id=697#c5

(No comment was entered for this change.)

Dan Sinclair

unread,
Apr 5, 2017, 8:50:30 AM4/5/17
to henning...@gmail.com, pdfium-bugs, no_r...@monorail-prod.appspotmail.com, monorail+norep...@chromium.org
You need to do a git pull in the pdfium directory. The gclient sync is
only needed if the DEPS file changes.

dan
> You received this message because you are subscribed to the Google Groups
> "pdfium-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pdfium-bugs...@googlegroups.com.
> To post to this group, send email to pdfiu...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pdfium-bugs/1de26238-2060-4777-8e23-075387d87619%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages