Bug Hunting Session
Bug 89337 - Libreoffice will crash when index entry is removed
Summary: Libreoffice will crash when index entry is removed
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-02-12 12:48 UTC by Peter Ketel
Modified: 2016-10-10 12:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Log file (140.61 KB, text/x-log)
2015-02-12 12:48 UTC, Peter Ketel
Details
test file (11.50 KB, application/vnd.oasis.opendocument.text)
2015-10-21 20:45 UTC, Puggan SE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Ketel 2015-02-12 12:48:19 UTC
Created attachment 113341 [details]
Log file

When an index entry is deleted there is a possibility that it will crash the writer. The problem especially occurs when the index entry is part of the header.

The problem occurs also on the Mac with the latest OS.

The log has been included for more details.
Comment 1 raal 2015-02-13 15:28:56 UTC Comment hidden (obsolete)
Comment 2 Peter Ketel 2015-02-14 05:48:22 UTC
The document that is causing the problems consists of 88 pages. I will create a small document.
Comment 3 Peter Ketel 2015-02-14 05:49:00 UTC
A small document is needed.
Comment 4 QA Administrators 2015-09-04 02:55:48 UTC Comment hidden (obsolete)
Comment 5 William Whalley 2015-09-09 14:23:32 UTC
Steps to create crash. LibreOffice 5.0.1.2.0, AMD64 linux
1. Create a new writer document and insert some text
2. Select a word by double-clicking. Mark it as an index entry (Insert/Index and Tables/Index Entry/Insert); Click Close.
3. Click away from the word to deselect it.
4. Right-click the indexed word and select Edit Index Entry; select Delete.
5. Click in the document. LibreOffice crashes.

Also happens on LibreOffice 5.0.1.2, Windows 10, 32 bit
Comment 6 raal 2015-09-09 17:18:19 UTC
Reproducible with Verze: 5.0.1.2
ID sestavení: 81898c9f5c0d43f3473ba111d7b351050be20261, win7

No crash with Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89), regression
Comment 7 Sebastian Fellner 2015-09-24 17:27:59 UTC
Reproducible with 5.0.2.2, Windows 8.1, 64 bit.

It also happens when just clicking "OK" or "Close" in the edit dialog without deleting the entry.

Steps to reproduce:
1. Create a new document and enter text
2. Select a word and add it as an index entry with Insert > Indexes and Tables > Index Entry > Insert. Close the dialog.
3. Click anywhere on the document to deselect the text.
4. Right-click on the word and select "Edit Index Entry". Click "OK" or "Close" without changing anything.
5. Click anywhere on the document. LibreOffice crashes.
Comment 8 raal 2015-09-24 17:50:58 UTC
No crash with Version: 5.1.0.0.alpha1+
Build ID: 83ef294dddf3b1ab5cd5f91a792a7d9413a08f1f
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-20_07:00:46
and Version: 5.1.0.0.alpha1+ (x64)
Build ID: bf2116353a89c402bf19b79d49eadf4454103423
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-16_11:35:23, win7

