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 320281 - Evince crashes when highlighting text repeatedly
Evince crashes when highlighting text repeatedly
Status: RESOLVED DUPLICATE of bug 315552
Product: evince
Classification: Core
Component: general
0.4.x
Other other
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-31 00:37 UTC by Phil M.
Modified: 2005-10-31 06:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
The file I've most recently used to cause this crash. (76.13 KB, application/pdf)
2005-10-31 03:36 UTC, Phil M.
Details

Description Phil M. 2005-10-31 00:37:31 UTC
Distribution: Debian testing/unstable
Package: evince
Severity: normal
Version: GNOME2.10.2 0.4.x
Gnome-Distributor: Debian
Synopsis: Evince crashes when highlighting text repeatedly
Bugzilla-Product: evince
Bugzilla-Component: general
Bugzilla-Version: 0.4.x
BugBuddy-GnomeVersion: 2.0 (2.10.1)
Description:
Description of the crash:
When I highlight text repeatedly in a pdflatex-generated PDF, evince
crashes.

Steps to reproduce the crash:
1. Generate PDF document with pdflatex
2. Highlight text a few times
3. Watch for bug-buddy 

Expected Results:
Highlighted text

How often does this happen?
Consistently when attempted.

Additional Information:
I've recompiled evince with debugging symbols, though the crash does not
appear to be happening in evince's code directly.


Debugging Information:

Backtrace was generated from '/usr/bin/evince'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its
symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1228708160 (LWP 18770)]
[New Thread -1228842064 (LWP 18772)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb70aec41 in waitpid () from /lib/tls/libc.so.6

Thread 1 (Thread -1228708160 (LWP 18770))

  • #0 waitpid
    from /lib/tls/libc.so.6
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 <signal handler called>
  • #3 TextBlock::visitSelection
    from /usr/lib/libpoppler.so.0
  • #4 TextPage::visitSelection
    from /usr/lib/libpoppler.so.0
  • #5 TextPage::getSelectionRegion
    from /usr/lib/libpoppler.so.0
  • #6 TextOutputDev::getSelectionRegion
    from /usr/lib/libpoppler.so.0
  • #7 poppler_page_get_selection_region
    from /usr/lib/libpoppler-glib.so.0
  • #8 pdf_selection_get_selection_region
  • #9 ev_selection_get_selection_region
  • #10 ev_pixbuf_cache_get_selection_pixbuf
  • #11 ev_view_rotate_right
  • #12 g_child_watch_add
    from /usr/lib/libglib-2.0.so.0
  • #13 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #14 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #15 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #16 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 main
  • #0 waitpid
    from /lib/tls/libc.so.6




------- Bug moved to this database by unknown@gnome.bugs 2005-10-31 00:37 UTC -------


The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here, unknown@gnome.bugs.
   Previous reporter was bugbuddy@millenix.mailshell.com.

Comment 1 Olivier Le Thanh Duong 2005-10-31 02:15:44 UTC
Thanks for taking the time to report this bug.
This bug report isn't very useful because it doesn't describe the bug well. 
Can you, if possible, attach the file causing the crash?  This may help us
finding the cause of the bug.
This may be a Popple Bug (the backend Evince use for rendering PDF), could you
please supply the poppler version and
type? I have "poppler 0.4.2 (splash)". You can find it in the Help->About menu in
Evince.

Comment 2 Phil M. 2005-10-31 02:58:34 UTC
On that line, I have
"Using poppler 0.4.2 (cairo)"

I'll try recompiling poppler with debugging symbols, and see where that leads.
Depending on my free time, I might be able to localize this crash myself.

I've found this crash to occur on multiple files, but I'll attach one that I
know exhibits this.
Comment 3 Phil M. 2005-10-31 03:34:35 UTC
Here's a copy of what bug-buddy records when it crashes now that I've installed
unstripped versions of evince and libpoppler:
============================
Backtrace was generated from '/usr/bin/evince'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1228036416 (LWP 12415)]
[New Thread -1228170320 (LWP 12416)]
0xb7152c41 in waitpid () from /lib/tls/libc.so.6

