#18 Annotation Viewer Filter with selected file content crashes

open
None
5
2009-02-14
2009-02-09
Anonymous
No

Without "source-highlight", in the annotation viewer, just select file content (multiple lines) and press the filter button.
It crashes.
I installed source highlight and now it works.
I realized that the filter also highlights the selected content when activated.

gentoo, qgit-2.1

Discussion

  • (The submitter again): I deinstalled "source-highlight" , but cannot reproduce the bug.

     
  • (the submitter once more): No. It has nothing to do with source-highlight. It works like this
    - open a project
    - double click a commit
    - double click on one of the changed files (the rightmost pane)
    - mark a range
    - press filter button

     
  • (you know me...): By now it's qgit-2.2 and qt-4.4.2 and still the problem
    Note: This does not happen when the file is opened through the file browser.

     
  • Ok,ok, now a bit more elaborate. (May I start over?):
    This bug does show up on some files only, and then it doesn't matter from where the annotation viewer gets opened.
    In particular, I have the git repo of the xserver

    git://git.freedesktop.org/git/xorg/xserver

    Within this repo it happens with several files (none of the top-level files).
    Problems occur in:
    hw/xfree86/loader/loader.c
    hw/xfree86/common/xf86Bus.c
    dix/devices.c
    ...and more

    It doesn't seem to depend on the "Range Select" but:
    Top: HEAD
    Bottom: xorg-server-1_1_99_2
    x Working Dir (none of the other checkboxes)
    no additional options

    It doesn't seem to have different effects depending on the lines chosen, but to be precisely:
    Mark the 3 lines surrounding the "Copyright" lines at the top of each of these files

    Now press the filter button and it crashes

    Config is (/home/dirk/.config/qgit/qgit4.conf):
    [General]
    external_diff_viewer=kompare
    flags=9069
    recent_open_repos=/home/dirk/dirq/src/X11/xorg/xserver
    typewriter_font="Linux Libertine,9,-1,5,50,0,0,0,0,0"

    [Commit]
    template_file_path=.git/commit-template

    [Console]
    geometry_window=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x2\xd9\0\0\x1\xc8\0\0\0\x3\0\0\0\f\0\0\x2\xd6\0\0\x1\xc5\0\0\0\0\0\0)

    [Custom_action_list]
    woah\commands=make love\n

    [Custom_actions]
    geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1\xf\0\0\0\0\0\0\x3H\0\0\x1\xfa\0\0\x1\x12\0\0\0\f\0\0\x3\x45\0\0\x1\xf7\0\0\0\0\0\0)
    list=woah

    [Rev_List_view]
    geometry_splitter_1=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x1.\0\0\x1\b\x1\0\0\0\x6\x1\0\0\0\x2)
    geometry_splitter_2=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x1\xce\0\0\x1\xab\x1\0\0\0\x6\x1\0\0\0\x1)

    [Top_window]
    geometry_splitter_1=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x1\0\0\0\x2\x8f\x1\0\0\0\x6\x1\0\0\0\x1)
    geometry_window=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x2\xe3\0\0\x1\x1e\0\0\x6\x8f\0\0\x3\xfb\0\0\x2\xe6\0\0\x1*\0\0\x6\x8c\0\0\x3\xf8\0\0\0\0\0\0)

    [Working_dir]
    exclude_file_path=.git/info/exclude
    exclude_per_directory_file_name=.gitignore

    [RangeSelect]
    from=xorg-server-1_1_99_2
    to=HEAD
    options=

    Cmdline Output (the first line appears immediately after the startup, not in succession to the filter button)
    QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.
    Segmentation fault

    the last lines of strace:
    write(7, "(\1\4\0\246\1\0\0b\0@\2\213\3\225\1", 16) = 16
    read(7, 0xbfc51e84, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\1\1^\326\0\0\0\0\0\0\0\0\245\0k\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    ioctl(7, FIONREAD, [0]) = 0
    clock_gettime(CLOCK_MONOTONIC, {36200, 830636794}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}], 3, 699) = 1
    clock_gettime(CLOCK_MONOTONIC, {36200, 832588767}) = 0
    ioctl(7, FIONREAD, [32]) = 0
    read(7, "\6\0^\326\200a(\2\246\1\0\0b\0@\2\0\0\0\0\212\3\224\1\244\0j\0\0\0\1\0", 32) = 32
    ioctl(7, FIONREAD, [0]) = 0
    write(7, "(\1\4\0\246\1\0\0b\0@\2\212\3\224\1", 16) = 16
    read(7, 0xbfc52124, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\1\1_\326\0\0\0\0\0\0\0\0\244\0j\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    clock_gettime(CLOCK_MONOTONIC, {36200, 833198732}) = 0
    write(7, "(\1\4\0\246\1\0\0b\0@\2\212\3\225\1", 16) = 16
    read(7, 0xbfc51e84, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\1\1`\326\0\0\0\0\0\0\0\0\244\0k\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    ioctl(7, FIONREAD, [0]) = 0
    clock_gettime(CLOCK_MONOTONIC, {36200, 833624350}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}], 3, 699) = 1
    clock_gettime(CLOCK_MONOTONIC, {36200, 903594721}) = 0
    ioctl(7, FIONREAD, [32]) = 0
    read(7, "\6\0`\326\307a(\2\246\1\0\0b\0@\2\0\0\0\0\211\3\224\1\243\0j\0\0\0\1\0", 32) = 32
    ioctl(7, FIONREAD, [0]) = 0
    write(7, "(\1\4\0\246\1\0\0b\0@\2\211\3\224\1", 16) = 16
    read(7, 0xbfc52124, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\1\1a\326\0\0\0\0\0\0\0\0\243\0j\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    clock_gettime(CLOCK_MONOTONIC, {36200, 904216134}) = 0
    write(7, "(\1\4\0\246\1\0\0b\0@\2\212\3\224\1", 16) = 16
    read(7, 0xbfc51e84, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\1\1b\326\0\0\0\0\0\0\0\0\244\0j\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    ioctl(7, FIONREAD, [0]) = 0
    clock_gettime(CLOCK_MONOTONIC, {36200, 904637562}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}], 3, 699) = 1
    clock_gettime(CLOCK_MONOTONIC, {36200, 963278547}) = 0
    ioctl(7, FIONREAD, [32]) = 0
    read(7, "\4\1b\326\3b(\2\246\1\0\0b\0@\2\0\0\0\0\211\3\224\1\243\0j\0\0\0\1\0", 32) = 32
    write(7, "\22\0\7\0b\0@\2\351\0\0\0\6\0\0\0 n\4\0\1\0\0\0\3b(\2(\0\4\0"..., 44) = 44
    read(7, 0xbfc52124, 32) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, -1) = 1
    read(7, "\34Oc\326b\0@\2\351\0\0\0\3b(\2\0\0@\2\0\0\0@\200\331Z\n\260\341N\n", 32) = 32
    read(7, "\1\1d\326\0\0\0\0\0\0\0\0\243\0j\0\364\337\33\10\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    clock_gettime(CLOCK_MONOTONIC, {36200, 965929663}) = 0
    write(7, "7\0\4\0*\23@\2p\0@\2\0\0\0\0007n\4\0+\23@\2p\0@\2\0\0\0\0"..., 8376) = 8376
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
    clock_gettime(CLOCK_MONOTONIC, {36200, 966343085}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    clock_gettime(CLOCK_MONOTONIC, {36200, 966554895}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}], 3, 9866) = 1
    clock_gettime(CLOCK_MONOTONIC, {36201, 33509783}) = 0
    ioctl(7, FIONREAD, [32]) = 0
    read(7, "\5\1?\327Ib(\2\246\1\0\0b\0@\2\0\0\0\0\211\3\224\1\243\0j\0\0\1\1\0", 32) = 32
    write(7, "(\0\4\0\246\1\0\0b\0@\2\211\3\224\1", 16) = 16
    read(7, "\1\1@\327\0\0\0\0\0\0\0\0\243\0j\0\0\0\0\0\0\0\0\0\200\331Z\n\0\0\0\0", 32) = 32
    write(7, "\2\0\4\0[\22@\2\0@\0\0U\5@\2\2n\4\0]\22@\2\0@\0\0U\5@\2"..., 304) = 304
    clock_gettime(CLOCK_MONOTONIC, {36201, 34252477}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
    clock_gettime(CLOCK_MONOTONIC, {36201, 34453450}) = 0
    ioctl(7, FIONREAD, [0]) = 0
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++

     
  • I found the bug. It's:

    --- ./src/annotate.cpp.ORGY 2009-02-10 21:22:31.000000000 +0100
    +++ ./src/annotate.cpp 2009-02-10 23:56:14.000000000 +0100
    @@ -488,7 +488,7 @@ void Annotate::updateCrossRanges(SCRef c
    QStringList::const_iterator itStart(afterAnn.constEnd());
    QStringList::const_iterator itEnd(afterAnn.constEnd());

    - QStringList::const_iterator it(afterAnn.begin());
    + QStringList::const_iterator it(afterAnn.constBegin());
    for (int lineNum = ofs + 1; it != afterAnn.constEnd(); ++lineNum, ++it) {

    if (*it != fakedAuthor) {

    Strange is that this is already in the git supposedly older repo on git://git.kernel.org/pub/scm/qgit/qgit.git. with dates from 2006 !?
    The two lines with constEnd() above this diff seem more reasonable there, too. With one line saying constBegin().
    Did some old version of annotate.cpp go astray into this package (qgit4.git) ???
    The commit in 2007 for this line says "Improve annotation speed of 15%".

     
  • To summarize. This is a two version problem. The initial import for qgit-2 has flaws within annotate.cpp which have been fixed in qgit-1.5 after that fork.

     
  • Marco Costalba
    Marco Costalba
    2009-02-14

    • assigned_to: nobody --> mcostalba
     
  • Marco Costalba
    Marco Costalba
    2009-02-14

    Thanks for your bug report and for your patch.

    I will test, probably tomorrow, and I will apply the patch.

    Thanks agian for your time!

    Marco

    P.S: Sorry for the delayed answer.

     
  • No problem, at all.
    You will reveal another problem, which was probably the reason for crash in the first place.
    The filter will be released in case a commit is selected that does not affect the file in question. Somehow commits that don't affect the file in question are among the shown commits. I didn't follow that one, though. It works in qgit-1.5.*.

    If you followed the example with xserver.git. It happens with
    - double click dix/devices.c
    - mark lines 2-4
    - press filter
    - select first entry (id 14 - Fixed backend segfaults...). That commit does not affect dix/devices.c

    I like qgit[4] very much. Very informative. Great program!

     
  • Oh, it does affect that file but not on the master branch.
    So the annotation viewer seems to show changes affecting that file from all branches, even if only the main branch is selected... Something like that...