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 702874 - SIGABRT in ev_pixbuf_cache_get_selection_surface
SIGABRT in ev_pixbuf_cache_get_selection_surface
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-22 21:02 UTC by Jason Crain
Modified: 2013-06-26 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Crain 2013-06-22 21:02:34 UTC
If you use the mouse to select text in a multi-page document, and the selection spans two pages, evince crashes with SIGABRT in ev_pixbuf_cache_get_selection_surface.  It's tripping an assert statement:

    if (job_info->selection_points.x1 < 0) {
        g_assert (job_info->selection == NULL);
        old_points = NULL;
    } else {


Using git bisect, I tracked it down to this commit:

    b9c32bc1c1f5971c080bcc4753c6df90732f5a5e is the first bad commit
    commit b9c32bc1c1f5971c080bcc4753c6df90732f5a5e
    Author: Carlos Garcia Campos <carlosgc@gnome.org>
    Date:   Fri Jun 21 15:02:59 2013 +0200

        libview: Take page border into account when computing selections


It looks like this patch may make the selection_points have negative values, and ev_pixbuf_cache interprets negative x1 values to mean the selection is empty.
Comment 1 Carlos Garcia Campos 2013-06-24 06:45:23 UTC
Oops, sorry, it should be fixed in git master now. Thanks for reporting.
Comment 2 Jason Crain 2013-06-26 01:52:47 UTC
This is still crashable.  Start the selection just a couple pixels to the left of the page and drag down until two lines of text are selected.

I think you need something like:

    selection->rect.x1 = MAX (selection->rect.x1 - border.left, 0);
    selection->rect.y1 = MAX (selection->rect.y1 - border.top, 0);
Comment 3 Carlos Garcia Campos 2013-06-26 08:25:00 UTC
Ok, I've done that, and also for x2 y2 just for consistency, thanks!