Thread 1 (Thread -1228036416 (LWP 12415))

  • #0 waitpid
    from /lib/tls/libc.so.6
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 <signal handler called>
  • #3 TextBlock::visitSelection
    at TextOutputDev.cc line 3441
  • #4 TextPage::visitSelection
    at TextOutputDev.cc line 3522

I'll attach this file (it's the same one as the last time) momentarily.
Comment 4 Phil M. 2005-10-31 03:36:37 UTC
Created attachment 54116 [details]
The file I've most recently used to cause this crash.
Comment 5 Phil M. 2005-10-31 03:58:35 UTC
I notice in the backtrace from Thread 1 (the last in the latter output), both
'begin' and 'p' appear to be NULL pointers. 

Looking at line 3441 in TextOutputDev.cc in poppler, p is dereferenced (as
p->next) without any test for p != NULL. I can't tell by inspection whether p is
supposed to be a pointer to an element in a linked list defined by begin, but
that's what it looks like. Since begin is NULL at that point, and p was just
initialized to begin, p->next is a NULL pointer dereference. 

I'll try to chase down how this got there through the call stack soon. Looking
slightly earlier in the code, it looks like lines may have been NULL (though
that seems odd, assuming lines is the list of lines in the document). This code
looks fairly easy to follow, so I'll see what some debugging turns up.
Comment 6 Phil M. 2005-10-31 04:24:42 UTC
Here's a summary of what I've found in gdb. Basically, somehow, the loop along
the lines linked list is setting end to the element before begin, as seen below,
making the second loop starting from p=begin dereference the NULL pointer at the
end of the lines list before reaching end:

(gdb) print begin
$13 = (TextLine *) 0x8266b78
(gdb) print end
$14 = (TextLine *) 0x83456f8
(gdb) print lines
$15 = (TextLine *) 0x829c760
(gdb) print lines->next
$16 = (TextLine *) 0x82a1bc8
(gdb) print lines->next->next
$17 = (TextLine *) 0x83854e0
(gdb) print lines->next->next->next
$18 = (TextLine *) 0x839aef8
(gdb) print lines->next->next->next->next
$19 = (TextLine *) 0x8308d98
(gdb) print lines->next->next->next->next->next
$20 = (TextLine *) 0x83456f8                 <= this is end
(gdb) print lines->next->next->next->next->next->next
$21 = (TextLine *) 0x8266b78                 <= this is begin
(gdb) print lines->next->next->next->next->next->next->next
$22 = (TextLine *) 0x0                       <= this is the NULL pointer :-)

Looking at the code, the only place anything other than NULL is assigned to end
(which would prevent this because of the p != end test at the top of the loop)
is at line 3424 of TextOutputDev.cc of poppler. I'll try to muster the willpower
to examine all of the lines and so forth to divine what's up with the selection
coordinates that's causing this.

Should this bug be moved over to poppler, or is it more likely that there's an
error in how TextBlock::visitSelection is being called or what it's being called on?

For completeness, here's the backtrace from this run:
  • #0 TextBlock::visitSelection
    at TextOutputDev.cc line 3441
  • #1 TextPage::visitSelection
    at TextOutputDev.cc line 3522
  • #2 TextPage::getSelectionRegion
    at TextOutputDev.cc line 3543
  • #3 TextOutputDev::getSelectionRegion
    at TextOutputDev.cc line 4109
  • #4 poppler_page_get_selection_region
    at poppler-page.cc line 353
  • #5 pdf_selection_get_selection_region
  • #6 ev_selection_get_selection_region
  • #7 ev_pixbuf_cache_get_selection_pixbuf
  • #8 ev_view_rotate_right
  • #9 g_child_watch_add
    from /usr/lib/libglib-2.0.so.0
  • #10 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #11 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #12 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #13 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 main

Comment 7 Phil M. 2005-10-31 04:35:41 UTC
Ah, looking about now, this seems to be a duplicate of bug #315552, which
clearly links to the poppler bug #4402
<https://bugs.freedesktop.org/show_bug.cgi?id=4402> that I found searching there.

I'll leave comments in those as well, to see that this bug report gets cleaned up.
Comment 8 Nickolay V. Shmyrev 2005-10-31 06:07:24 UTC
Surely, thanks for reporting and tesing. Let me continue my comment on poppler
bug instead.

*** This bug has been marked as a duplicate of 315552 ***