sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.71k stars 1.73k forks source link

Search in long PDFs is terminated prematurely #4468

Closed user1823 closed 3 months ago

user1823 commented 3 months ago

SumatraPDF version

Describe the bug When searching in long PDFs (in which searching takes more than a few seconds), the search terminates after about 1-2 seconds and, as a result, the search term is not found.

This bug is introduced in a very recent build.

kjk commented 3 months ago

Can you share a sample document?

I tried search in 200 page PDF and can't see a difference compared to 3.5.2

user1823 commented 3 months ago

Try this 3700+ page PDF (224 MB)

Based on further testing, it seems that the issue occurs only after I reach one search result and press F3 to go to the next one which is several hundred pages away. The issue doesn't seem to occur when going to the first search result.

kjk commented 3 months ago

Can you give example search query?

user1823 commented 3 months ago

You can search for inulin. You will get 2 results initially but when going to the third result, the search will terminate prematurely.

(The numbers depend on how the word is distributed in the PDF file. So, these numbers are for the search query inulin.)

kjk commented 3 months ago

Thanks, I can reproduce.