New issue
Advanced search Search tips

Issue 788220 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Hitting DCHECK when searching for text in PDF

Project Member Reported by rharrison@chromium.org, Nov 23 2017

Issue description

Chrome Version: HEAD (debug build)
OS: Linux

What steps will reproduce the problem?

(1) Open http://www.acrotex.net/blog/wp-content/uploads/2011/07/pdfblog_24.pdf
(2) Press ctrl+f, and start typing in "round"

What is the expected result?

Text matching the part of the word typed in will be highlighted.

What happens instead?

PDF Viewer is crashing.

This likely related to  crbug.com/788103 , since I encountered this while testing a fix for that issue. I am unsure if that issue is root caused in the same thing, or this just happens to be a very trying PDF to search.
 
Status: started (was: Assigned)
This issue is rooted in the fact the number of characters and the length of the text are different, specifically there are two non-printing control characters. This leads to the char count being 2 larger then the text length. Since the string code has been made more strict about invalid inputs, this is leading to some operations returning "", which the ICU code is DCHECKing on.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 28 2017

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

commit 0f1ca17e45bee4f1cb04d33437eba010b1afcd72
Author: Ryan Harrison <rharrison@chromium.org>
Date: Tue Nov 28 18:19:57 2017

Convert from character stream to visible text indices in GetText

Most of the API methods FPDFText operate on indices in terms of the
underlying stream of characters. This stream includes non-printing
control characters, which are not part of the visible text. The
majority of files do not appear to have these hidden characters so
there is a 1:1 correspondence between them. When they are present
conversion needs to occur to make sure that GetText doesn't attempt to
retrieve for a span that is out of range.

BUG= chromium:788103 , chromium:788220 

Change-Id: I4c9fa403ea65754ba94e3f15ded49fe0641e9db5
Reviewed-on: https://pdfium-review.googlesource.com/19550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>

[modify] https://crrev.com/0f1ca17e45bee4f1cb04d33437eba010b1afcd72/fpdfsdk/fpdftext.cpp

Status: Fixed (was: Started)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e18360c36e1e9e8ea9e6d7cbba548b2d862c18d1

commit e18360c36e1e9e8ea9e6d7cbba548b2d862c18d1
Author: pdfium-deps-roller@chromium.org <pdfium-deps-roller@chromium.org>
Date: Tue Nov 28 22:54:34 2017

Roll src/third_party/pdfium/ 99acb1c81..1ff9b7ffa (5 commits)

https://pdfium.googlesource.com/pdfium.git/+log/99acb1c816dc..1ff9b7ffa653

$ git log 99acb1c81..1ff9b7ffa --date=short --no-merges --format='%ad %ae %s'
2017-11-28 dsinclair Remove CollectionSize from fpdfppo.
2017-11-28 dsinclair Remove CollectionSize from fpdf_flatten.
2017-11-28 dsinclair Remove CollectionSize from string_view_template
2017-11-28 dsinclair Remove CollectionSize from JBig2_Context
2017-11-28 rharrison Convert from character stream to visible text indices in GetText

Created with:
  roll-dep src/third_party/pdfium
BUG= 788103 , 788220 


The AutoRoll server is located here: https://pdfium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=dsinclair@chromium.org

Change-Id: Iefdff68f09558ee706d0702bf47b8241a7141f4c
Reviewed-on: https://chromium-review.googlesource.com/794026
Reviewed-by: <pdfium-deps-roller@chromium.org>
Commit-Queue: <pdfium-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519878}
[modify] https://crrev.com/e18360c36e1e9e8ea9e6d7cbba548b2d862c18d1/DEPS

Sign in to add a comment