Bug 89432 - CRASH: "Invalid vector <T> subscript" - creating Table of Contents including a comment
Summary: CRASH: "Invalid vector <T> subscript" - creating Table of Contents including ...
Status: RESOLVED DUPLICATE of bug 89400
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-02-17 13:54 UTC by ivana.bosnic
Modified: 2015-12-15 11:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Heading1 with comment - crash when creating TOC (11.92 KB, application/vnd.oasis.opendocument.text)
2015-02-17 13:54 UTC, ivana.bosnic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivana.bosnic 2015-02-17 13:54:03 UTC
Created attachment 113461 [details]
Heading1 with comment - crash when creating TOC

Writer crashes when creating a Table of Contents which includes comments. 
I am attaching a small document excerpt where this happens - this does NOT happen if I try to recreate the document from scratch. 

Steps to reproduce: 
1. Open attached file bug_toc.odt.
2. Create Table of Contents (no changes of options needed).
-> Crash - Fatal error: invalid vector <T> subscript

3. Open the file again.
4. Remove the comment.
5. Create Table of Contents.
   Works OK.

6. Remove Table of Contents.
7. Mark "test1" as a comment.
8. Create Table of Contents.
-> Crash - Fatal error: invalid vector <T> subscript

Works OK in version: 4.3.5.2 on the same computer.
I suppose this is related to or duplicate of Bug 89400...
Comment 1 Joel Madero 2015-02-19 03:55:56 UTC
Ubuntu 14.10x64
LibreOffice 4.5 master (built a few days ago)
LibreOffice 4.4.0.3
bibisect package (41all): confirmed regression

Marking as
New
Major - crash
High - default for crash

regression

bibisectRequest (will need to use the new bibisect package)

There is a chance that this is a duplicate - but I can't find it right now. If you (or anyone else) has some time to query bugzilla to look for a similar bug that would be great.
Comment 2 Wauters 2015-02-19 16:43:52 UTC
Also happens with no comment in the document
Comment 3 Rostislav 'R.Yu.' Okulov 2015-02-19 20:51:42 UTC
----------------
First 7 source-hashes - cause crash, but other 4 cause vector::_M_range_check.
----------------


git bisect start                                                                                             
# bad: [4a3091e95fa263d3e2dd81e56e83996f0bb12287] source-hash-2b5b04e1e62914bf0902dfd7943cdc44499c47a6       
git bisect bad 4a3091e95fa263d3e2dd81e56e83996f0bb12287                                                              
# good: [812c4a492375ac47b3557fbb32f5637fc89d60d9] source-hash-dea4a3b9d7182700abeb4dc756a24a9e8dea8474              
git bisect good 812c4a492375ac47b3557fbb32f5637fc89d60d9                                                                      
# good: [5d0dfb8e62ae61a240f8313c594d4560e7c8e048] source-hash-0c6cd530de13f80795881f61064f1bf1dcc4ea81                       
git bisect good 5d0dfb8e62ae61a240f8313c594d4560e7c8e048                                                                                       
# bad: [7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5] source-hash-f93ce4f7eb90093d0ea3115d0a1c614612676dbd                                         
git bisect bad 7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5                                                                                        
# bad: [1a63057f6378db7c6b8af1171b7b140f7583f246] source-hash-59f84b4a2c082382767f12e0c7a06a3f0b52e721                                         
git bisect bad 1a63057f6378db7c6b8af1171b7b140f7583f246                                                                                          
# bad: [3787e4f82e47eaf4fa454afdca671272e50f875b] source-hash-0e09134a4a4cbb0639fc586c560c6fb2765487be
git bisect bad 3787e4f82e47eaf4fa454afdca671272e50f875b
# good: [5b2c61f6b34f03146c2d03da03a7b7f546ce56b8] source-hash-abf842e4b125b9f863ea4c2af17ad6ac7d82b15e
git bisect good 5b2c61f6b34f03146c2d03da03a7b7f546ce56b8
# bad: [c42f09491446a9544fdb0dd0ebb600cb4f99258b] source-hash-5deaac4ff9956c80ad16dc14c9085d91b5eb0aba
git bisect bad c42f09491446a9544fdb0dd0ebb600cb4f99258b
# bad: [f07bf31b22e5ff9aa1d98f1e4d0638524c177e2a] source-hash-9835fa87ac6ffe43bd9cc85839b2fea1fca2fcad
git bisect bad f07bf31b22e5ff9aa1d98f1e4d0638524c177e2a
# bad: [ffba56e25588bfc965a3f41e2abd0bb8528e447e] source-hash-f7d51f43deda5e28df63f1b8e168e84838d0d0b4
git bisect bad ffba56e25588bfc965a3f41e2abd0bb8528e447e
# bad: [fd19e9ba489de30918bfd74baa82d4b3fe3b615e] source-hash-e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a
git bisect bad fd19e9ba489de30918bfd74baa82d4b3fe3b615e
# first bad commit: [fd19e9ba489de30918bfd74baa82d4b3fe3b615e] source-hash-e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a

 fd19e9ba489de30918bfd74baa82d4b3fe3b615e is the first bad commit