Seems to be fixed in developer version. Please could you restest with dev version? http://dev-builds.libreoffice.org/daily/master/
Comment 9 Sebastian Fellner 2015-09-29 15:12:30 UTC
(In reply to raal from comment #8)
> No crash with Version: 5.1.0.0.alpha1+
> Build ID: 83ef294dddf3b1ab5cd5f91a792a7d9413a08f1f
> TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
> 2015-09-20_07:00:46
> and Version: 5.1.0.0.alpha1+ (x64)
> Build ID: bf2116353a89c402bf19b79d49eadf4454103423
> TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-16_11:35:23, win7
> 
> Seems to be fixed in developer version. Please could you restest with dev
> version? http://dev-builds.libreoffice.org/daily/master/

Using "OK", "Cancel" or "Delete" works now, but when exiting the "Edit Index Entry" dialog with the red X it still crashes.
Comment 10 Puggan SE 2015-10-21 20:45:15 UTC
Created attachment 119851 [details]
test file

file for easier bibisecting.
Step 1-3 already done.

bibisecting using:
git bisect run bash -c "opt/program/soffice /mnt/data3/puggan/src/lo/bug_89337/test.odt || exit 1"
Comment 11 Puggan SE 2015-10-21 20:50:08 UTC
bibisect done

conclution:
442746c7621790af396a8b6b39c0ccebab02916c is the first bad commit
commit 442746c7621790af396a8b6b39c0ccebab02916c
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Wed May 27 22:10:17 2015 +0800

    source-hash-aef1826d9ca318a1359a2116e7f146e993413234
    
    Bibisect: This commit covers the following irrelevant source commit(s)
    ce82146a6be87b239a0bde0b59fddf8865290b99
    
    commit aef1826d9ca318a1359a2116e7f146e993413234
    Author:     Stephan Bergmann <sbergman@redhat.com>
    AuthorDate: Tue Apr 28 16:17:40 2015 +0200
    Commit:     Stephan Bergmann <sbergman@redhat.com>
    CommitDate: Tue Apr 28 16:18:02 2015 +0200
    
        default initialization of object of const type w/o user-provided default ctor
    
        Change-Id: I99266457d43f9279af32d75d2842480291b6e91d

:040000 040000 3ba9c7ffb8ba3e8a80c51e6891fa2d2d05a39d79 aef41b62e2a68b93f18200b053cd5ce3de2afc59 M      opt
bisect run success

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aef1826d9ca318a1359a2116e7f146e993413234

Log:
# bad: [dda106fd616b7c0b8dc2370f6f1184501b01a49e] source-hash-0db96caf0fcce09b87621c11b584a6d81cc7df86
# good: [5b9dd620df316345477f0b6e6c9ed8ada7b6c091] source-hash-2851ce5afd0f37764cbbc2c2a9a63c7adc844311
git bisect start 'latest' 'oldest'
# skip: [891b689ba95b9e53609194ee2a1a2d3b8955843c] source-hash-01f406bc28f53acc5a2734af637aa8074a5d1813
git bisect skip 891b689ba95b9e53609194ee2a1a2d3b8955843c
# good: [0c30a2c797b249d0cd804cb71554946e2276b557] source-hash-45aaec8206182c16025cbcb20651ddbdf558b95d
git bisect good 0c30a2c797b249d0cd804cb71554946e2276b557
# good: [2ce02b2ce56f12b9fcb9efbd380596975a3a5686] source-hash-17d714eef491bda2512ba8012e5b3067ca19a5be
git bisect good 2ce02b2ce56f12b9fcb9efbd380596975a3a5686
# bad: [19902c835ff03b54347c31ebbc436895b372303b] source-hash-4000a0e6524f09612a3fe8f0a6214e0a68b7e007
git bisect bad 19902c835ff03b54347c31ebbc436895b372303b
# good: [530f0c73f208cd84ed14de7d263f844a7c8e00f9] source-hash-c33422e2c21ed8160fbbb969698216a8a1aeb0b8
git bisect good 530f0c73f208cd84ed14de7d263f844a7c8e00f9
# good: [3498327eab46ef63b61fa4c804fa5700b6b72261] source-hash-6b84bc7d24e2a862dd5edbd600be4959cd22c633
git bisect good 3498327eab46ef63b61fa4c804fa5700b6b72261
# bad: [a12594bd460e2caca9615a325cd2cd0befe5dc50] source-hash-059280acb565b5ef7b6ac1890f2f3d61a9ebdb05
git bisect bad a12594bd460e2caca9615a325cd2cd0befe5dc50
# bad: [0cfa18bfe312bf0ceaae62ef91422a90cf866521] source-hash-b49e10f9dbe0d02b012ceff378e8e4e64a3016a0
git bisect bad 0cfa18bfe312bf0ceaae62ef91422a90cf866521
# bad: [6e57ecdc8ec285cdc54fa8573f063075bbc172c0] source-hash-a0c8b9c502be6df8ba853f3e8c0d4e45bb2785b2
git bisect bad 6e57ecdc8ec285cdc54fa8573f063075bbc172c0
# bad: [4e3d7ede3060eae46f926cbb38fdf0f1b92889be] source-hash-a4bbd95248159b7e2a2ec47cc28954763c8f81bd
git bisect bad 4e3d7ede3060eae46f926cbb38fdf0f1b92889be
# bad: [ff1c4d58a27f00d6819c459866e4000d9b51e97b] source-hash-83ed85eceb3591a14a7f661c179d5b5880cedcff
git bisect bad ff1c4d58a27f00d6819c459866e4000d9b51e97b
# bad: [442746c7621790af396a8b6b39c0ccebab02916c] source-hash-aef1826d9ca318a1359a2116e7f146e993413234
git bisect bad 442746c7621790af396a8b6b39c0ccebab02916c
# good: [436a7ed41b8c084b15a17b95027e4d2785a94d97] source-hash-84c73c983577e33dda266bbfcdd89b9e1202906b
git bisect good 436a7ed41b8c084b15a17b95027e4d2785a94d97
# good: [53871cea909a0b86726f189bcfdab2890ffcf9e9] source-hash-a31991c4188e91326941fbe510ce70129d1ccde8
git bisect good 53871cea909a0b86726f189bcfdab2890ffcf9e9
# first bad commit: [442746c7621790af396a8b6b39c0ccebab02916c] source-hash-aef1826d9ca318a1359a2116e7f146e993413234
Comment 12 Commit Notification 2015-10-29 06:48:24 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fbff75a64c7449aac85d640f67b1de147db35c3e

tdf#89337: Fixing crash in edit/index dialog, again

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Christian Pietzsch 2015-11-01 20:32:38 UTC
The patch seems to work fine.
Tested with: 
Version: 5.1.0.0.alpha1+
Build ID: 7a40c137e480329d9cf2b7946c2d83d9e52e8d29
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-10-31_23:29:52
Locale: de-DE (de_DE.UTF-8)

and the test file under Ubuntu 15.04 64 it.

I tested closing tha dailog using the x and the close button, and pressing other buttons in the dialog. No crash afterwards.
Comment 14 Robinson Tryon (qubit) 2015-12-17 08:46:44 UTC Comment hidden (obsolete)