Bug Hunting Session
Bug 91637 - EDITING: Crash inserting cross-reference category and number if text in caption has been deleted
Summary: EDITING: Crash inserting cross-reference category and number if text in capt...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.1.0 target:5.0.0.0.beta2 ta...
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2015-05-26 11:37 UTC by Gordo
Modified: 2016-10-25 19:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace (12.61 KB, text/plain)
2015-05-26 11:37 UTC, Gordo
Details
Linux 5.1 master backtrace (7.63 KB, text/plain)
2015-05-28 01:52 UTC, Matthew Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordo 2015-05-26 11:37:57 UTC
Created attachment 116046 [details]
backtrace

1. New Text Document.
2. Insert Table 2 x 2.
3. Insert Caption leaving the Caption blank and select Category Table and OK.
4. Delete the text “Table ” from the caption (Don't forget the space).
5. Enter a new paragraph after the caption.
6. Insert → Cross-reference:  select “Table” from Type and “Category and Number” from Insert reference to and Insert.
Result:
Assertion failed crash.

Or:
1. New Text Document.
2. Insert → Fields → More Fields → Variables tab → Number range → Text, Insert and Close.
3. Enter a new paragraph and Insert → Cross-reference:  select “Text” from Type and “Category and Number” from Insert reference to and Insert.
Result:
Assertion failed crash.

Version: 5.1.0.0.alpha1+
Build ID: af75d7a4c99414fabbd31b9df590266d28574fb1
TinderBox: Win-x86@39, Branch:master, Time: 2015-05-26_00:20:30

See attachment 116045 [details] from bug 84339 which shows how text before the number is used as the category.

There was no 5.1.0.0.alpha to select in version.
Comment 1 Matthew Francis 2015-05-28 01:51:18 UTC
Confirmed on Linux 5.1 master (dbgutil, 8cbb94a2b79dcaf9675125da800b64a85bae52dc)

-> Platform: All
-> NEW
Comment 2 Matthew Francis 2015-05-28 01:52:00 UTC
Created attachment 116085 [details]
Linux 5.1 master backtrace
Comment 3 Commit Notification 2015-06-04 20:01:32 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#91637 avoid -1 string index

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 4 Commit Notification 2015-06-04 20:02:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7aeeef6902ee2be4934341072829a6f15a14f3fb&h=libreoffice-5-0

Resolves: tdf#91637 avoid -1 string index

It will be available in 5.0.0.0.beta2.

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 5 Commit Notification 2015-06-04 20:07:32 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b36afd1ecd098723e3119cba81e172396bf30f45&h=libreoffice-4-4

Resolves: tdf#91637 avoid -1 string index

It will be available in 4.4.5.

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.