After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697194 - Search in PDFs is broken
Search in PDFs is broken
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.8.x
Other Linux
: High critical
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-03 16:48 UTC by Andreas Kloeckner
Modified: 2013-04-20 15:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb session (12.36 KB, text/plain)
2013-04-03 17:12 UTC, Germán Poo-Caamaño
Details

Description Andreas Kloeckner 2013-04-03 16:48:43 UTC
A few things are wrong with evince's new search function.

* Hit Ctrl-F, enter a serch term that is *not* on the current page.

Then, a number of different things may happen:

* The search form may disappear
* evince may crash
* Everything may work just fine.

It's possible to force things to go wrong by repeatedly hitting Enter.

For definiteness, you may try this by searching for "arc-length" in http://arxiv.org/pdf/1212.3868v1
Comment 1 Germán Poo-Caamaño 2013-04-03 17:12:21 UTC
Created attachment 240507 [details]
gdb session

Indeed, the behaviour gets annoying shortly.

I also searched for 'expansion', which appears in plenty of pages.  The search bar keeps there as long as there are matches in the current or immediately next page.  Once there are not, the search bar gets hidden and once find himself hitting enter in the document rather than the search bar.

FWIW, the first time I could reproduce the bug quickly.  With gdb I had to try several times.  I am not sure I triggered exactly the same issue twice or a different one.  Anyhow, the gdb session is attached.
Comment 2 Germán Poo-Caamaño 2013-04-03 17:19:52 UTC
I forgot to add:

I reproduced it with:
- evince master (3d2d338e087)
  + patches from https://bugzilla.gnome.org/show_bug.cgi?id=695524
- poppler master (4ee6757dd7) (slightly newer than 0.22)
Comment 3 Germán Poo-Caamaño 2013-04-03 20:33:41 UTC
An updated stacktrace.  This makes more sense to me.

Starting program: /home/gpoo/code/evince/install/bin/evince '/home/gpoo/Descargas/epiphany/1212.3868v1.pdf'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb5669b40 (LWP 9014)]
[New Thread 0xb4cffb40 (LWP 9015)]
[New Thread 0xa7398b40 (LWP 9020)]
[New Thread 0xa69ffb40 (LWP 9021)]
[Thread 0xb4cffb40 (LWP 9015) exited]

Program received signal SIGSEGV, Segmentation fault.

Thread 2795502400 (LWP 9021)

  • #0 magazine_chain_pop_head
    at gslice.c line 532
  • #1 thread_memory_magazine1_alloc
    at gslice.c line 835
  • #2 g_slice_alloc
    at gslice.c line 994
  • #3 handler_match_prepend
    at gsignal.c line 468
  • #4 handlers_find
    at gsignal.c line 561
  • #5 signal_handlers_foreach_matched_R
    at gsignal.c line 2730
  • #6 g_signal_handlers_disconnect_matched
    at gsignal.c line 2880
  • #7 ev_scheduler_job_destroy
    at ev-job-scheduler.c line 138
  • #8 ev_job_thread_proxy
    at ev-job-scheduler.c line 218
  • #9 g_thread_proxy
    at gthread.c line 798
  • #10 start_thread
    at pthread_create.c line 308
  • #11 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 4 José Aliste 2013-04-03 22:50:40 UTC
So this is a threading issue... yeah! I believe the problem is the following (not sure...): 

1. You search for a term. 
2. you hit enter until you are in the last match of the page. 
3. you hit enter once more and the next match is in a page which is not cached. 
4. since the page is not cached, we get the loading... overlay, which gives focus to the ev_view. 
5. since the find_bar losts its focus, it hides itself.
Comment 5 Carlos Garcia Campos 2013-04-15 18:49:11 UTC
The loading window is not a window anynore so it can steal the focus. The problem is that the page jumps during the find make the history to be updated, and when a links is activated from the history, the view is focused, making the findbar to lose the focus. I think we should not even update the history during search operations and simply add the current page to the history when the search finishes. What do you think?
Comment 6 José Aliste 2013-04-15 21:22:15 UTC
ah, I see it now, so when the jump is more than two pages you get the entry added to the history. it makes sense. So comment 4 is completely wrong, yey me! 

Carlos, it makes sense to me to not update the history until the focus goes back to the view.
Comment 7 Carlos Garcia Campos 2013-04-20 15:52:09 UTC
Ok, I've fixed it by not updating the history while searching.