Bug 107176 - Hang If I use "Capitalise Every Word" on a list containing an empty list item.
Summary: Hang If I use "Capitalise Every Word" on a list containing an empty list item.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:5.5.0 target:5.4.0.1 target:5.3.4
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2017-04-15 07:40 UTC by Teche
Modified: 2017-05-29 15:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Teche 2017-04-15 07:40:47 UTC
Description:
During editing in Libre Office Impress 4.2.8.2 on Ubuntu 14.04 if I attempt to change the case of the letters in a bullet list containing an empty list item (list item with no character (no spaces too)) to "Capitalise Every Word", LibreOffice Impress crashes.

add empty list item with no characters in it by hitting the "Enter" key twice.
highlight the whole list
right click and from the context menu select "Change case"
Select "Capitalise Every Word" from the list of options that appear

Steps to Reproduce:
1. Create a bullet list e.g one with 3 items .
2. Make sure one of the list items is empty (no characters, spaces included) while the others have text. 
3. highlight the whole list
4. right click and from the context menu select "Change case"
5. Select "Capitalise Every Word" from the list of options that appear.

Actual Results:  
Libre Office Impress Freezes

Expected Results:
Convert words in the list so that the first letter of each word is capitalized.


Reproducible: Always

User Profile Reset: No

Additional Info:
This is on a Lenovo Z50-70 64 bit
Core i7
8 GB of RAM


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Comment 1 Telesto 2017-04-15 14:16:28 UTC
Confirming a hang/freeze (total unresponsiveness) - but no crash - with:
Version: 5.4.0.0.alpha0+
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-04-05_23:32:27
Locale: nl-NL (nl_NL); Calc: CL
Comment 2 Julien Nabet 2017-04-16 15:16:22 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce the hanging.

Here's a part of bt from repeated log "invalid word length of 0":
Thread 1 "soffice.bin" hit Breakpoint 1, ImpEditEngine::TransliterateText (this=0x5555586a0160, rSelection=..., nTransliterationMode=TransliterationFlags::TITLE_CASE)
    at /home/julien/lo/libreoffice/editeng/source/editeng/impedit4.cxx:2800
2800	                DBG_ASSERT( nLen > 0, "invalid word length of 0" );
(gdb) bt
#0  ImpEditEngine::TransliterateText (this=0x5555586a0160, rSelection=..., nTransliterationMode=TransliterationFlags::TITLE_CASE)
    at /home/julien/lo/libreoffice/editeng/source/editeng/impedit4.cxx:2800
#1  0x00007ffff380bdbe in EditEngine::TransliterateText (this=0x5555586a1660, rSelection=..., nTransliterationMode=TransliterationFlags::TITLE_CASE)
    at /home/julien/lo/libreoffice/editeng/source/editeng/editeng.cxx:487
#2  0x00007ffff384d7c0 in EditView::TransliterateText (this=0x55555873dad0, nTransliterationMode=TransliterationFlags::TITLE_CASE)
    at /home/julien/lo/libreoffice/editeng/source/editeng/editview.cxx:740
#3  0x00007ffff39c2a03 in OutlinerView::TransliterateText (this=0x5555586e46d0, nTransliterationMode=TransliterationFlags::TITLE_CASE)
    at /home/julien/lo/libreoffice/editeng/source/outliner/outlvw.cxx:1298
#4  0x00007fffcacde05f in sd::DrawViewShell::FuSupport (this=0x555557a54cd0, rReq=...) at /home/julien/lo/libreoffice/sd/source/ui/view/drviewse.cxx:1377
Comment 3 Julien Nabet 2017-04-16 15:41:49 UTC
I give it a try with https://gerrit.libreoffice.org/#/c/36582/
Let's wait comments on it.
Comment 4 Commit Notification 2017-05-18 18:38:34 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#107176: just return initial selection when there's no range

It will be available in 5.4.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 5 Commit Notification 2017-05-18 18:39:21 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#107176: just return initial selection when there's no range

It will be available in 5.4.0.1.

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 6 Julien Nabet 2017-05-18 18:42:27 UTC
Fix targets. The branching to 5.4 has been made today, I suppose bugtracker doesn't know yet 5.5.0
Comment 7 Commit Notification 2017-05-29 15:28:45 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=83e87f7579ecf63e810c7556661e4f95a8309aff&h=libreoffice-5-3

tdf#107176: just return initial selection when there's no range

It will be available in 5.3.4.

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.