commit fd19e9ba489de30918bfd74baa82d4b3fe3b615e
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Sat Oct 18 00:27:28 2014 +0000

    source-hash-e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a
    
    commit e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Fri Jun 6 10:06:00 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Fri Jun 6 10:06:24 2014 +0100
    
        c++03 vs c++11 enum namespacing
    
        Change-Id: I91be0e7d2b013221b1d47a5cd1e4e75eb16c2b67

:100644 100644 4ff97a37ed7c33680ab343c6d7cca1279b2ce2d7 863fa531c183069c5835a629cf2f3233e084f29e M     ccache.log
:100644 100644 37395b8d72474f9132ee322102cf8ce0166c0186 64433eaa73d9cca1a772a35136200087f948d0a3 M     commitmsg
:100644 100644 4c446e219e6f3aa166d90bd2397f01e7be95f6c4 a78e2089b0582f3d8ecec51c005099bb06b5a037 M     make.log
:040000 040000 771cc5432143cfcbf70b6bba83d2c0c5cd742375 69a40b4c9b257e0b8983d8da539870ae8b56c8ad M     opt
Comment 4 Rostislav 'R.Yu.' Okulov 2015-02-19 20:56:12 UTC
Sorry about 7... I mean that til this source-hash-5deaac4ff9956c80ad16dc14c9085d91b5eb0aba (not included) bad hashes cause crash.
Starting source-hash-5deaac4ff9956c80ad16dc14c9085d91b5eb0aba (included) hashes produce vector::_M_range_check dialog
Comment 5 Matthew Francis 2015-02-20 12:38:52 UTC
This bug case is a multi-vehicle pileup. There are at least 3(!) independent crashes involved - probably not including the original report, because I can't see any of them involving "Invalid vector <T> subscript"

After (1) the index dialog starts crashing randomly on open
After (2) adding the index starts to produce the "vector::_M_range_check" error dialog mentioned in comment 3
After (3) LO exits while trying to display the above error dialog 

This needs splitting up into multiple reports, and the original report reinvestigating as a duplicate of bug 89400 on the basis that it's possibly Windows only.


(1)
commit 2f84b420e0428693fb2d45b68afdc9023dfc08bc
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Jan 29 08:38:50 2014 +0100

    writer shadow: Avoid a whole load of unnecessary scaling.
    
    Instead of always scaling the bitmap to the right dimensions, only enlarge it
    when necessary, and crop it while painting by using DrawBitmapEx() that
    accepts the source size.
    
    Also use BMP_SCALE_FAST, it is enough here.
    
    Change-Id: I702ea5c9f119257ab83d49cf050ce8840e50b196

(2)
commit 9088a4c2d18f59c22fceb81829441b704603415d
Author: Tobias Lippert <drtl@fastmail.fm>
Date:   Fri Jun 6 00:04:24 2014 +0200

    fdo#30732 Retain selected character attributes for table of contents
    
    The text and selected attributes are copied from the source text node
    and added to the target node at the corresponding positions.

(3)
commit 3d3fc58a32211cf56c5238f2d9f0e86a1eb7ae7e
Author: Takeshi Abe <tabe@fixedpoint.jp>
Date:   Fri Jun 13 03:56:40 2014 +0900

    Avoid possible memory leaks in case of exceptions
    
    Change-Id: I986805143615f053b918fb1e64b0b24d6f76f2de
Comment 6 Matthew Francis 2015-02-21 01:17:46 UTC
(1) in comment 5 appears to have already been fixed by some random bloke in the below commit

commit f857358d83e7c105271eb0e2c43f0b036f14f284
Author: Matthew J. Francis <mjay.francis@gmail.com>
Date:   Wed Nov 19 11:25:28 2014 +0800

    fdo#86298 Avoid crash blending upside down Bitmaps of differing size
Comment 7 Matthew Francis 2015-02-21 07:51:13 UTC
Bug 89400 has been confirmed for Windows

Of the issues noted on comment 5,
(1) is already fixed,
(2) -> bug 89520
(3) -> bug 89521

Closing this as duplicate based on its original description

*** This bug has been marked as a duplicate of bug 89400 ***
Comment 8 Robinson Tryon (qubit) 2015-12-15 11:03:09 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]